hive的java.io.IOException: cannot find dir = hdfs://127.0.0.1:8020/WebLog/Parsed/part-r-00000 in pathToPartitionInfo: [hdfs:/WebLog/Parsed]解决

java.io.IOException: cannot find dir = hdfs://127.0.0.1:8020/WebLog/Parsed/part-r-00000 in pathToPartitionInfo: [hdfs:/WebLog/Parsed]
 at org.apache.hadoop.hive.ql.io.HiveFileFormatUtils.getPartitionDescFromPathRecursively(HiveFileFormatUtils.java:370)
 at org.apache.hadoop.hive.ql.io.HiveFileFormatUtils.getPartitionDescFromPathRecursively(HiveFileFormatUtils.java:331)
 at org.apache.hadoop.hive.ql.io.CombineHiveInputFormat$CombineHiveInputSplit.<init>(CombineHiveInputFormat.java:162)
 at org.apache.hadoop.hive.ql.io.CombineHiveInputFormat.getCombineSplits(CombineHiveInputFormat.java:490)
 at org.apache.hadoop.hive.ql.io.CombineHiveInputFormat.getSplits(CombineHiveInputFormat.java:571)
 at org.apache.hadoop.mapreduce.JobSubmitter.writeOldSplits(JobSubmitter.java:330)
 at org.apache.hadoop.mapreduce.JobSubmitter.writeSplits(JobSubmitter.java:322)
 at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:198)
 at org.apache.hadoop.mapreduce.Job$11.run(Job.java:1341)
 at org.apache.hadoop.mapreduce.Job$11.run(Job.java:1338)
 at java.security.AccessController.doPrivileged(Native Method)
 at javax.security.auth.Subject.doAs(Subject.java:422)
 at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1844)
 at org.apache.hadoop.mapreduce.Job.submit(Job.java:1338)
 at org.apache.hadoop.mapred.JobClient$1.run(JobClient.java:575)
 at org.apache.hadoop.mapred.JobClient$1.run(JobClient.java:570)
 at java.security.AccessController.doPrivileged(Native Method)
 at javax.security.auth.Subject.doAs(Subject.java:422)
 at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1844)
 at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:570)
 at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:561)
 at org.apache.hadoop.hive.ql.exec.mr.ExecDriver.execute(ExecDriver.java:432)
 at org.apache.hadoop.hive.ql.exec.mr.MapRedTask.execute(MapRedTask.java:137)
 at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:160)
 at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:88)
 at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1676)
 at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1435)
 at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1218)
 at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1082)
 at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1072)
 at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:213)
 at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:165)
 at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:376)
 at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:736)
 at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681)
 at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:621)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:498)
 at org.apache.hadoop.util.RunJar.run(RunJar.java:239)
 at org.apache.hadoop.util.RunJar.main(RunJar.java:153)
Job Submission failed with exception 'java.io.IOException(cannot find dir = hdfs://127.0.0.1:8020/WebLog/Parsed/part-r-00000 in pathToPartitionInfo: [hdfs:/WebLog/Parsed])'
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask

原因:是table 的location不对,hdfs:///WebLog/Parsed可能被解析为hdfs:/WebLog/Parsed,应该改为hdfs://127.0.0.1:8020/WebLog/Parsed

原文地址:https://www.cnblogs.com/DataNerd/p/12928865.html