Member since
04-12-2016
30
Posts
12
Kudos Received
1
Solution
My Accepted Solutions
Title | Views | Posted |
---|---|---|
2248 | 05-02-2016 06:42 AM |
05-03-2016
04:28 AM
Hi @Ravi Mutyala, Thank you for your response. It's even worser: In sum we have 8 Oozie workflows containing in total 500+ sub-workflows for loading source tables with a Sqoop action. Each sub-workflow contains the above mentioned Hive action for auditing. This creates for each loaded source table two INSERT INTO TABLE statements in Hive. We hit the error when running those 8 workflows in parallel. Would a sequential execution of the workflows help in this case? What do you exactly mean with microbatching? Thanks, Chris
... View more
05-03-2016
03:40 AM
1 Kudo
Hi all, We have an
Hive action within a Oozie workflow that throws the following error
occasionally: 2016-04-29 16:16:19,129 INFO [main] ql.Driver (Driver.java:launchTask(1604)) - Starting task [Stage-0:MOVE] in serial mode
73997 [main] INFO org.apache.hadoop.hive.ql.exec.Task - Loading data to table audit.aud_tbl_validation_result from hdfs://<nameservice>/tmp/hive/<user>/6218606e-a08c-4912-ad02-6a147165b7d7/hive_2016-04-29_16-15-51_649_3401400148024571575-1/-ext-10000
2016-04-29 16:16:19,129 INFO [main] exec.Task (SessionState.java:printInfo(824)) - Loading data to table audit.aud_tbl_validation_result from hdfs://<nameservice>/tmp/hive/<user>/6218606e-a08c-4912-ad02-6a147165b7d7/hive_2016-04-29_16-15-51_649_3401400148024571575-1/-ext-10000
76263 [main] INFO hive.ql.metadata.Hive - Renaming src:hdfs://<nameservice>/tmp/hive/<user>/6218606e-a08c-4912-ad02-6a147165b7d7/hive_2016-04-29_16-15-51_649_3401400148024571575-1/-ext-10000/000000_0;dest: hdfs://<nameservice>/apps/hive/warehouse/audit.db/aud_tbl_validation_result/000000_0_copy_348;Status:false
2016-04-29 16:16:21,395 INFO [main] metadata.Hive (Hive.java:renameFile(2461)) - Renaming src:hdfs://<nameservice>/tmp/hive/<user>/6218606e-a08c-4912-ad02-6a147165b7d7/hive_2016-04-29_16-15-51_649_3401400148024571575-1/-ext-10000/000000_0;dest: hdfs://<nameservice>/apps/hive/warehouse/audit.db/aud_tbl_validation_result/000000_0_copy_348;Status:false
76274 [main] ERROR org.apache.hadoop.hive.ql.exec.Task - Failed with exception copyFiles: error while moving files!!! Cannot move hdfs://<nameservice>/tmp/hive/<user>/6218606e-a08c-4912-ad02-6a147165b7d7/hive_2016-04-29_16-15-51_649_3401400148024571575-1/-ext-10000/000000_0 to hdfs://<nameservice>/apps/hive/warehouse/audit.db/aud_tbl_validation_result/000000_0_copy_348
org.apache.hadoop.hive.ql.metadata.HiveException: copyFiles: error while moving files!!! Cannot move hdfs://<nameservice>/tmp/hive/<user>/6218606e-a08c-4912-ad02-6a147165b7d7/hive_2016-04-29_16-15-51_649_3401400148024571575-1/-ext-10000/000000_0 to hdfs://<nameservice>/apps/hive/warehouse/audit.db/aud_tbl_validation_result/000000_0_copy_348
at org.apache.hadoop.hive.ql.metadata.Hive.copyFiles(Hive.java:2536)
at org.apache.hadoop.hive.ql.metadata.Table.copyFiles(Table.java:673)
at org.apache.hadoop.hive.ql.metadata.Hive.loadTable(Hive.java:1571)
at org.apache.hadoop.hive.ql.exec.MoveTask.execute(MoveTask.java:288)
at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:160)
at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:85)
at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1606)
at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1367)
at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1179)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1006)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:996)
at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:247)
at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:199)
at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:410)
at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:345)
at org.apache.hadoop.hive.cli.CliDriver.processReader(CliDriver.java:443)
at org.apache.hadoop.hive.cli.CliDriver.processFile(CliDriver.java:459)
at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:739)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:677)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:616)
at org.apache.oozie.action.hadoop.HiveMain.runHive(HiveMain.java:323)
at org.apache.oozie.action.hadoop.HiveMain.run(HiveMain.java:284)
at org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:39)
at org.apache.oozie.action.hadoop.HiveMain.main(HiveMain.java:66)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:226)
at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54)
at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:450)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343)
at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:163)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1628)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)
Caused by: java.io.IOException: Cannot move hdfs://<nameservice>/tmp/hive/<user>/6218606e-a08c-4912-ad02-6a147165b7d7/hive_2016-04-29_16-15-51_649_3401400148024571575-1/-ext-10000/000000_0 to hdfs://<nameservice>/apps/hive/warehouse/audit.db/aud_tbl_validation_result/000000_0_copy_348
at org.apache.hadoop.hive.ql.metadata.Hive.copyFiles(Hive.java:2530)
... 36 more The Namenode logs reveals more details --> destination exists! hadoop-hdfs-namenode-<host>.log.3:2016-04-29 16:16:21,394 WARN hdfs.StateChange (FSDirectory.java:unprotectedRenameTo(540)) - DIR* FSDirectory.unprotectedRenameTo: failed to rename /tmp/hive/<user>/6218606e-a08c-4912-ad02-6a147165b7d7/hive_2016-04-29_16-15-51_649_3401400148024571575-1/-ext-10000/000000_0 to /apps/hive/warehouse/audit.db/aud_tbl_validation_result/000000_0_copy_348 because destination exists Cross checking HDFS, the file is in the Hive warehouse directory. Stack/Settings: HDP 2.2.4, Kerberos enabled, NN HA, Hive ACID disabled Hive
statements used in Oozie workflow: INSERT INTO TABLE AUDIT.AUD_TBL_BATCH_RUN_LOG VALUES(${Batch_ID},"${Business_DT}", ...);
INSERT INTO TABLE AUDIT.AUD_TBL_VALIDATION_RESULT VALUES(${Batch_ID},"${Job_ID}","${Status}", ...); Hive DLL: CREATE TABLE aud_tbl_batch_run_log (
AUD_Batch_ID BIGINT,
AUD_JOB_ID STRING,
... )
INTO 10 BUCKETS stored as orc TBLPROPERTIES ('transactional'='false');
CREATE TABLE aud_tbl_batch_validation_result (
AUD_Batch_ID BIGINT,
AUD_JOB_ID STRING,
AUD_STATUS STRING,
... )
INTO 10 BUCKETS stored as orc TBLPROPERTIES ('transactional'='false'); We see this error occasionally for table aud_tbl_batch_run_log as well as aud_tbl_batch_validation_result. Why does the file sometimes already exists? How does the insert into table internally works? Any hints to solve this are highly appreciated. Thank you & best regards, Chris
... View more
Labels:
- Labels:
-
Apache Hive
-
Apache Oozie
05-02-2016
12:40 PM
Does this work? sqoop list-databases --connect jdbc:mysql://xyz.syz/ --username hive --password hive
... View more
05-02-2016
11:47 AM
Hi @simran kaur, You can list the available sharelibs with the following command: sudo -u oozie oozie admin -shareliblist -oozie http://<oozie_host>:11000/oozie
[Available ShareLib]
oozie
hive
distcp
hcatalog
sqoop
mapreduce-streaming
spark
hive2
pig
Also, is the mysql driver in your lib folder of the workflow application as described here? https://oozie.apache.org/docs/4.2.0/WorkflowFunctionalSpec.html#a7_Workflow_Application_Deployment Hope this helps, Chris
... View more
05-02-2016
10:50 AM
@vperiasamy I had the same error and I can confirm that above command fixed the issue. Thx!
... View more
05-02-2016
06:42 AM
Hi @Roberto Sancho: 47GB RAM is not a lot for a NN. It will work for a PoC, but this is definitely not recommended for production.
... View more
04-26-2016
02:08 PM
Well, it depends mainly on the memory of standby namenode. Imagine the following scenario: If the active namenode fails, the standby namenode takes over very quickly because it has the latest state available in memory: both the latest edit logs entries and an up-to-date block mapping. That means the RAM should be more or less the same in both namenodes. Cheers, Chris
... View more
04-26-2016
01:49 PM
Hi Roberto, I would recommend using Namenode HA (High Availability) rather than a secondary namenode. However, in a HA scenario the Namenode specs would be identical which would increases your total costs. Hope it helps,
Chris
... View more
04-26-2016
05:28 AM
Hi, I had a similar effect after upgrading to Ambari 2.2.1.1 and HDP 2.4. HDFS Summary dashboard showed corrupt blocks but fsck reported a heathly filesystem. Status: HEALTHY
Total size: 42317678169599 B (Total open files size: 89891159 B)
Total dirs: 99625
Total files: 289448
Total symlinks: 0 (Files currently being written: 24)
Total blocks (validated): 519195 (avg. block size 81506328 B) (Total open file blocks (not validated): 24)
Minimally replicated blocks: 519195 (100.0 %)
Over-replicated blocks: 0 (0.0 %)
Under-replicated blocks: 0 (0.0 %)
Mis-replicated blocks: 0 (0.0 %)
Default replication factor: 3
Average block replication: 3.0056088
Corrupt blocks: 0
Missing replicas: 0 (0.0 %)
Number of data-nodes: 9
Number of racks: 1
FSCK ended at Mon Apr 25 17:13:18 CEST 2016 in 4920 milliseconds
The filesystem under path '/' is HEALTHY Solution:
Restarted Ambari (server and agents) as well as Ambari Metrics. After a while, Ambari displayed 0 block errors which is in line with the output from fsck. Cheers, Chris
... View more
- « Previous
-
- 1
- 2
- Next »