You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2012/03/07 01:33:18 UTC

svn commit: r1297808 - /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/LoadSemanticAnalyzer.java

Author: hashutosh
Date: Wed Mar  7 00:33:18 2012
New Revision: 1297808

URL: http://svn.apache.org/viewvc?rev=1297808&view=rev
Log:
HIVE-1444: hdfs is hardcoded in few places in the code which inhibits use of other file systems (ecapriolo via hashutosh)

Modified:
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/LoadSemanticAnalyzer.java

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/LoadSemanticAnalyzer.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/LoadSemanticAnalyzer.java?rev=1297808&r1=1297807&r2=1297808&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/LoadSemanticAnalyzer.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/LoadSemanticAnalyzer.java Wed Mar  7 00:33:18 2012
@@ -101,7 +101,7 @@ public class LoadSemanticAnalyzer extend
     }
 
     // if scheme is specified but not authority then use the default authority
-    if (fromScheme.equals("hdfs") && StringUtils.isEmpty(fromAuthority)) {
+    if ((!fromScheme.equals("file")) && StringUtils.isEmpty(fromAuthority)) {
       URI defaultURI = FileSystem.get(conf).getUri();
       fromAuthority = defaultURI.getAuthority();
     }
@@ -112,11 +112,6 @@ public class LoadSemanticAnalyzer extend
 
   private void applyConstraints(URI fromURI, URI toURI, Tree ast,
       boolean isLocal) throws SemanticException {
-    if (!fromURI.getScheme().equals("file")
-        && !fromURI.getScheme().equals("hdfs")) {
-      throw new SemanticException(ErrorMsg.INVALID_PATH.getMsg(ast,
-          "only \"file\" or \"hdfs\" file systems accepted"));
-    }
 
     // local mode implies that scheme should be "file"
     // we can change this going forward