`
p_3er
  • 浏览: 55752 次
  • 性别: Icon_minigender_1
  • 来自: 广州
文章分类
社区版块
存档分类
最新评论

FAILED: Hive Internal Error: java.lang.RuntimeException(Error while making MR scratch directory异常的解决

 
阅读更多
hive> select * from dummy;
FAILED: Hive Internal Error: java.lang.RuntimeException(Error while making MR scratch directory - check filesystem config (null))
java.lang.RuntimeException: Error while making MR scratch directory - check filesystem config (null)
<wbr><wbr><wbr><wbr>at org.apache.hadoop.hive.ql.Context.getMRScratchDir(Context.java:216)</wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr>at org.apache.hadoop.hive.ql.Context.getMRTmpFileURI(Context.java:267)</wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr>at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getMetaData(SemanticAnalyzer.java:1063)</wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr>at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:7275)</wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr>at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:243)</wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr>at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:430)</wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr>at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:337)</wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr>at org.apache.hadoop.hive.ql.Driver.run(Driver.java:889)</wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr>at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:255)</wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr>at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:212)</wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr>at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:403)</wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr>at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:671)</wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr>at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:554)</wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr>at sun.reflect.NativeMethodAccessorImpl<wbr>.invoke0(Native Method)</wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr>at sun.reflect.NativeMethodAccessorImpl<wbr>.invoke(NativeMethodAccessorImpl<wbr>.java:39)</wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr>at sun.reflect.DelegatingMethodAccessor<wbr>Impl.invoke(DelegatingMethodAccessor<wbr>Impl.java:25)</wbr></wbr></wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr>at java.lang.reflect.Method.invoke(Method.java:597)</wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr>at org.apache.hadoop.util.RunJar.main(RunJar.java:197)</wbr></wbr></wbr></wbr>
Caused by: java.lang.IllegalArgumentException<wbr>: Wrong FS: hdfs://172.16.27.115:9000/opt/hadoop-0.20.2-cdh3u3/hadoop-root/hive_2012-04-25_16-38-44_851_5689096273896907591, expected: hdfs://namenode115:9000</wbr>
<wbr><wbr><wbr><wbr>at org.apache.hadoop.fs.FileSystem.checkPath(FileSystem.java:410)</wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr>at org.apache.hadoop.hdfs.DistributedFileSystem.checkPath(DistributedFileSystem.java:106)</wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr>at org.apache.hadoop.fs.FileSystem.makeQualified(FileSystem.java:322)</wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr>at org.apache.hadoop.hdfs.DistributedFileSystem.makeQualified(DistributedFileSystem.java:123)</wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr>at org.apache.hadoop.hive.ql.Context.getScratchDir(Context.java:164)</wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr>at org.apache.hadoop.hive.ql.Context.getMRScratchDir(Context.java:210)</wbr></wbr></wbr></wbr>
<wbr><wbr><wbr><wbr>... 17 more</wbr></wbr></wbr></wbr>

进入 $hadoop_home vi conf/core-site.xml
之前配置是:
<property>
<name>fs.default.name</name>
<value>hdfs://172.16.27.115:9000</value>
</property>
查看vim /etc/hosts
172.16.27.115 namenode115
修改core-site.xml中ip为hostname
<property>
<name>fs.default.name</name>
<value>hdfs://namenode115<wbr>:9000&lt;/value&gt;</wbr>
</property>
重启hadoop,在进入hive查询即可
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics