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

Fix hiveserver2 mapreduce local job on Windows

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.14.0
    • 0.14.0
    • HiveServer2, Windows
    • None

    Description

      Hiveserver2 fail on Mapreduce local job fail. For example:

      select /*+ MAPJOIN(v) */ registration from studenttab10k s join votertab10k v on (s.name = v.name);
      

      The root cause is "class not found" in the local hadoop job (MapredLocalTask.execute). HADOOP_CLASSPATH does not include $HIVE_HOME/lib. Set HADOOP_CLASSPATH correctly will fix the issue.

      However, there is one complexity in Windows. We start Hiveserver2 using Windows service console (services.msc), which takes hiveserver2.xml generated by hive.cmd. There is no way to pass environment variable in hiveserver2.xml (weird but reality). I attach a patch which pass it through command line arguments and relay to HADOOP_CLASSPATH in Hive code.

      Attachments

        1. HIVE-5092.2.patch
          2 kB
          Hari Sankar Sivarama Subramaniyan
        2. HIVE-5092.3.patch
          3 kB
          Hari Sankar Sivarama Subramaniyan
        3. HIVE-5092.4.patch
          2 kB
          Hari Sankar Sivarama Subramaniyan
        4. HIVE-5092-1.patch
          2 kB
          Daniel Dai

        Issue Links

          Activity

            People

              hsubramaniyan Hari Sankar Sivarama Subramaniyan
              daijy Daniel Dai
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: