I can succeed doing DDL operations like "create table" and other command query 
related to metastore_db like "decribe","show tables" as the metastore_db is 
located at local host which I think is the main reason. but when I use "select" 
it will cause an error if I configurate the fs.default.name to a ip string in 
core-site.xml under hadoop,while if I configurate this field in hadoop to 
hostname other than IP, it works well. Did anybody know the reason and solution 
or that field must be configurated to hostname when using hive.
As I know, hadoop works quite well with that field configurated to either ip or 
hostname.

The error log:

2010-07-29 16:36:11,255 ERROR ql.Driver (SessionState.java:printError(248)) - 
FAILED: Unknown exception: Error while making MR scrat
ch 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:184)
        at org.apache.hadoop.hive.ql.Context.getMRTmpFileURI(Context.java:254)
        at 
org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getMetaData(SemanticAnalyzer.java:733)
        at 
org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5200)
        at 
org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
        at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
        at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
        at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
        at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
        at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
        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.0.153:9000/tmp/hive-shangan/1018108626, expected: hdfs://vm1
53:9000
        at org.apache.hadoop.fs.FileSystem.checkPath(FileSystem.java:310)
        at 
org.apache.hadoop.hdfs.DistributedFileSystem.checkPath(DistributedFileSystem.java:99)
        at 
org.apache.hadoop.hdfs.DistributedFileSystem.getPathName(DistributedFileSystem.java:155)
        at 
org.apache.hadoop.hdfs.DistributedFileSystem.mkdirs(DistributedFileSystem.java:262)
        at org.apache.hadoop.fs.FileSystem.mkdirs(FileSystem.java:1120)
        at org.apache.hadoop.hive.ql.Context.makeMRScratchDir(Context.java:122)
        at org.apache.hadoop.hive.ql.Context.getMRScratchDir(Context.java:180)
        ... 15 more


2010-07-29



shangan 

Reply via email to