[jira] [Commented] (HIVE-15194) Hive on Tez - Hive Runtime Error while closing operators
[ https://issues.apache.org/jira/browse/HIVE-15194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17528573#comment-17528573 ] zhengchenyu commented on HIVE-15194: [~wzheng] [~gopalv] In our cluster, I found HashPartition.clear() called in last taskattemp when tez resue container. Becuase we asyncInitOperations are not clear, next taskattemp will use last taskattemp's asyncInitOperations. detail message see https://issues.apache.org/jira/browse/HIVE-26179. > Hive on Tez - Hive Runtime Error while closing operators > > > Key: HIVE-15194 > URL: https://issues.apache.org/jira/browse/HIVE-15194 > Project: Hive > Issue Type: Bug > Components: Hive >Affects Versions: 2.1.0 > Environment: Hive 2.1.0 > Tez 0.8.4 > 4 Nodes x CentOS-6 x64 (32GB Memory, 8 CPUs) > Hadoop 2.7.1 >Reporter: Shankar M >Assignee: Wei Zheng >Priority: Major > Attachments: HIVE-15194.1.patch > > > Please help me to solve below issue.. > -- > I am setting below commands in hive CLI: > set hive.execution.engine=tez; > set hive.vectorized.execution.enabled = true; > set hive.vectorized.execution.reduce.enabled = true; > set hive.cbo.enable=true; > set hive.compute.query.using.stats=true; > set hive.stats.fetch.column.stats=true; > set hive.stats.fetch.partition.stats=true; > SET hive.tez.container.size=4096; > SET hive.tez.java.opts=-Xmx3072m; > -- > {code} > hive> CREATE TABLE tmp_parquet_newtable STORED AS PARQUET AS > > select a.* from orc_very_large_table a where a.event = 1 and EXISTS > (SELECT 1 FROM tmp_small_parquet_table b WHERE b.session_id = a.session_id ) ; > Query ID = hadoop_20161114132930_65843cb3-557c-4b42-b662-2901caf5be2d > Total jobs = 1 > Launching Job 1 out of 1 > Status: Running (Executing on YARN cluster with App id > application_1479059955967_0049) > -- > VERTICES MODESTATUS TOTAL COMPLETED RUNNING PENDING > FAILED KILLED > -- > Map 1 . containerFAILED384 440 340 > 26 0 > Map 2 .. container SUCCEEDED 1 100 > 0 0 > -- > VERTICES: 01/02 [===>>---] 11% ELAPSED TIME: 43.76 s > > -- > Status: Failed > Vertex failed, vertexName=Map 1, vertexId=vertex_1479059955967_0049_2_01, > diagnostics=[Task failed, taskId=task_1479059955967_0049_2_01_48, > diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( > failure ) : > attempt_1479059955967_0049_2_01_48_0:java.lang.RuntimeException: > java.lang.RuntimeException: Hive Runtime Error while closing operators > at > org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:198) > at > org.apache.hadoop.hive.ql.exec.tez.TezProcessor.run(TezProcessor.java:160) > at > org.apache.tez.runtime.LogicalIOProcessorRuntimeTask.run(LogicalIOProcessorRuntimeTask.java:370) > at > org.apache.tez.runtime.task.TaskRunner2Callable$1.run(TaskRunner2Callable.java:73) > at > org.apache.tez.runtime.task.TaskRunner2Callable$1.run(TaskRunner2Callable.java:61) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657) > at > org.apache.tez.runtime.task.TaskRunner2Callable.callInternal(TaskRunner2Callable.java:61) > at > org.apache.tez.runtime.task.TaskRunner2Callable.callInternal(TaskRunner2Callable.java:37) > at org.apache.tez.common.CallableWithNdc.call(CallableWithNdc.java:36) > 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) > Caused by: java.lang.RuntimeException: Hive Runtime Error while closing > operators > at > org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.close(MapRecordProcessor.java:422) > at > org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRu
[jira] [Commented] (HIVE-15194) Hive on Tez - Hive Runtime Error while closing operators
[ https://issues.apache.org/jira/browse/HIVE-15194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15765758#comment-15765758 ] Hive QA commented on HIVE-15194: Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12844150/HIVE-15194.1.patch {color:red}ERROR:{color} -1 due to no test(s) being added or modified. {color:red}ERROR:{color} -1 due to 15 failed/errored test(s), 10825 tests executed *Failed tests:* {noformat} TestDerbyConnector - did not produce a TEST-*.xml file (likely timed out) (batchId=234) TestVectorizedColumnReaderBase - did not produce a TEST-*.xml file (likely timed out) (batchId=251) org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[dbtxnmgr_showlocks] (batchId=71) org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[str_to_map] (batchId=58) org.apache.hadoop.hive.cli.TestMiniLlapCliDriver.testCliDriver[transform_ppr2] (batchId=135) org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[columnstats_part_coltype] (batchId=150) org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[stats_based_fetch_decision] (batchId=151) org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver[explainanalyze_2] (batchId=93) org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver[tez_union_with_udf] (batchId=93) org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver[vectorization_div0] (batchId=93) org.apache.hadoop.hive.cli.TestNegativeCliDriver.testCliDriver[exchange_partition_neg_incomplete_partition] (batchId=84) org.apache.hadoop.hive.cli.TestNegativeCliDriver.testCliDriver[exim_00_unsupported_schema] (batchId=85) org.apache.hadoop.hive.cli.TestPerfCliDriver.testCliDriver[query36] (batchId=222) org.apache.hadoop.hive.cli.TestPerfCliDriver.testCliDriver[query70] (batchId=222) org.apache.hadoop.hive.cli.TestPerfCliDriver.testCliDriver[query86] (batchId=222) {noformat} Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/2661/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/2661/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-2661/ Messages: {noformat} Executing org.apache.hive.ptest.execution.TestCheckPhase Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests exited with: TestsFailedException: 15 tests failed {noformat} This message is automatically generated. ATTACHMENT ID: 12844150 - PreCommit-HIVE-Build > Hive on Tez - Hive Runtime Error while closing operators > > > Key: HIVE-15194 > URL: https://issues.apache.org/jira/browse/HIVE-15194 > Project: Hive > Issue Type: Bug > Components: Hive >Affects Versions: 2.1.0 > Environment: Hive 2.1.0 > Tez 0.8.4 > 4 Nodes x CentOS-6 x64 (32GB Memory, 8 CPUs) > Hadoop 2.7.1 >Reporter: Shankar M >Assignee: Wei Zheng > Attachments: HIVE-15194.1.patch > > > Please help me to solve below issue.. > -- > I am setting below commands in hive CLI: > set hive.execution.engine=tez; > set hive.vectorized.execution.enabled = true; > set hive.vectorized.execution.reduce.enabled = true; > set hive.cbo.enable=true; > set hive.compute.query.using.stats=true; > set hive.stats.fetch.column.stats=true; > set hive.stats.fetch.partition.stats=true; > SET hive.tez.container.size=4096; > SET hive.tez.java.opts=-Xmx3072m; > -- > {code} > hive> CREATE TABLE tmp_parquet_newtable STORED AS PARQUET AS > > select a.* from orc_very_large_table a where a.event = 1 and EXISTS > (SELECT 1 FROM tmp_small_parquet_table b WHERE b.session_id = a.session_id ) ; > Query ID = hadoop_20161114132930_65843cb3-557c-4b42-b662-2901caf5be2d > Total jobs = 1 > Launching Job 1 out of 1 > Status: Running (Executing on YARN cluster with App id > application_1479059955967_0049) > -- > VERTICES MODESTATUS TOTAL COMPLETED RUNNING PENDING > FAILED KILLED > -- > Map 1 . containerFAILED384 440 340 > 26 0 > Map 2 .. container SUCCEEDED 1 100 > 0 0 > -- > VERTICES: 01/02 [===>>---] 11% ELAPSED TIME: 43.76 s > >
[jira] [Commented] (HIVE-15194) Hive on Tez - Hive Runtime Error while closing operators
[ https://issues.apache.org/jira/browse/HIVE-15194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15765505#comment-15765505 ] Wei Zheng commented on HIVE-15194: -- OK I see what you're saying. In HashPartition.clear() we may have hashMapOnDisk being false, and hashMap being null at the same time, which we didn't guard in MapJoinOperator.closeOp. Please take a look at the attached patch. Thanks. > Hive on Tez - Hive Runtime Error while closing operators > > > Key: HIVE-15194 > URL: https://issues.apache.org/jira/browse/HIVE-15194 > Project: Hive > Issue Type: Bug > Components: Hive >Affects Versions: 2.1.0 > Environment: Hive 2.1.0 > Tez 0.8.4 > 4 Nodes x CentOS-6 x64 (32GB Memory, 8 CPUs) > Hadoop 2.7.1 >Reporter: Shankar M >Assignee: Wei Zheng > Attachments: HIVE-15194.1.patch > > > Please help me to solve below issue.. > -- > I am setting below commands in hive CLI: > set hive.execution.engine=tez; > set hive.vectorized.execution.enabled = true; > set hive.vectorized.execution.reduce.enabled = true; > set hive.cbo.enable=true; > set hive.compute.query.using.stats=true; > set hive.stats.fetch.column.stats=true; > set hive.stats.fetch.partition.stats=true; > SET hive.tez.container.size=4096; > SET hive.tez.java.opts=-Xmx3072m; > -- > {code} > hive> CREATE TABLE tmp_parquet_newtable STORED AS PARQUET AS > > select a.* from orc_very_large_table a where a.event = 1 and EXISTS > (SELECT 1 FROM tmp_small_parquet_table b WHERE b.session_id = a.session_id ) ; > Query ID = hadoop_20161114132930_65843cb3-557c-4b42-b662-2901caf5be2d > Total jobs = 1 > Launching Job 1 out of 1 > Status: Running (Executing on YARN cluster with App id > application_1479059955967_0049) > -- > VERTICES MODESTATUS TOTAL COMPLETED RUNNING PENDING > FAILED KILLED > -- > Map 1 . containerFAILED384 440 340 > 26 0 > Map 2 .. container SUCCEEDED 1 100 > 0 0 > -- > VERTICES: 01/02 [===>>---] 11% ELAPSED TIME: 43.76 s > > -- > Status: Failed > Vertex failed, vertexName=Map 1, vertexId=vertex_1479059955967_0049_2_01, > diagnostics=[Task failed, taskId=task_1479059955967_0049_2_01_48, > diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( > failure ) : > attempt_1479059955967_0049_2_01_48_0:java.lang.RuntimeException: > java.lang.RuntimeException: Hive Runtime Error while closing operators > at > org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:198) > at > org.apache.hadoop.hive.ql.exec.tez.TezProcessor.run(TezProcessor.java:160) > at > org.apache.tez.runtime.LogicalIOProcessorRuntimeTask.run(LogicalIOProcessorRuntimeTask.java:370) > at > org.apache.tez.runtime.task.TaskRunner2Callable$1.run(TaskRunner2Callable.java:73) > at > org.apache.tez.runtime.task.TaskRunner2Callable$1.run(TaskRunner2Callable.java:61) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657) > at > org.apache.tez.runtime.task.TaskRunner2Callable.callInternal(TaskRunner2Callable.java:61) > at > org.apache.tez.runtime.task.TaskRunner2Callable.callInternal(TaskRunner2Callable.java:37) > at org.apache.tez.common.CallableWithNdc.call(CallableWithNdc.java:36) > 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) > Caused by: java.lang.RuntimeException: Hive Runtime Error while closing > operators > at > org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.close(MapRecordProcessor.java:422) > at > org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:186) > ... 14 more > Caused by: java.lang.NullPointerException >
[jira] [Commented] (HIVE-15194) Hive on Tez - Hive Runtime Error while closing operators
[ https://issues.apache.org/jira/browse/HIVE-15194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15664858#comment-15664858 ] Gopal V commented on HIVE-15194: [~wzheng]: I don't see that happening for a clear() > Hive on Tez - Hive Runtime Error while closing operators > > > Key: HIVE-15194 > URL: https://issues.apache.org/jira/browse/HIVE-15194 > Project: Hive > Issue Type: Bug > Components: Hive, Tez >Affects Versions: 2.1.0 > Environment: Hive 2.1.0 > Tez 0.8.4 > 4 Nodes x CentOS-6 x64 (32GB Memory, 8 CPUs) > Hadoop 2.7.1 >Reporter: Shankar M > > Please help me to solve below issue.. > -- > I am setting below commands in hive CLI: > set hive.execution.engine=tez; > set hive.vectorized.execution.enabled = true; > set hive.vectorized.execution.reduce.enabled = true; > set hive.cbo.enable=true; > set hive.compute.query.using.stats=true; > set hive.stats.fetch.column.stats=true; > set hive.stats.fetch.partition.stats=true; > SET hive.tez.container.size=4096; > SET hive.tez.java.opts=-Xmx3072m; > -- > {code} > hive> CREATE TABLE tmp_parquet_newtable STORED AS PARQUET AS > > select a.* from orc_very_large_table a where a.event = 1 and EXISTS > (SELECT 1 FROM tmp_small_parquet_table b WHERE b.session_id = a.session_id ) ; > Query ID = hadoop_20161114132930_65843cb3-557c-4b42-b662-2901caf5be2d > Total jobs = 1 > Launching Job 1 out of 1 > Status: Running (Executing on YARN cluster with App id > application_1479059955967_0049) > -- > VERTICES MODESTATUS TOTAL COMPLETED RUNNING PENDING > FAILED KILLED > -- > Map 1 . containerFAILED384 440 340 > 26 0 > Map 2 .. container SUCCEEDED 1 100 > 0 0 > -- > VERTICES: 01/02 [===>>---] 11% ELAPSED TIME: 43.76 s > > -- > Status: Failed > Vertex failed, vertexName=Map 1, vertexId=vertex_1479059955967_0049_2_01, > diagnostics=[Task failed, taskId=task_1479059955967_0049_2_01_48, > diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( > failure ) : > attempt_1479059955967_0049_2_01_48_0:java.lang.RuntimeException: > java.lang.RuntimeException: Hive Runtime Error while closing operators > at > org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:198) > at > org.apache.hadoop.hive.ql.exec.tez.TezProcessor.run(TezProcessor.java:160) > at > org.apache.tez.runtime.LogicalIOProcessorRuntimeTask.run(LogicalIOProcessorRuntimeTask.java:370) > at > org.apache.tez.runtime.task.TaskRunner2Callable$1.run(TaskRunner2Callable.java:73) > at > org.apache.tez.runtime.task.TaskRunner2Callable$1.run(TaskRunner2Callable.java:61) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657) > at > org.apache.tez.runtime.task.TaskRunner2Callable.callInternal(TaskRunner2Callable.java:61) > at > org.apache.tez.runtime.task.TaskRunner2Callable.callInternal(TaskRunner2Callable.java:37) > at org.apache.tez.common.CallableWithNdc.call(CallableWithNdc.java:36) > 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) > Caused by: java.lang.RuntimeException: Hive Runtime Error while closing > operators > at > org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.close(MapRecordProcessor.java:422) > at > org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:186) > ... 14 more > Caused by: java.lang.NullPointerException > at > org.apache.hadoop.hive.ql.exec.MapJoinOperator.closeOp(MapJoinOperator.java:513) > at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:682) > at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:696) > at > o
[jira] [Commented] (HIVE-15194) Hive on Tez - Hive Runtime Error while closing operators
[ https://issues.apache.org/jira/browse/HIVE-15194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15664624#comment-15664624 ] Wei Zheng commented on HIVE-15194: -- Thanks [~gopalv] for the quick analysis. But I think it is either isHashMapOnDisk() is false or we have a in-memory hashmap {code} /* It may happen that there's not enough memory to instantiate a hashmap for the partition. * In that case, we don't create the hashmap, but pretend the hashmap is directly "spilled". */ public HashPartition(int initialCapacity, float loadFactor, int wbSize, long maxProbeSize, boolean createHashMap, String spillLocalDirs) { if (createHashMap) { // Probe space should be at least equal to the size of our designated wbSize maxProbeSize = Math.max(maxProbeSize, wbSize); hashMap = new BytesBytesMultiHashMap(initialCapacity, loadFactor, wbSize, maxProbeSize); } else { hashMapSpilledOnCreation = true; hashMapOnDisk = true; } this.spillLocalDirs = spillLocalDirs; this.initialCapacity = initialCapacity; this.loadFactor = loadFactor; this.wbSize = wbSize; } {code} [~ssmane3.tech] It will be helpful if you can attach the hive.log. Thanks. > Hive on Tez - Hive Runtime Error while closing operators > > > Key: HIVE-15194 > URL: https://issues.apache.org/jira/browse/HIVE-15194 > Project: Hive > Issue Type: Bug > Components: Hive, Tez >Affects Versions: 2.1.0 > Environment: Hive 2.1.0 > Tez 0.8.4 > 4 Nodes x CentOS-6 x64 (32GB Memory, 8 CPUs) > Hadoop 2.7.1 >Reporter: Shankar M > > Please help me to solve below issue.. > -- > I am setting below commands in hive CLI: > set hive.execution.engine=tez; > set hive.vectorized.execution.enabled = true; > set hive.vectorized.execution.reduce.enabled = true; > set hive.cbo.enable=true; > set hive.compute.query.using.stats=true; > set hive.stats.fetch.column.stats=true; > set hive.stats.fetch.partition.stats=true; > SET hive.tez.container.size=4096; > SET hive.tez.java.opts=-Xmx3072m; > -- > {code} > hive> CREATE TABLE tmp_parquet_newtable STORED AS PARQUET AS > > select a.* from orc_very_large_table a where a.event = 1 and EXISTS > (SELECT 1 FROM tmp_small_parquet_table b WHERE b.session_id = a.session_id ) ; > Query ID = hadoop_20161114132930_65843cb3-557c-4b42-b662-2901caf5be2d > Total jobs = 1 > Launching Job 1 out of 1 > Status: Running (Executing on YARN cluster with App id > application_1479059955967_0049) > -- > VERTICES MODESTATUS TOTAL COMPLETED RUNNING PENDING > FAILED KILLED > -- > Map 1 . containerFAILED384 440 340 > 26 0 > Map 2 .. container SUCCEEDED 1 100 > 0 0 > -- > VERTICES: 01/02 [===>>---] 11% ELAPSED TIME: 43.76 s > > -- > Status: Failed > Vertex failed, vertexName=Map 1, vertexId=vertex_1479059955967_0049_2_01, > diagnostics=[Task failed, taskId=task_1479059955967_0049_2_01_48, > diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( > failure ) : > attempt_1479059955967_0049_2_01_48_0:java.lang.RuntimeException: > java.lang.RuntimeException: Hive Runtime Error while closing operators > at > org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:198) > at > org.apache.hadoop.hive.ql.exec.tez.TezProcessor.run(TezProcessor.java:160) > at > org.apache.tez.runtime.LogicalIOProcessorRuntimeTask.run(LogicalIOProcessorRuntimeTask.java:370) > at > org.apache.tez.runtime.task.TaskRunner2Callable$1.run(TaskRunner2Callable.java:73) > at > org.apache.tez.runtime.task.TaskRunner2Callable$1.run(TaskRunner2Callable.java:61) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657) > at > org.apache.tez.runtime.task.TaskRunner2Callable.callInternal(TaskRunner2Callable.java:61) > at > org.apache.tez.runtime.task.TaskRunner2Call
[jira] [Commented] (HIVE-15194) Hive on Tez - Hive Runtime Error while closing operators
[ https://issues.apache.org/jira/browse/HIVE-15194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15663871#comment-15663871 ] Shankar M commented on HIVE-15194: -- Thanks you very much. It is much needed help. And i hope patch given will be included in future versions. > Hive on Tez - Hive Runtime Error while closing operators > > > Key: HIVE-15194 > URL: https://issues.apache.org/jira/browse/HIVE-15194 > Project: Hive > Issue Type: Bug > Components: Hive, Tez >Affects Versions: 2.1.0 > Environment: Hive 2.1.0 > Tez 0.8.4 > 4 Nodes x CentOS-6 x64 (32GB Memory, 8 CPUs) > Hadoop 2.7.1 >Reporter: Shankar M > > Please help me to solve below issue.. > -- > I am setting below commands in hive CLI: > set hive.execution.engine=tez; > set hive.vectorized.execution.enabled = true; > set hive.vectorized.execution.reduce.enabled = true; > set hive.cbo.enable=true; > set hive.compute.query.using.stats=true; > set hive.stats.fetch.column.stats=true; > set hive.stats.fetch.partition.stats=true; > SET hive.tez.container.size=4096; > SET hive.tez.java.opts=-Xmx3072m; > -- > {code} > hive> CREATE TABLE tmp_parquet_newtable STORED AS PARQUET AS > > select a.* from orc_very_large_table a where a.event = 1 and EXISTS > (SELECT 1 FROM tmp_small_parquet_table b WHERE b.session_id = a.session_id ) ; > Query ID = hadoop_20161114132930_65843cb3-557c-4b42-b662-2901caf5be2d > Total jobs = 1 > Launching Job 1 out of 1 > Status: Running (Executing on YARN cluster with App id > application_1479059955967_0049) > -- > VERTICES MODESTATUS TOTAL COMPLETED RUNNING PENDING > FAILED KILLED > -- > Map 1 . containerFAILED384 440 340 > 26 0 > Map 2 .. container SUCCEEDED 1 100 > 0 0 > -- > VERTICES: 01/02 [===>>---] 11% ELAPSED TIME: 43.76 s > > -- > Status: Failed > Vertex failed, vertexName=Map 1, vertexId=vertex_1479059955967_0049_2_01, > diagnostics=[Task failed, taskId=task_1479059955967_0049_2_01_48, > diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( > failure ) : > attempt_1479059955967_0049_2_01_48_0:java.lang.RuntimeException: > java.lang.RuntimeException: Hive Runtime Error while closing operators > at > org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:198) > at > org.apache.hadoop.hive.ql.exec.tez.TezProcessor.run(TezProcessor.java:160) > at > org.apache.tez.runtime.LogicalIOProcessorRuntimeTask.run(LogicalIOProcessorRuntimeTask.java:370) > at > org.apache.tez.runtime.task.TaskRunner2Callable$1.run(TaskRunner2Callable.java:73) > at > org.apache.tez.runtime.task.TaskRunner2Callable$1.run(TaskRunner2Callable.java:61) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657) > at > org.apache.tez.runtime.task.TaskRunner2Callable.callInternal(TaskRunner2Callable.java:61) > at > org.apache.tez.runtime.task.TaskRunner2Callable.callInternal(TaskRunner2Callable.java:37) > at org.apache.tez.common.CallableWithNdc.call(CallableWithNdc.java:36) > 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) > Caused by: java.lang.RuntimeException: Hive Runtime Error while closing > operators > at > org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.close(MapRecordProcessor.java:422) > at > org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:186) > ... 14 more > Caused by: java.lang.NullPointerException > at > org.apache.hadoop.hive.ql.exec.MapJoinOperator.closeOp(MapJoinOperator.java:513) > at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:682) > at org.apache.hadoop.hi
[jira] [Commented] (HIVE-15194) Hive on Tez - Hive Runtime Error while closing operators
[ https://issues.apache.org/jira/browse/HIVE-15194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15663857#comment-15663857 ] Gopal V commented on HIVE-15194: I recommend trying out the following patch, but it is untested as of now {code} diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java index 416606e..b6df123 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java @@ -520,7 +520,8 @@ public void closeOp(boolean abort) throws HiveException { HashPartition[] hashPartitions = hybridHtContainer.getHashPartitions(); // Clear all in memory partitions first for (int i = 0; i < hashPartitions.length; i++) { -if (!hashPartitions[i].isHashMapOnDisk()) { +if (!hashPartitions[i].isHashMapOnDisk() +&& hashPartitions[i].getHashMapFromMemory() != null) { hybridHtContainer.setTotalInMemRowCount( hybridHtContainer.getTotalInMemRowCount() - hashPartitions[i].getHashMapFromMemory().getNumValues()); {code} > Hive on Tez - Hive Runtime Error while closing operators > > > Key: HIVE-15194 > URL: https://issues.apache.org/jira/browse/HIVE-15194 > Project: Hive > Issue Type: Bug > Components: Hive, Tez >Affects Versions: 2.1.0 > Environment: Hive 2.1.0 > Tez 0.8.4 > 4 Nodes x CentOS-6 x64 (32GB Memory, 8 CPUs) > Hadoop 2.7.1 >Reporter: Shankar M > > Please help me to solve below issue.. > -- > I am setting below commands in hive CLI: > set hive.execution.engine=tez; > set hive.vectorized.execution.enabled = true; > set hive.vectorized.execution.reduce.enabled = true; > set hive.cbo.enable=true; > set hive.compute.query.using.stats=true; > set hive.stats.fetch.column.stats=true; > set hive.stats.fetch.partition.stats=true; > SET hive.tez.container.size=4096; > SET hive.tez.java.opts=-Xmx3072m; > -- > {code} > hive> CREATE TABLE tmp_parquet_newtable STORED AS PARQUET AS > > select a.* from orc_very_large_table a where a.event = 1 and EXISTS > (SELECT 1 FROM tmp_small_parquet_table b WHERE b.session_id = a.session_id ) ; > Query ID = hadoop_20161114132930_65843cb3-557c-4b42-b662-2901caf5be2d > Total jobs = 1 > Launching Job 1 out of 1 > Status: Running (Executing on YARN cluster with App id > application_1479059955967_0049) > -- > VERTICES MODESTATUS TOTAL COMPLETED RUNNING PENDING > FAILED KILLED > -- > Map 1 . containerFAILED384 440 340 > 26 0 > Map 2 .. container SUCCEEDED 1 100 > 0 0 > -- > VERTICES: 01/02 [===>>---] 11% ELAPSED TIME: 43.76 s > > -- > Status: Failed > Vertex failed, vertexName=Map 1, vertexId=vertex_1479059955967_0049_2_01, > diagnostics=[Task failed, taskId=task_1479059955967_0049_2_01_48, > diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( > failure ) : > attempt_1479059955967_0049_2_01_48_0:java.lang.RuntimeException: > java.lang.RuntimeException: Hive Runtime Error while closing operators > at > org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:198) > at > org.apache.hadoop.hive.ql.exec.tez.TezProcessor.run(TezProcessor.java:160) > at > org.apache.tez.runtime.LogicalIOProcessorRuntimeTask.run(LogicalIOProcessorRuntimeTask.java:370) > at > org.apache.tez.runtime.task.TaskRunner2Callable$1.run(TaskRunner2Callable.java:73) > at > org.apache.tez.runtime.task.TaskRunner2Callable$1.run(TaskRunner2Callable.java:61) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657) > at > org.apache.tez.runtime.task.TaskRunner2Callable.callInternal(TaskRunner2Callable.java:61) > at > org.apache.tez.runtime.task.TaskRunner2Callable.callInternal(Task
[jira] [Commented] (HIVE-15194) Hive on Tez - Hive Runtime Error while closing operators
[ https://issues.apache.org/jira/browse/HIVE-15194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15663851#comment-15663851 ] Gopal V commented on HIVE-15194: Looks like the first partition on your join is > the threshold for spilling. {code} if (i == 0) { // We unconditionally create a hashmap for the first hash partition hashPartitions[i] = new HashPartition(initialCapacity, loadFactor, writeBufferSize, maxCapacity, true, spillLocalDirs); LOG.info("Each new partition will require memory: " + hashPartitions[0].hashMap.memorySize()); } else { // To check whether we have enough memory to allocate for another hash partition, // we need to get the size of the first hash partition to get an idea. hashPartitions[i] = new HashPartition(initialCapacity, loadFactor, writeBufferSize, maxCapacity, memoryUsed + hashPartitions[0].hashMap.memorySize() < memoryThreshold, spillLocalDirs); } {code} while the closeOp() does not handle that scenario where {{memoryUsed + hashPartitions[0].hashMap.memorySize() < memoryThreshold}} is false. {code} hybridHtContainer.setTotalInMemRowCount( hybridHtContainer.getTotalInMemRowCount() - hashPartitions[i].getHashMapFromMemory().getNumValues()); hashPartitions[i].getHashMapFromMemory().clear(); {code} Where {{hashPartitions[i].getHashMapFromMemory() == null}}. Cc: [~wzheng] > Hive on Tez - Hive Runtime Error while closing operators > > > Key: HIVE-15194 > URL: https://issues.apache.org/jira/browse/HIVE-15194 > Project: Hive > Issue Type: Bug > Components: Hive, Tez >Affects Versions: 2.1.0 > Environment: Hive 2.1.0 > Tez 0.8.4 > 4 Nodes x CentOS-6 x64 (32GB Memory, 8 CPUs) > Hadoop 2.7.1 >Reporter: Shankar M > > Please help me to solve below issue.. > -- > I am setting below commands in hive CLI: > set hive.execution.engine=tez; > set hive.vectorized.execution.enabled = true; > set hive.vectorized.execution.reduce.enabled = true; > set hive.cbo.enable=true; > set hive.compute.query.using.stats=true; > set hive.stats.fetch.column.stats=true; > set hive.stats.fetch.partition.stats=true; > SET hive.tez.container.size=4096; > SET hive.tez.java.opts=-Xmx3072m; > -- > {code} > hive> CREATE TABLE tmp_parquet_newtable STORED AS PARQUET AS > > select a.* from orc_very_large_table a where a.event = 1 and EXISTS > (SELECT 1 FROM tmp_small_parquet_table b WHERE b.session_id = a.session_id ) ; > Query ID = hadoop_20161114132930_65843cb3-557c-4b42-b662-2901caf5be2d > Total jobs = 1 > Launching Job 1 out of 1 > Status: Running (Executing on YARN cluster with App id > application_1479059955967_0049) > -- > VERTICES MODESTATUS TOTAL COMPLETED RUNNING PENDING > FAILED KILLED > -- > Map 1 . containerFAILED384 440 340 > 26 0 > Map 2 .. container SUCCEEDED 1 100 > 0 0 > -- > VERTICES: 01/02 [===>>---] 11% ELAPSED TIME: 43.76 s > > -- > Status: Failed > Vertex failed, vertexName=Map 1, vertexId=vertex_1479059955967_0049_2_01, > diagnostics=[Task failed, taskId=task_1479059955967_0049_2_01_48, > diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( > failure ) : > attempt_1479059955967_0049_2_01_48_0:java.lang.RuntimeException: > java.lang.RuntimeException: Hive Runtime Error while closing operators > at > org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:198) > at > org.apache.hadoop.hive.ql.exec.tez.TezProcessor.run(TezProcessor.java:160) > at > org.apache.tez.runtime.LogicalIOProcessorRuntimeTask.run(LogicalIOProcessorRuntimeTask.java:370) > at > org.apache.tez.runtime.task.TaskRunner2Callable$1.run(TaskRunner2Callable.java:73) > at > org.apache.tez.runtime.task.TaskRunner2Callable$1.run(TaskRunner2Callable.java:61) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422)
[jira] [Commented] (HIVE-15194) Hive on Tez - Hive Runtime Error while closing operators
[ https://issues.apache.org/jira/browse/HIVE-15194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15663835#comment-15663835 ] Shankar M commented on HIVE-15194: -- [~gopalv] Setting it to false solved my problem. Thanks. Also I more interested in what is happening in this case "hive.mapjoin.hybridgrace.hashtable" ? > Hive on Tez - Hive Runtime Error while closing operators > > > Key: HIVE-15194 > URL: https://issues.apache.org/jira/browse/HIVE-15194 > Project: Hive > Issue Type: Bug > Components: Hive, Tez >Affects Versions: 2.1.0 > Environment: Hive 2.1.0 > Tez 0.8.4 > 4 Nodes x CentOS-6 x64 (32GB Memory, 8 CPUs) > Hadoop 2.7.1 >Reporter: Shankar M > > Please help me to solve below issue.. > -- > I am setting below commands in hive CLI: > set hive.execution.engine=tez; > set hive.vectorized.execution.enabled = true; > set hive.vectorized.execution.reduce.enabled = true; > set hive.cbo.enable=true; > set hive.compute.query.using.stats=true; > set hive.stats.fetch.column.stats=true; > set hive.stats.fetch.partition.stats=true; > SET hive.tez.container.size=4096; > SET hive.tez.java.opts=-Xmx3072m; > -- > {code} > hive> CREATE TABLE tmp_parquet_newtable STORED AS PARQUET AS > > select a.* from orc_very_large_table a where a.event = 1 and EXISTS > (SELECT 1 FROM tmp_small_parquet_table b WHERE b.session_id = a.session_id ) ; > Query ID = hadoop_20161114132930_65843cb3-557c-4b42-b662-2901caf5be2d > Total jobs = 1 > Launching Job 1 out of 1 > Status: Running (Executing on YARN cluster with App id > application_1479059955967_0049) > -- > VERTICES MODESTATUS TOTAL COMPLETED RUNNING PENDING > FAILED KILLED > -- > Map 1 . containerFAILED384 440 340 > 26 0 > Map 2 .. container SUCCEEDED 1 100 > 0 0 > -- > VERTICES: 01/02 [===>>---] 11% ELAPSED TIME: 43.76 s > > -- > Status: Failed > Vertex failed, vertexName=Map 1, vertexId=vertex_1479059955967_0049_2_01, > diagnostics=[Task failed, taskId=task_1479059955967_0049_2_01_48, > diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( > failure ) : > attempt_1479059955967_0049_2_01_48_0:java.lang.RuntimeException: > java.lang.RuntimeException: Hive Runtime Error while closing operators > at > org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:198) > at > org.apache.hadoop.hive.ql.exec.tez.TezProcessor.run(TezProcessor.java:160) > at > org.apache.tez.runtime.LogicalIOProcessorRuntimeTask.run(LogicalIOProcessorRuntimeTask.java:370) > at > org.apache.tez.runtime.task.TaskRunner2Callable$1.run(TaskRunner2Callable.java:73) > at > org.apache.tez.runtime.task.TaskRunner2Callable$1.run(TaskRunner2Callable.java:61) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657) > at > org.apache.tez.runtime.task.TaskRunner2Callable.callInternal(TaskRunner2Callable.java:61) > at > org.apache.tez.runtime.task.TaskRunner2Callable.callInternal(TaskRunner2Callable.java:37) > at org.apache.tez.common.CallableWithNdc.call(CallableWithNdc.java:36) > 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) > Caused by: java.lang.RuntimeException: Hive Runtime Error while closing > operators > at > org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.close(MapRecordProcessor.java:422) > at > org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:186) > ... 14 more > Caused by: java.lang.NullPointerException > at > org.apache.hadoop.hive.ql.exec.MapJoinOperator.closeOp(MapJoinOperator.java:513) > at org.apache.hadoop.hive.ql.exec.Operator.close(Ope
[jira] [Commented] (HIVE-15194) Hive on Tez - Hive Runtime Error while closing operators
[ https://issues.apache.org/jira/browse/HIVE-15194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15663758#comment-15663758 ] Gopal V commented on HIVE-15194: [~ssmane3.tech]: most likely, this is caused by the hybrid hashtable. Can you try validating that disabling the hybrid join fixes this? {code} set hive.mapjoin.hybridgrace.hashtable=false; {code} > Hive on Tez - Hive Runtime Error while closing operators > > > Key: HIVE-15194 > URL: https://issues.apache.org/jira/browse/HIVE-15194 > Project: Hive > Issue Type: Bug > Components: Hive, Tez >Affects Versions: 2.1.0 > Environment: Hive 2.1.0 > Tez 0.8.4 > 4 Nodes x CentOS-6 x64 (32GB Memory, 8 CPUs) > Hadoop 2.7.1 >Reporter: Shankar M > > Please help me to solve below issue.. > -- > I am setting below commands in hive CLI: > set hive.execution.engine=tez; > set hive.vectorized.execution.enabled = true; > set hive.vectorized.execution.reduce.enabled = true; > set hive.cbo.enable=true; > set hive.compute.query.using.stats=true; > set hive.stats.fetch.column.stats=true; > set hive.stats.fetch.partition.stats=true; > SET hive.tez.container.size=4096; > SET hive.tez.java.opts=-Xmx3072m; > -- > {code} > hive> CREATE TABLE tmp_parquet_newtable STORED AS PARQUET AS > > select a.* from orc_very_large_table a where a.event = 1 and EXISTS > (SELECT 1 FROM tmp_small_parquet_table b WHERE b.session_id = a.session_id ) ; > Query ID = hadoop_20161114132930_65843cb3-557c-4b42-b662-2901caf5be2d > Total jobs = 1 > Launching Job 1 out of 1 > Status: Running (Executing on YARN cluster with App id > application_1479059955967_0049) > -- > VERTICES MODESTATUS TOTAL COMPLETED RUNNING PENDING > FAILED KILLED > -- > Map 1 . containerFAILED384 440 340 > 26 0 > Map 2 .. container SUCCEEDED 1 100 > 0 0 > -- > VERTICES: 01/02 [===>>---] 11% ELAPSED TIME: 43.76 s > > -- > Status: Failed > Vertex failed, vertexName=Map 1, vertexId=vertex_1479059955967_0049_2_01, > diagnostics=[Task failed, taskId=task_1479059955967_0049_2_01_48, > diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( > failure ) : > attempt_1479059955967_0049_2_01_48_0:java.lang.RuntimeException: > java.lang.RuntimeException: Hive Runtime Error while closing operators > at > org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:198) > at > org.apache.hadoop.hive.ql.exec.tez.TezProcessor.run(TezProcessor.java:160) > at > org.apache.tez.runtime.LogicalIOProcessorRuntimeTask.run(LogicalIOProcessorRuntimeTask.java:370) > at > org.apache.tez.runtime.task.TaskRunner2Callable$1.run(TaskRunner2Callable.java:73) > at > org.apache.tez.runtime.task.TaskRunner2Callable$1.run(TaskRunner2Callable.java:61) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657) > at > org.apache.tez.runtime.task.TaskRunner2Callable.callInternal(TaskRunner2Callable.java:61) > at > org.apache.tez.runtime.task.TaskRunner2Callable.callInternal(TaskRunner2Callable.java:37) > at org.apache.tez.common.CallableWithNdc.call(CallableWithNdc.java:36) > 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) > Caused by: java.lang.RuntimeException: Hive Runtime Error while closing > operators > at > org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.close(MapRecordProcessor.java:422) > at > org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:186) > ... 14 more > Caused by: java.lang.NullPointerException > at > org.apache.hadoop.hive.ql.exec.MapJoinOperator.closeOp(MapJoinOperator.java:513) > at org.apache