[ 
https://issues.apache.org/jira/browse/HIVE-18858?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Voros updated HIVE-18858:
--------------------------------
    Status: Patch Available  (was: Open)

Attached patch #1. This resolves all variables before passing to MR and also 
updates the Hadoop dependency to 3.0.0 to see if it helps the tests. In 
HIVE-18327 these test cases were failing due to this issue, I'm expecting these 
to pass with this patch in place:

{code}
FAILED org.apache.hadoop.hive.ql.TestAutoPurgeTables#testAutoPurge
FAILED org.apache.hadoop.hive.ql.TestAutoPurgeTables#testNoAutoPurge
FAILED 
org.apache.hadoop.hive.ql.TestAutoPurgeTables#testExternalPartitionedTable
FAILED 
org.apache.hadoop.hive.ql.TestAutoPurgeTables#testTruncatePartitionedNoAutoPurge
FAILED 
org.apache.hadoop.hive.ql.TestAutoPurgeTables#testTruncatePartitionedAutoPurge
FAILED org.apache.hadoop.hive.ql.TestAutoPurgeTables#testAutoPurgeUnset
FAILED org.apache.hadoop.hive.ql.TestAutoPurgeTables#testTruncateNoAutoPurge
FAILED org.apache.hadoop.hive.ql.TestAutoPurgeTables#testAutoPurgeInvalid
FAILED org.apache.hadoop.hive.ql.TestAutoPurgeTables#testPartitionedNoAutoPurge
FAILED org.apache.hadoop.hive.ql.TestAutoPurgeTables#testExternalNoAutoPurge
FAILED org.apache.hadoop.hive.ql.TestAutoPurgeTables#testTruncateUnsetAutoPurge
FAILED org.apache.hadoop.hive.ql.TestAutoPurgeTables#testExternalTable
FAILED org.apache.hadoop.hive.ql.TestAutoPurgeTables#testPartitionedTable
FAILED 
org.apache.hadoop.hive.ql.TestAutoPurgeTables#testPartitionedExternalNoAutoPurge
FAILED 
org.apache.hadoop.hive.ql.TestAutoPurgeTables#testTruncateInvalidAutoPurge
FAILED 
org.apache.hadoop.hive.ql.TestMetaStoreLimitPartitionRequest#testMoreComplexQueryWithDirectSqlTooManyPartitions
FAILED 
org.apache.hadoop.hive.ql.TestMetaStoreLimitPartitionRequest#testSimpleQueryWithDirectSqlTooManyPartitions
FAILED 
org.apache.hadoop.hive.ql.TestMetaStoreLimitPartitionRequest#testQueryWithLikeWithFallbackToORMTooManyPartitions
FAILED 
org.apache.hadoop.hive.ql.TestMetaStoreLimitPartitionRequest#testQueryWithInWithFallbackToORMTooManyPartitions2
FAILED 
org.apache.hadoop.hive.ql.TestMetaStoreLimitPartitionRequest#testQueryWithFallbackToORM1
FAILED 
org.apache.hadoop.hive.ql.TestMetaStoreLimitPartitionRequest#testQueryWithFallbackToORM2
FAILED 
org.apache.hadoop.hive.ql.TestMetaStoreLimitPartitionRequest#testQueryWithFallbackToORM3
FAILED 
org.apache.hadoop.hive.ql.TestMetaStoreLimitPartitionRequest#testMoreComplexQueryWithDirectSql
FAILED 
org.apache.hadoop.hive.ql.TestMetaStoreLimitPartitionRequest#testQueryWithFallbackToORMTooManyPartitions1
FAILED 
org.apache.hadoop.hive.ql.TestMetaStoreLimitPartitionRequest#testQueryWithFallbackToORMTooManyPartitions2
FAILED 
org.apache.hadoop.hive.ql.TestMetaStoreLimitPartitionRequest#testQueryWithFallbackToORMTooManyPartitions3
FAILED 
org.apache.hadoop.hive.ql.TestMetaStoreLimitPartitionRequest#testQueryWithFallbackToORMTooManyPartitions4
FAILED 
org.apache.hadoop.hive.ql.TestMetaStoreLimitPartitionRequest#testQueryWithInWithFallbackToORM
FAILED 
org.apache.hadoop.hive.ql.TestMetaStoreLimitPartitionRequest#testSimpleQueryWithDirectSql
FAILED 
org.apache.hadoop.hive.ql.TestMetaStoreLimitPartitionRequest#testQueryWithInWithFallbackToORMTooManyPartitions
FAILED org.apache.hive.jdbc.TestJdbcWithMiniHS2#testSelectThriftSerializeInTasks
FAILED 
org.apache.hive.jdbc.TestJdbcWithMiniHS2#testEmptyResultsetThriftSerializeInTasks
FAILED org.apache.hive.jdbc.TestJdbcWithMiniHS2#testParallelCompilation2
FAILED org.apache.hive.jdbc.TestJdbcWithMiniHS2#testJoinThriftSerializeInTasks
FAILED org.apache.hive.jdbc.TestJdbcWithMiniHS2#testParallelCompilation
FAILED org.apache.hive.jdbc.TestJdbcWithMiniHS2#testConcurrentStatements
FAILED 
org.apache.hive.jdbc.TestJdbcWithMiniHS2#testFloatCast2DoubleThriftSerializeInTasks
FAILED org.apache.hive.jdbc.TestJdbcWithMiniHS2#testEnableThriftSerializeInTasks
FAILED 
org.apache.hive.service.cli.TestEmbeddedThriftBinaryCLIService#testExecuteStatementParallel
{code}

> System properties in job configuration not resolved when submitting MR job
> --------------------------------------------------------------------------
>
>                 Key: HIVE-18858
>                 URL: https://issues.apache.org/jira/browse/HIVE-18858
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 3.0.0
>         Environment: Hadoop 3.0.0
>            Reporter: Daniel Voros
>            Assignee: Daniel Voros
>            Priority: Major
>         Attachments: HIVE-18858.1.patch
>
>
> Since [this hadoop 
> commit|https://github.com/apache/hadoop/commit/5eb7dbe9b31a45f57f2e1623aa1c9ce84a56c4d1]
>  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|https://github.com/apache/hive/blob/05d4719eefc56676a3e0e8f706e1c5e5e1f6b345/data/conf/hive-site.xml#L37]
>  during the [maven 
> build|https://github.com/apache/hive/blob/05d4719eefc56676a3e0e8f706e1c5e5e1f6b345/pom.xml#L83].
>  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:
> {code}
> "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)
> {code}
> I suggest to resolve all variables before passing the configuration to Hadoop 
> in ExecDriver.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to