Hive
  1. Hive
  2. HIVE-1444

"hdfs" is hardcoded in few places in the code which inhibits use of other file systems

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 0.3.0, 0.4.0, 0.4.1, 0.5.0, 0.6.0, 0.7.0
    • Fix Version/s: 0.9.0
    • Component/s: Query Processor
    • Labels:
      None
    • Environment:

      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"))

      { throw new SemanticException(ErrorMsg.INVALID_PATH.getMsg(ast, "only \"file\" or \"hdfs\" file systems accepted")); }

      "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.

        Activity

        Yuliya Feldman created issue -
        Carl Steinbach made changes -
        Field Original Value New Value
        Affects Version/s 0.5.1 [ 12314793 ]
        Carl Steinbach made changes -
        Affects Version/s 0.4.2 [ 12314523 ]
        Carl Steinbach made changes -
        Affects Version/s 0.3.1 [ 12313845 ]
        Edward Capriolo made changes -
        Assignee Edward Capriolo [ appodictic ]
        Edward Capriolo made changes -
        Attachment hive-1444.patch.txt [ 12514519 ]
        Edward Capriolo made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Edward Capriolo made changes -
        Fix Version/s 0.9.0 [ 12317742 ]
        Phabricator made changes -
        Attachment HIVE-1444.D1839.1.patch [ 12515517 ]
        Edward Capriolo made changes -
        Priority Minor [ 4 ] Critical [ 2 ]
        Ashutosh Chauhan made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ashutosh Chauhan made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Edward Capriolo
            Reporter:
            Yuliya Feldman
          • Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development