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

System properties in job configuration not resolved when submitting MR job

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 3.0.0
    • None
    • None
    • Hadoop 3.0.0

    Description

      Since this hadoop commit that was first released in 3.0.0, Configuration has a restricted mode, that disables the resolution of system properties (that happens when retrieving a configuration option).

      This leads to test failures when switching to Hadoop 3.0.0 (instead of 3.0.0-beta1), since we're relying on the substitution of test.tmp.dir during the maven build. See test results on HIVE-18327.

      When we're passing job configurations to Hadoop, I believe there's no way to disable the restricted mode, since we go through some Hadoop MR calls first, see here:

      "HiveServer2-Background-Pool: Thread-105@9500" prio=5 tid=0x69 nid=NA runnable
        java.lang.Thread.State: RUNNABLE
      	  at org.apache.hadoop.conf.Configuration.addResourceObject(Configuration.java:970)
      	  - locked <0x2fe6> (a org.apache.hadoop.mapred.JobConf)
      	  at org.apache.hadoop.conf.Configuration.addResource(Configuration.java:895)
      	  at org.apache.hadoop.mapred.JobConf.<init>(JobConf.java:476)
      	  at org.apache.hadoop.mapred.LocalJobRunner$Job.<init>(LocalJobRunner.java:162)
      	  at org.apache.hadoop.mapred.LocalJobRunner.submitJob(LocalJobRunner.java:788)
      	  at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:254)
      	  at org.apache.hadoop.mapreduce.Job$11.run(Job.java:1570)
      	  at org.apache.hadoop.mapreduce.Job$11.run(Job.java:1567)
      	  at java.security.AccessController.doPrivileged(AccessController.java:-1)
      	  at javax.security.auth.Subject.doAs(Subject.java:422)
      	  at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1962)
      	  at org.apache.hadoop.mapreduce.Job.submit(Job.java:1567)
      	  at org.apache.hadoop.mapred.JobClient$1.run(JobClient.java:576)
      	  at org.apache.hadoop.mapred.JobClient$1.run(JobClient.java:571)
      	  at java.security.AccessController.doPrivileged(AccessController.java:-1)
      	  at javax.security.auth.Subject.doAs(Subject.java:422)
      	  at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1962)
      	  at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:571)
      	  at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:562)
      	  at org.apache.hadoop.hive.ql.exec.mr.ExecDriver.execute(ExecDriver.java:415)
      	  at org.apache.hadoop.hive.ql.exec.mr.MapRedTask.execute(MapRedTask.java:149)
      	  at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:205)
      	  at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:97)
      	  at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:2314)
      	  at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1985)
      	  at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1687)
      	  at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1438)
      	  at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1432)
      	  at org.apache.hive.service.cli.operation.SQLOperation.runQuery(SQLOperation.java:248)
      	  at org.apache.hive.service.cli.operation.SQLOperation.access$700(SQLOperation.java:90)
      	  at org.apache.hive.service.cli.operation.SQLOperation$BackgroundWork$1.run(SQLOperation.java:340)
      	  at java.security.AccessController.doPrivileged(AccessController.java:-1)
      	  at javax.security.auth.Subject.doAs(Subject.java:422)
      	  at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1962)
      	  at org.apache.hive.service.cli.operation.SQLOperation$BackgroundWork.run(SQLOperation.java:353)
      	  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	  at java.lang.Thread.run(Thread.java:745)
      

      I suggest to resolve all variables before passing the configuration to Hadoop in ExecDriver.

      Attachments

        1. HIVE-18858.1.patch
          3 kB
          Daniel Voros
        2. HIVE-18858.2.patch
          3 kB
          Daniel Voros
        3. HIVE-18858.3.patch
          1 kB
          Daniel Voros

        Issue Links

          Activity

            People

              dvoros Daniel Voros
              dvoros Daniel Voros
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: