FAQ
Author: jssarma
Date: Wed Apr 8 00:25:13 2009
New Revision: 763052

URL: http://svn.apache.org/viewvc?rev=763052&view=rev
Log:
HIVE-387: metastore should not use HADOOPFS variable value directly

Modified:
hadoop/hive/trunk/CHANGES.txt
hadoop/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/Warehouse.java

Modified: hadoop/hive/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/CHANGES.txt?rev=763052&r1=763051&r2=763052&view=diff
==============================================================================
--- hadoop/hive/trunk/CHANGES.txt (original)
+++ hadoop/hive/trunk/CHANGES.txt Wed Apr 8 00:25:13 2009
@@ -15,6 +15,7 @@

BUG FIXES

+ HIVE-387. Use URI from FileSystem Object instead of from HADOOPFS directly
HIVE-381. Fix JDBC HiveResultSet's next function.
(Kim P via namit)


Modified: hadoop/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/Warehouse.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/Warehouse.java?rev=763052&r1=763051&r2=763052&view=diff
==============================================================================
--- hadoop/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/Warehouse.java (original)
+++ hadoop/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/Warehouse.java Wed Apr 8 00:25:13 2009
@@ -54,13 +54,16 @@
}
whRoot = new Path(whRootString);
URI uri = whRoot.toUri();
- // if the METASTOREWAREHOUSE value doesn't have schema and authority specified then inherit
- // from fs.default.name in hadoop-site.xml
- if ((uri.getScheme() == null) && (uri.getAuthority() == null)) {
- whRoot = new Path(HiveConf.getVar(conf, HiveConf.ConfVars.HADOOPFS), whRootString);
- }
+
+ // if the METASTOREWAREHOUSE value does not specify the schema and the authority
+ // then use the default file system as specified by the Configuration
try {
- fs = whRoot.getFileSystem(conf);
+ if ((uri.getScheme() == null) && (uri.getAuthority() == null)) {
+ fs = FileSystem.get(conf);
+ whRoot = new Path(fs.getUri().toString(), whRootString);
+ } else {
+ fs = whRoot.getFileSystem(conf);
+ }
} catch (IOException e) {
MetaStoreUtils.logAndThrowMetaException(e);
}

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
groupcommits @
categorieshive, hadoop
postedApr 8, '09 at 12:27a
activeApr 8, '09 at 12:27a
posts1
users1
websitehive.apache.org

1 user in discussion

Jssarma: 1 post

People

Translate

site design / logo © 2021 Grokbase