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

  • 时间:
  • 浏览:0
  • 来源:大发5分6合_大发5分6合官网

</property>

        at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:460 )

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:554)

        at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:671)

        at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:255)

</property>

172.16.27.115 namenode115

Caused by: java.lang.IllegalArgumentException: 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

<name>fs.default.name</name>

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        ... 17 more

        at java.lang.reflect.Method.invoke(Method.java:597)

<value>hdfs:// namenode115 :9000</value>

        at org.apache.hadoop.fs.FileSystem.checkPath(FileSystem.java:410)

查看vim /etc/hosts

完后 配置是:

FAILED: Hive Internal Error: java.lang.RuntimeException(Error while making MR scratch directory - check filesystem config (null))

        at org.apache.hadoop.util.RunJar.main(RunJar.java:197)

<name>fs.default.name</name>

<property>

        at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getMetaData(SemanticAnalyzer.java:1063)

        at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:243)

        at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:337)

        at org.apache.hadoop.hdfs.DistributedFileSystem.makeQualified(DistributedFileSystem.java:123)

<property>

        at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:7275)

hive> select * from dummy;

<value>hdfs://172.16.27.115:9000</value>

        at org.apache.hadoop.hdfs.DistributedFileSystem.checkPath(DistributedFileSystem.java:106)

        at org.apache.hadoop.hive.ql.Context.getScratchDir(Context.java:164)

        at org.apache.hadoop.hive.ql.Context.getMRTmpFileURI(Context.java:267)

        at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:403)

        at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:212)

修改core-site.xml中ip为hostname

java.lang.RuntimeException: Error while making MR scratch directory - check filesystem config (null)

重启hadoop,在进入hive查询即可

        at org.apache.hadoop.hive.ql.Context.getMRScratchDir(Context.java:216)

        at org.apache.hadoop.fs.FileSystem.makeQualified(FileSystem.java:322)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at org.apache.hadoop.hive.ql.Driver.run(Driver.java:889)

进入 $hadoop_home vi conf/core-site.xml

        at org.apache.hadoop.hive.ql.Context.getMRScratchDir(Context.java:210)