Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
0.3.0, 0.4.0, 0.4.1, 0.5.0, 0.6.0, 0.7.0
-
None
-
any
Description
In quite a few places "hdfs" is hardcoded, which is OK for majority of the cases, except when it is not really hdfs, but s3 or any other file system.
The place where it really breaks is:
in ql/src/java/org/apache/hadoop/hive/ql/parse/LoadSemanticAnalyzer.java :
method: private void applyConstraints(URI fromURI, URI toURI, Tree ast, boolean isLocal)
First few lines are check for file system:
if (!fromURI.getScheme().equals("file")
&& !fromURI.getScheme().equals("hdfs"))
"hdfs" is hardcoded.
I don't think you need to have this check at all as you are checking whether filesystem is local or not later on anyway and in regards to non locla file system - if one would be bad one you would get problems or have it look like local before you even come to "applyConstraints" method.