Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-3717

Hive won't compile with -Dhadoop.mr.rev=20S

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.10.0
    • 0.11.0
    • Build Infrastructure, Shims
    • None

    Description

      ant -Dhadoop.mr.rev=20S clean package

      fails with:

      compile:
           [echo] Project: ql
          [javac] Compiling 744 source files to /root/hive/build/ql/classes
          [javac] /root/hive/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFJson.java:67: cannot find symbol
          [javac] symbol  : variable ALLOW_UNQUOTED_CONTROL_CHARS
          [javac] location: class org.codehaus.jackson.JsonParser.Feature
          [javac]     JSON_FACTORY.enable(Feature.ALLOW_UNQUOTED_CONTROL_CHARS);
          [javac]                                ^
          [javac] /root/hive/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFJson.java:158: cannot find symbol
          [javac] symbol  : method writeValueAsString(java.lang.Object)
          [javac] location: class org.codehaus.jackson.map.ObjectMapper
          [javac]         result.set(MAPPER.writeValueAsString(extractObject));
          [javac]                          ^
          [javac] /root/hive/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDTFJSONTuple.java:59: cannot find symbol
          [javac] symbol  : variable ALLOW_UNQUOTED_CONTROL_CHARS
          [javac] location: class org.codehaus.jackson.JsonParser.Feature
          [javac]     JSON_FACTORY.enable(Feature.ALLOW_UNQUOTED_CONTROL_CHARS);
          [javac]                                ^
          [javac] /root/hive/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDTFJSONTuple.java:189: cannot find symbol
          [javac] symbol  : method writeValueAsString(java.lang.Object)
          [javac] location: class org.codehaus.jackson.map.ObjectMapper
          [javac]           retCols[i].set(MAPPER.writeValueAsString(extractObject));
          [javac]                                ^
          [javac] Note: Some input files use or override a deprecated API.
          [javac] Note: Recompile with -Xlint:deprecation for details.
          [javac] Note: Some input files use unchecked or unsafe operations.
          [javac] Note: Recompile with -Xlint:unchecked for details.
          [javac] 4 errors
      

      According to https://issues.apache.org/jira/browse/HADOOP-7470 hadoop 1.x has been upgraded to jackson 1.8.8 but the POM file still specifies jackson 1.0.1 which doesn't work for hive (doesn't have the ALLOW_UNQUOTED_CONTROL_CHARS).

      The POM for hadoop 2.0.0-alpha (-Dhadoop.mr.rev=23) has the right dependency, hadoop 0.20.2 (-Dhadoop.mr.rev=20) doesn't depend on jackson.

      Attachments

        1. HIVE-3717.5.patch
          22 kB
          Gunther Hagleitner
        2. HIVE-3717.4.patch
          0.6 kB
          Gunther Hagleitner
        3. HIVE-3717.3.patch
          0.4 kB
          Gunther Hagleitner
        4. HIVE-3717.2.patch
          4 kB
          Gunther Hagleitner
        5. HIVE-3717.1-1410543.txt
          2 kB
          Gunther Hagleitner

        Issue Links

          Activity

            People

              hagleitn Gunther Hagleitner
              hagleitn Gunther Hagleitner
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: