论坛首页 综合技术论坛

hive执行查询出现:Error while making MR scratch directory - check filesystem解决办法

浏览 5236 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2011-07-07  

进入 $hadoop_home vi conf/core-site.xml
之前的配置是hdfs://192.168.10.145:9060
但是在hive命令行下面查询一直出错:错误信息如下:
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)
    at org.apache.hadoop.hive.ql.Context.getMRScratchDir(Context.java:196)
    at org.apache.hadoop.hive.ql.Context.getMRTmpFileURI(Context.java:247)
    at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getMetaData(SemanticAnalyzer.java:900)
    at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:6594)
    at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:238)
    at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:340)
    at org.apache.hadoop.hive.ql.Driver.run(Driver.java:736)
    at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:164)
    at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:241)
    at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:456)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
Caused by: java.lang.IllegalArgumentException: Wrong FS: hdfs://192.168.10.145:9060/www/tmp/hive/tmp/hive_2011-07-07_15-16-43_898_7958229762893737206, expected: hdfs://zgz-test-a:9060
    at org.apache.hadoop.fs.FileSystem.checkPath(FileSystem.java:310)
    at org.apache.hadoop.hdfs.DistributedFileSystem.checkPath(DistributedFileSystem.java:99)
    at org.apache.hadoop.fs.FileSystem.makeQualified(FileSystem.java:222)
    at org.apache.hadoop.hdfs.DistributedFileSystem.makeQualified(DistributedFileSystem.java:116)
    at org.apache.hadoop.hive.ql.Context.getScratchDir(Context.java:146)
    at org.apache.hadoop.hive.ql.Context.getMRScratchDir(Context.java:190)
    ... 14 more
改动后:
<property>
    <name>fs.default.name</name>
    <value>hdfs://zgz-test-a:9060/ </value>
    <description>The name of the default file system.  A URI whose
    scheme and authority determine the FileSystem implementation.  The
    uri's scheme determines the config property (fs.SCHEME.impl) naming
    the FileSystem implementation class.  The uri's authority is used to
    determine the host, port, etc. for a filesystem.</description>
</property>


重新启动hadoop,登录hive

   发表时间:2012-02-18  
zgz-test-a代表什么意思?这也没有解释清楚 啊
0 请登录后投票
论坛首页 综合技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics