[jira] [Commented] (HIVE-17813) hive.exec.move.files.from.source.dir does not work with partitioned tables

2021-12-02 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-17813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17452691#comment-17452691
 ] 

Jason Dere commented on HIVE-17813:
---

Did a Hive Jira search for "hive.exec.move.files.from.source.dir" - looks like 
this setting was removed by HIVE-17963.

> hive.exec.move.files.from.source.dir does not work with partitioned tables
> --
>
> Key: HIVE-17813
> URL: https://issues.apache.org/jira/browse/HIVE-17813
> Project: Hive
>  Issue Type: Bug
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Fix For: 3.0.0
>
> Attachments: HIVE-17813.1.patch
>
>
> Setting hive.exec.move.files.from.source.dir=true causes data to not be moved 
> properly during inserts to partitioned tables.
> Looks like the file path checking in Utilties.moveSpecifiedFiles() needs to 
> recursively check into directories.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Updated] (HIVE-23972) Add external client ID to LLAP external client

2020-08-13 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-23972:
--
Fix Version/s: 4.0.0
   Resolution: Fixed
   Status: Resolved  (was: Patch Available)

Fix merged by [~prasanthj]

> Add external client ID to LLAP external client
> --
>
> Key: HIVE-23972
> URL: https://issues.apache.org/jira/browse/HIVE-23972
> Project: Hive
>  Issue Type: Bug
>  Components: llap
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
>  Labels: pull-request-available
> Fix For: 4.0.0
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> There currently is not a good way to tell which currently running LLAP tasks 
> are from external LLAP clients, and also no good way to know which 
> application is submitting these external LLAP requests.
> One possible solution for this is to add an option for the external LLAP 
> client to pass in an external client ID, which can get logged by HiveServer2 
> during the getSplits request, as well as displayed from the LLAP 
> executorsStatus.
> cc [~ShubhamChaurasia]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HIVE-23972) Add external client ID to LLAP external client

2020-08-13 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-23972:
--
Status: Patch Available  (was: Open)

> Add external client ID to LLAP external client
> --
>
> Key: HIVE-23972
> URL: https://issues.apache.org/jira/browse/HIVE-23972
> Project: Hive
>  Issue Type: Bug
>  Components: llap
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> There currently is not a good way to tell which currently running LLAP tasks 
> are from external LLAP clients, and also no good way to know which 
> application is submitting these external LLAP requests.
> One possible solution for this is to add an option for the external LLAP 
> client to pass in an external client ID, which can get logged by HiveServer2 
> during the getSplits request, as well as displayed from the LLAP 
> executorsStatus.
> cc [~ShubhamChaurasia]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (HIVE-23972) Add external client ID to LLAP external client

2020-07-31 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-23972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17169213#comment-17169213
 ] 

Jason Dere commented on HIVE-23972:
---

PR at https://github.com/apache/hive/pull/1350. [~ShubhamChaurasia] 
[~prasanthj], can you guys take a look?

> Add external client ID to LLAP external client
> --
>
> Key: HIVE-23972
> URL: https://issues.apache.org/jira/browse/HIVE-23972
> Project: Hive
>  Issue Type: Bug
>  Components: llap
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> There currently is not a good way to tell which currently running LLAP tasks 
> are from external LLAP clients, and also no good way to know which 
> application is submitting these external LLAP requests.
> One possible solution for this is to add an option for the external LLAP 
> client to pass in an external client ID, which can get logged by HiveServer2 
> during the getSplits request, as well as displayed from the LLAP 
> executorsStatus.
> cc [~ShubhamChaurasia]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Assigned] (HIVE-23972) Add external client ID to LLAP external client

2020-07-31 Thread Jason Dere (Jira)


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

Jason Dere reassigned HIVE-23972:
-


> Add external client ID to LLAP external client
> --
>
> Key: HIVE-23972
> URL: https://issues.apache.org/jira/browse/HIVE-23972
> Project: Hive
>  Issue Type: Bug
>  Components: llap
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
>
> There currently is not a good way to tell which currently running LLAP tasks 
> are from external LLAP clients, and also no good way to know which 
> application is submitting these external LLAP requests.
> One possible solution for this is to add an option for the external LLAP 
> client to pass in an external client ID, which can get logged by HiveServer2 
> during the getSplits request, as well as displayed from the LLAP 
> executorsStatus.
> cc [~ShubhamChaurasia]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (HIVE-23868) Windowing function spec: support 0 preceeding/following

2020-07-16 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-23868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17159558#comment-17159558
 ] 

Jason Dere commented on HIVE-23868:
---

Just saw your comment. Will take a look to see if the parser change is doable

> Windowing function spec: support 0 preceeding/following
> ---
>
> Key: HIVE-23868
> URL: https://issues.apache.org/jira/browse/HIVE-23868
> Project: Hive
>  Issue Type: Bug
>  Components: Query Planning
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
>  Labels: pull-request-available
> Attachments: HIVE-23868.1.patch
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> HIVE-12574 removed support for 0 PRECEDING/FOLLOWING in window function 
> specifications. We can restore support for this by converting 0 
> PRECEDING/FOLLOWING to CURRENT ROW in the query plan, which should be the 
> same.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (HIVE-23868) Windowing function spec: support 0 preceeding/following

2020-07-16 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-23868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17159556#comment-17159556
 ] 

Jason Dere commented on HIVE-23868:
---

PR at https://github.com/apache/hive/pull/1269

> Windowing function spec: support 0 preceeding/following
> ---
>
> Key: HIVE-23868
> URL: https://issues.apache.org/jira/browse/HIVE-23868
> Project: Hive
>  Issue Type: Bug
>  Components: Query Planning
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
>  Labels: pull-request-available
> Attachments: HIVE-23868.1.patch
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> HIVE-12574 removed support for 0 PRECEDING/FOLLOWING in window function 
> specifications. We can restore support for this by converting 0 
> PRECEDING/FOLLOWING to CURRENT ROW in the query plan, which should be the 
> same.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HIVE-23868) Windowing function spec: support 0 preceeding/following

2020-07-16 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-23868:
--
Status: Patch Available  (was: In Progress)

Attaching patch to convert 0 preceeding/following to current row.

cc [~jcamachorodriguez]

> Windowing function spec: support 0 preceeding/following
> ---
>
> Key: HIVE-23868
> URL: https://issues.apache.org/jira/browse/HIVE-23868
> Project: Hive
>  Issue Type: Bug
>  Components: Query Planning
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-23868.1.patch
>
>
> HIVE-12574 removed support for 0 PRECEDING/FOLLOWING in window function 
> specifications. We can restore support for this by converting 0 
> PRECEDING/FOLLOWING to CURRENT ROW in the query plan, which should be the 
> same.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work started] (HIVE-23868) Windowing function spec: support 0 preceeding/following

2020-07-16 Thread Jason Dere (Jira)


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

Work on HIVE-23868 started by Jason Dere.
-
> Windowing function spec: support 0 preceeding/following
> ---
>
> Key: HIVE-23868
> URL: https://issues.apache.org/jira/browse/HIVE-23868
> Project: Hive
>  Issue Type: Bug
>  Components: Query Planning
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-23868.1.patch
>
>
> HIVE-12574 removed support for 0 PRECEDING/FOLLOWING in window function 
> specifications. We can restore support for this by converting 0 
> PRECEDING/FOLLOWING to CURRENT ROW in the query plan, which should be the 
> same.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HIVE-23868) Windowing function spec: support 0 preceeding/following

2020-07-16 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-23868:
--
Attachment: HIVE-23868.1.patch

> Windowing function spec: support 0 preceeding/following
> ---
>
> Key: HIVE-23868
> URL: https://issues.apache.org/jira/browse/HIVE-23868
> Project: Hive
>  Issue Type: Bug
>  Components: Query Planning
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-23868.1.patch
>
>
> HIVE-12574 removed support for 0 PRECEDING/FOLLOWING in window function 
> specifications. We can restore support for this by converting 0 
> PRECEDING/FOLLOWING to CURRENT ROW in the query plan, which should be the 
> same.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Assigned] (HIVE-23868) Windowing function spec: support 0 preceeding/following

2020-07-16 Thread Jason Dere (Jira)


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

Jason Dere reassigned HIVE-23868:
-


> Windowing function spec: support 0 preceeding/following
> ---
>
> Key: HIVE-23868
> URL: https://issues.apache.org/jira/browse/HIVE-23868
> Project: Hive
>  Issue Type: Bug
>  Components: Query Planning
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
>
> HIVE-12574 removed support for 0 PRECEDING/FOLLOWING in window function 
> specifications. We can restore support for this by converting 0 
> PRECEDING/FOLLOWING to CURRENT ROW in the query plan, which should be the 
> same.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (HIVE-23612) Option for HiveStrictManagedMigration to impersonate a user for FS operations

2020-06-17 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-23612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17138822#comment-17138822
 ] 

Jason Dere commented on HIVE-23612:
---

+1

> Option for HiveStrictManagedMigration to impersonate a user for FS operations
> -
>
> Key: HIVE-23612
> URL: https://issues.apache.org/jira/browse/HIVE-23612
> Project: Hive
>  Issue Type: Improvement
>Reporter: Ádám Szita
>Assignee: Ádám Szita
>Priority: Major
>  Labels: pull-request-available
> Attachments: HIVE-23612.0.patch, HIVE-23612.1.patch
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> HiveStrictManagedMigration tool can be used to move HDFS paths and to change 
> ownership on said paths. It may be beneficial to do such file system 
> operations as a different user than the one the tool itself is run.
> Moreover, while creating the external DB directory, the tool will chown the 
> new directory to the user set as DB owner in HMS. If this is unset, no chown 
> command is used. In this case we should make the 'hive' user the directory 
> owner.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (HIVE-23612) Option for HiveStrictManagedMigration to impersonate a user for FS operations

2020-06-15 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-23612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17136278#comment-17136278
 ] 

Jason Dere commented on HIVE-23612:
---

I think this looks good. One suggestion - rather than hardcoding "hive" as the 
default owner in these changes, there is a setting 
"strict.managed.tables.migration.owner" that is used for the managed table 
owner .. you could use a similar setting 
"strict.external.tables.migration.owner" for this "unowned" tables user, with a 
default value of "hive". 

> Option for HiveStrictManagedMigration to impersonate a user for FS operations
> -
>
> Key: HIVE-23612
> URL: https://issues.apache.org/jira/browse/HIVE-23612
> Project: Hive
>  Issue Type: Improvement
>Reporter: Ádám Szita
>Assignee: Ádám Szita
>Priority: Major
> Attachments: HIVE-23612.0.patch, HIVE-23612.1.patch
>
>
> HiveStrictManagedMigration tool can be used to move HDFS paths and to change 
> ownership on said paths. It may be beneficial to do such file system 
> operations as a different user than the one the tool itself is run.
> Moreover, while creating the external DB directory, the tool will chown the 
> new directory to the user set as DB owner in HMS. If this is unset, no chown 
> command is used. In this case we should make the 'hive' user the directory 
> owner.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HIVE-23068) Error when submitting fragment to LLAP via external client: IllegalStateException: Only a single registration allowed per entity

2020-05-29 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-23068:
--
Fix Version/s: 4.0.0
   Resolution: Fixed
   Status: Resolved  (was: Patch Available)

Committed to master.

> Error when submitting fragment to LLAP via external client: 
> IllegalStateException: Only a single registration allowed per entity
> 
>
> Key: HIVE-23068
> URL: https://issues.apache.org/jira/browse/HIVE-23068
> Project: Hive
>  Issue Type: Bug
>  Components: llap
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Fix For: 4.0.0
>
> Attachments: HIVE-23068.1.patch, HIVE-23068.2.patch
>
>
> LLAP external client (via hive-warehouse-connector) somehow seems to be 
> sending duplicate submissions for the same fragment/attempt. When the 2nd 
> request is sent this results in the following error:
> {noformat}
> 2020-03-17T06:49:11,239 WARN  [IPC Server handler 2 on 15001 ()] 
> org.apache.hadoop.ipc.Server: IPC Server handler 2 on 15001, call Call#75 
> Retry#0 
> org.apache.hadoop.hive.llap.protocol.LlapProtocolBlockingPB.submitWork from 
> 19.40.252.114:33906
> java.lang.IllegalStateException: Only a single registration allowed per 
> entity. Duplicate for 
> TaskWrapper{task=attempt_1854104024183112753_6052_0_00_000128_1, 
> inWaitQueue=true, inPreemptionQueue=false, registeredForNotifications=true, 
> canFinish=true, canFinish(in queue)=true, isGuaranteed=false, 
> firstAttemptStartTime=1584442003327, dagStartTime=1584442003327, 
> withinDagPriority=0, vertexParallelism= 2132, selfAndUpstreamParallelism= 
> 2132, selfAndUpstreamComplete= 0}
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryInfo$FinishableStateTracker.registerForUpdates(QueryInfo.java:233)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryInfo.registerForFinishableStateUpdates(QueryInfo.java:205)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryFragmentInfo.registerForFinishableStateUpdates(QueryFragmentInfo.java:160)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService$TaskWrapper.maybeRegisterForFinishedStateNotifications(TaskExecutorService.java:1167)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService.schedule(TaskExecutorService.java:564)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService.schedule(TaskExecutorService.java:93)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.ContainerRunnerImpl.submitWork(ContainerRunnerImpl.java:292)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.LlapDaemon.submitWork(LlapDaemon.java:610)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.LlapProtocolServerImpl.submitWork(LlapProtocolServerImpl.java:122)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.rpc.LlapDaemonProtocolProtos$LlapDaemonProtocol$2.callBlockingMethod(LlapDaemonProtocolProtos.java:22695)
>  ~[hive-exec-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.32-1]
> at 
> org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:524)
>  ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1025) 
> ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:876) 
> ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:822) 
> ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at java.security.AccessController.doPrivileged(Native Method) 
> ~[?:1.8.0_191]
> at javax.security.auth.Subject.doAs(Subject.java:422) ~[?:1.8.0_191]
> at 
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1730)
>  ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2682) 
> ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> {noformat}
> I think the issue here is that this error occurred too late - based on the 
> stack trace, LLAP has already accepted/registered the fragment. The 
> subsequent cleanup of this fragment/attempt also affects the first request. 
> Which results in the LLAP crash described in HIVE-23061:
> {noformat}
> 

[jira] [Updated] (HIVE-23068) Error when submitting fragment to LLAP via external client: IllegalStateException: Only a single registration allowed per entity

2020-05-29 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-23068:
--
Attachment: HIVE-23068.2.patch

> Error when submitting fragment to LLAP via external client: 
> IllegalStateException: Only a single registration allowed per entity
> 
>
> Key: HIVE-23068
> URL: https://issues.apache.org/jira/browse/HIVE-23068
> Project: Hive
>  Issue Type: Bug
>  Components: llap
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-23068.1.patch, HIVE-23068.2.patch
>
>
> LLAP external client (via hive-warehouse-connector) somehow seems to be 
> sending duplicate submissions for the same fragment/attempt. When the 2nd 
> request is sent this results in the following error:
> {noformat}
> 2020-03-17T06:49:11,239 WARN  [IPC Server handler 2 on 15001 ()] 
> org.apache.hadoop.ipc.Server: IPC Server handler 2 on 15001, call Call#75 
> Retry#0 
> org.apache.hadoop.hive.llap.protocol.LlapProtocolBlockingPB.submitWork from 
> 19.40.252.114:33906
> java.lang.IllegalStateException: Only a single registration allowed per 
> entity. Duplicate for 
> TaskWrapper{task=attempt_1854104024183112753_6052_0_00_000128_1, 
> inWaitQueue=true, inPreemptionQueue=false, registeredForNotifications=true, 
> canFinish=true, canFinish(in queue)=true, isGuaranteed=false, 
> firstAttemptStartTime=1584442003327, dagStartTime=1584442003327, 
> withinDagPriority=0, vertexParallelism= 2132, selfAndUpstreamParallelism= 
> 2132, selfAndUpstreamComplete= 0}
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryInfo$FinishableStateTracker.registerForUpdates(QueryInfo.java:233)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryInfo.registerForFinishableStateUpdates(QueryInfo.java:205)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryFragmentInfo.registerForFinishableStateUpdates(QueryFragmentInfo.java:160)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService$TaskWrapper.maybeRegisterForFinishedStateNotifications(TaskExecutorService.java:1167)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService.schedule(TaskExecutorService.java:564)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService.schedule(TaskExecutorService.java:93)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.ContainerRunnerImpl.submitWork(ContainerRunnerImpl.java:292)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.LlapDaemon.submitWork(LlapDaemon.java:610)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.LlapProtocolServerImpl.submitWork(LlapProtocolServerImpl.java:122)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.rpc.LlapDaemonProtocolProtos$LlapDaemonProtocol$2.callBlockingMethod(LlapDaemonProtocolProtos.java:22695)
>  ~[hive-exec-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.32-1]
> at 
> org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:524)
>  ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1025) 
> ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:876) 
> ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:822) 
> ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at java.security.AccessController.doPrivileged(Native Method) 
> ~[?:1.8.0_191]
> at javax.security.auth.Subject.doAs(Subject.java:422) ~[?:1.8.0_191]
> at 
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1730)
>  ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2682) 
> ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> {noformat}
> I think the issue here is that this error occurred too late - based on the 
> stack trace, LLAP has already accepted/registered the fragment. The 
> subsequent cleanup of this fragment/attempt also affects the first request. 
> Which results in the LLAP crash described in HIVE-23061:
> {noformat}
> 2020-03-17T06:49:11,304 ERROR [ExecutionCompletionThread #0 ()] 
> org.apache.hadoop.hive.llap.daemon.impl.LlapDaemon: Thread 
> 

[jira] [Commented] (HIVE-23068) Error when submitting fragment to LLAP via external client: IllegalStateException: Only a single registration allowed per entity

2020-05-29 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-23068?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17119791#comment-17119791
 ] 

Jason Dere commented on HIVE-23068:
---

Not totally sure about what the fragment ID looks like during speculative 
execution, but I think the external client during some of its retry logic might 
be sending the same fragment ID (which it should not do).

I'll resubmit the patch to try to get a clean precommit run.

> Error when submitting fragment to LLAP via external client: 
> IllegalStateException: Only a single registration allowed per entity
> 
>
> Key: HIVE-23068
> URL: https://issues.apache.org/jira/browse/HIVE-23068
> Project: Hive
>  Issue Type: Bug
>  Components: llap
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-23068.1.patch
>
>
> LLAP external client (via hive-warehouse-connector) somehow seems to be 
> sending duplicate submissions for the same fragment/attempt. When the 2nd 
> request is sent this results in the following error:
> {noformat}
> 2020-03-17T06:49:11,239 WARN  [IPC Server handler 2 on 15001 ()] 
> org.apache.hadoop.ipc.Server: IPC Server handler 2 on 15001, call Call#75 
> Retry#0 
> org.apache.hadoop.hive.llap.protocol.LlapProtocolBlockingPB.submitWork from 
> 19.40.252.114:33906
> java.lang.IllegalStateException: Only a single registration allowed per 
> entity. Duplicate for 
> TaskWrapper{task=attempt_1854104024183112753_6052_0_00_000128_1, 
> inWaitQueue=true, inPreemptionQueue=false, registeredForNotifications=true, 
> canFinish=true, canFinish(in queue)=true, isGuaranteed=false, 
> firstAttemptStartTime=1584442003327, dagStartTime=1584442003327, 
> withinDagPriority=0, vertexParallelism= 2132, selfAndUpstreamParallelism= 
> 2132, selfAndUpstreamComplete= 0}
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryInfo$FinishableStateTracker.registerForUpdates(QueryInfo.java:233)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryInfo.registerForFinishableStateUpdates(QueryInfo.java:205)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryFragmentInfo.registerForFinishableStateUpdates(QueryFragmentInfo.java:160)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService$TaskWrapper.maybeRegisterForFinishedStateNotifications(TaskExecutorService.java:1167)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService.schedule(TaskExecutorService.java:564)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService.schedule(TaskExecutorService.java:93)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.ContainerRunnerImpl.submitWork(ContainerRunnerImpl.java:292)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.LlapDaemon.submitWork(LlapDaemon.java:610)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.LlapProtocolServerImpl.submitWork(LlapProtocolServerImpl.java:122)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.rpc.LlapDaemonProtocolProtos$LlapDaemonProtocol$2.callBlockingMethod(LlapDaemonProtocolProtos.java:22695)
>  ~[hive-exec-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.32-1]
> at 
> org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:524)
>  ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1025) 
> ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:876) 
> ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:822) 
> ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at java.security.AccessController.doPrivileged(Native Method) 
> ~[?:1.8.0_191]
> at javax.security.auth.Subject.doAs(Subject.java:422) ~[?:1.8.0_191]
> at 
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1730)
>  ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2682) 
> ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> {noformat}
> I think the issue here is that this error occurred too late - based on the 
> stack trace, LLAP has already accepted/registered the fragment. The 
> subsequent cleanup of this 

[jira] [Resolved] (HIVE-23061) LLAP crash due to unhandled exception: Cannot invoke unregister on an entity which has not been registered

2020-05-28 Thread Jason Dere (Jira)


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

Jason Dere resolved HIVE-23061.
---
Resolution: Duplicate

> LLAP crash due to unhandled exception: Cannot invoke unregister on an entity 
> which has not been registered
> --
>
> Key: HIVE-23061
> URL: https://issues.apache.org/jira/browse/HIVE-23061
> Project: Hive
>  Issue Type: Bug
>  Components: llap
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-23061.1.patch
>
>
> The following exception goes uncaught and causes the entire LLAP daemon to 
> shut down:
> {noformat}
> 2020-03-17T06:49:11,304 ERROR [ExecutionCompletionThread #0 ()] 
> org.apache.hadoop.hive.llap.daemon.impl.LlapDaemon: Thread 
> Thread[ExecutionCompletionThread #0,5,main] threw an Exception. Shutting down 
> now...
> java.lang.IllegalStateException: Cannot invoke unregister on an entity which 
> has not been registered
> at 
> com.google.common.base.Preconditions.checkState(Preconditions.java:508) 
> ~[hive-exec-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.32-1]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryInfo$FinishableStateTracker.unregisterForUpdates(QueryInfo.java:256)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryInfo.unregisterFinishableStateUpdate(QueryInfo.java:209)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryFragmentInfo.unregisterForFinishableStateUpdates(QueryFragmentInfo.java:166)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService$TaskWrapper.maybeUnregisterForFinishedStateNotifications(TaskExecutorService.java:1177)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService$InternalCompletionListener.onSuccess(TaskExecutorService.java:980)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService$InternalCompletionListener.onSuccess(TaskExecutorService.java:944)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> com.google.common.util.concurrent.Futures$CallbackListener.run(Futures.java:1021)
>  ~[hive-exec-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.32-1]
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>  ~[?:1.8.0_191]
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>  ~[?:1.8.0_191]
> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_191]
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HIVE-23061) LLAP crash due to unhandled exception: Cannot invoke unregister on an entity which has not been registered

2020-05-28 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-23061:
--
Status: Open  (was: Patch Available)

Cancelling this proposed fix in favor of HIVE-23068

> LLAP crash due to unhandled exception: Cannot invoke unregister on an entity 
> which has not been registered
> --
>
> Key: HIVE-23061
> URL: https://issues.apache.org/jira/browse/HIVE-23061
> Project: Hive
>  Issue Type: Bug
>  Components: llap
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-23061.1.patch
>
>
> The following exception goes uncaught and causes the entire LLAP daemon to 
> shut down:
> {noformat}
> 2020-03-17T06:49:11,304 ERROR [ExecutionCompletionThread #0 ()] 
> org.apache.hadoop.hive.llap.daemon.impl.LlapDaemon: Thread 
> Thread[ExecutionCompletionThread #0,5,main] threw an Exception. Shutting down 
> now...
> java.lang.IllegalStateException: Cannot invoke unregister on an entity which 
> has not been registered
> at 
> com.google.common.base.Preconditions.checkState(Preconditions.java:508) 
> ~[hive-exec-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.32-1]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryInfo$FinishableStateTracker.unregisterForUpdates(QueryInfo.java:256)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryInfo.unregisterFinishableStateUpdate(QueryInfo.java:209)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryFragmentInfo.unregisterForFinishableStateUpdates(QueryFragmentInfo.java:166)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService$TaskWrapper.maybeUnregisterForFinishedStateNotifications(TaskExecutorService.java:1177)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService$InternalCompletionListener.onSuccess(TaskExecutorService.java:980)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService$InternalCompletionListener.onSuccess(TaskExecutorService.java:944)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> com.google.common.util.concurrent.Futures$CallbackListener.run(Futures.java:1021)
>  ~[hive-exec-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.32-1]
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>  ~[?:1.8.0_191]
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>  ~[?:1.8.0_191]
> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_191]
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HIVE-23068) Error when submitting fragment to LLAP via external client: IllegalStateException: Only a single registration allowed per entity

2020-05-28 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-23068:
--
Status: Patch Available  (was: Open)

[~prasanthj] would you be able to review this patch? This is a more specific 
fix than HIVE-23061 which does seem to help

> Error when submitting fragment to LLAP via external client: 
> IllegalStateException: Only a single registration allowed per entity
> 
>
> Key: HIVE-23068
> URL: https://issues.apache.org/jira/browse/HIVE-23068
> Project: Hive
>  Issue Type: Bug
>  Components: llap
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-23068.1.patch
>
>
> LLAP external client (via hive-warehouse-connector) somehow seems to be 
> sending duplicate submissions for the same fragment/attempt. When the 2nd 
> request is sent this results in the following error:
> {noformat}
> 2020-03-17T06:49:11,239 WARN  [IPC Server handler 2 on 15001 ()] 
> org.apache.hadoop.ipc.Server: IPC Server handler 2 on 15001, call Call#75 
> Retry#0 
> org.apache.hadoop.hive.llap.protocol.LlapProtocolBlockingPB.submitWork from 
> 19.40.252.114:33906
> java.lang.IllegalStateException: Only a single registration allowed per 
> entity. Duplicate for 
> TaskWrapper{task=attempt_1854104024183112753_6052_0_00_000128_1, 
> inWaitQueue=true, inPreemptionQueue=false, registeredForNotifications=true, 
> canFinish=true, canFinish(in queue)=true, isGuaranteed=false, 
> firstAttemptStartTime=1584442003327, dagStartTime=1584442003327, 
> withinDagPriority=0, vertexParallelism= 2132, selfAndUpstreamParallelism= 
> 2132, selfAndUpstreamComplete= 0}
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryInfo$FinishableStateTracker.registerForUpdates(QueryInfo.java:233)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryInfo.registerForFinishableStateUpdates(QueryInfo.java:205)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryFragmentInfo.registerForFinishableStateUpdates(QueryFragmentInfo.java:160)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService$TaskWrapper.maybeRegisterForFinishedStateNotifications(TaskExecutorService.java:1167)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService.schedule(TaskExecutorService.java:564)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService.schedule(TaskExecutorService.java:93)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.ContainerRunnerImpl.submitWork(ContainerRunnerImpl.java:292)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.LlapDaemon.submitWork(LlapDaemon.java:610)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.LlapProtocolServerImpl.submitWork(LlapProtocolServerImpl.java:122)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.rpc.LlapDaemonProtocolProtos$LlapDaemonProtocol$2.callBlockingMethod(LlapDaemonProtocolProtos.java:22695)
>  ~[hive-exec-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.32-1]
> at 
> org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:524)
>  ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1025) 
> ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:876) 
> ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:822) 
> ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at java.security.AccessController.doPrivileged(Native Method) 
> ~[?:1.8.0_191]
> at javax.security.auth.Subject.doAs(Subject.java:422) ~[?:1.8.0_191]
> at 
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1730)
>  ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2682) 
> ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> {noformat}
> I think the issue here is that this error occurred too late - based on the 
> stack trace, LLAP has already accepted/registered the fragment. The 
> subsequent cleanup of this fragment/attempt also affects the first request. 
> Which results in the LLAP crash described in HIVE-23061:
> {noformat}
> 2020-03-17T06:49:11,304 ERROR 

[jira] [Commented] (HIVE-22967) Support hive.reloadable.aux.jars.path for Hive on Tez

2020-05-08 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-22967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17102709#comment-17102709
 ] 

Jason Dere commented on HIVE-22967:
---

I think this makes sense. +1

> Support hive.reloadable.aux.jars.path for Hive on Tez
> -
>
> Key: HIVE-22967
> URL: https://issues.apache.org/jira/browse/HIVE-22967
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 3.1.2, 2.3.6
>Reporter: Toshihiko Uchida
>Assignee: Toshihiko Uchida
>Priority: Minor
> Attachments: HIVE-22967.1.patch, HIVE-22967.2.patch
>
>
> The jars in hive.reloadable.aux.jars.path are not localized in Tez containers.
> As a result, any query utilizing those reloadable jars fails for Hive on Tez 
> due to ClassNotFoundException.
> {code}
> Error: Error while processing statement: FAILED: Execution Error, return code 
> 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, 
> vertexName=Map 1, vertexId=vertex_1578856704640_0087_1_00, diagnostics=[Task 
> failed, taskId=task_1578856704640_0087_1_00_01, diagnostics=[TaskAttempt 
> 0 failed, info=[Error: Error while running task ( failure) : 
> attempt_1578856704640_0087_1_00_01_0:java.lang.RuntimeException: 
> java.lang.RuntimeException: Map operator initialization failed
> at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:296)
> at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.run(TezProcessor.java:250)
> at 
> org.apache.tez.runtime.LogicalIOProcessorRuntimeTask.run(LogicalIOProcessorRuntimeTask.java:374)
> 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:1729)
> 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 
> com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:108)
> at 
> com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:41)
> at 
> com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:77)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.RuntimeException: Map operator initialization failed
> at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.init(MapRecordProcessor.java:354)
> at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:266)
> ... 16 more
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: 
> java.lang.RuntimeException: java.lang.ClassNotFoundException: 
> com.example.hive.udf.Lower
> at 
> org.apache.hadoop.hive.ql.exec.FilterOperator.initializeOp(FilterOperator.java:71)
> at 
> org.apache.hadoop.hive.ql.exec.vector.VectorFilterOperator.initializeOp(VectorFilterOperator.java:83)
> at 
> org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:376)
> at 
> org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:573)
> at 
> org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:525)
> at 
> org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:386)
> at 
> org.apache.hadoop.hive.ql.exec.vector.VectorMapOperator.initializeMapOperator(VectorMapOperator.java:591)
> at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.init(MapRecordProcessor.java:317)
> ... 17 more
> Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: 
> com.example.hive.udf.Lower
> at 
> org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge.getUdfClass(GenericUDFBridge.java:134)
> at 
> org.apache.hadoop.hive.ql.exec.FunctionRegistry.isStateful(FunctionRegistry.java:1492)
> at 
> org.apache.hadoop.hive.ql.exec.ExprNodeGenericFuncEvaluator.(ExprNodeGenericFuncEvaluator.java:111)
> at 
> org.apache.hadoop.hive.ql.exec.ExprNodeEvaluatorFactory.get(ExprNodeEvaluatorFactory.java:58)
> at 
> 

[jira] [Commented] (HIVE-23295) Possible NPE when on getting predicate literal list when dynamic values are not available

2020-04-27 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-23295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17093967#comment-17093967
 ] 

Jason Dere commented on HIVE-23295:
---

+1

> Possible NPE when on getting predicate literal list when dynamic values are 
> not available
> -
>
> Key: HIVE-23295
> URL: https://issues.apache.org/jira/browse/HIVE-23295
> Project: Hive
>  Issue Type: Bug
>  Components: storage-api
>Reporter: Attila Magyar
>Assignee: Attila Magyar
>Priority: Major
> Fix For: 4.0.0
>
> Attachments: HIVE-23295.1.patch
>
>
> getLiteralList() in SearchArgumentImpl$PredicateLeafImpl returns null if 
> dynamic values are not available.
> {code:java}
> @Override
> public List getLiteralList() {
>   if (literalList != null && literalList.size() > 0 && literalList.get(0) 
> instanceof LiteralDelegate) {
> List newLiteraList = new ArrayList();
> try {
>   for (Object litertalObj : literalList) {
> Object literal = ((LiteralDelegate) litertalObj).getLiteral();
> if (literal != null) {
>   newLiteraList.add(literal);
> }
>   }
> } catch (NoDynamicValuesException err) {
>   LOG.debug("Error while retrieving literalList, returning null", err);
>   return null;
> }
> return newLiteraList;
>   }
>   return literalList;
> } {code}
>  
> There are multiple call sites where the return value is used without a null 
> check. E.g:  leaf.getLiteralList().stream(). 
>  
> The return null was added as part of HIVE-18827 to avoid having an 
> unimportant warning message when dynamic values have not been delivered yet.
>  
> [~sershe], [~jdere], I propose return an empty list instead of null in a case 
> like this. What do you think?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HIVE-23068) Error when submitting fragment to LLAP via external client: IllegalStateException: Only a single registration allowed per entity

2020-03-23 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-23068:
--
Attachment: HIVE-23068.1.patch

> Error when submitting fragment to LLAP via external client: 
> IllegalStateException: Only a single registration allowed per entity
> 
>
> Key: HIVE-23068
> URL: https://issues.apache.org/jira/browse/HIVE-23068
> Project: Hive
>  Issue Type: Bug
>  Components: llap
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-23068.1.patch
>
>
> LLAP external client (via hive-warehouse-connector) somehow seems to be 
> sending duplicate submissions for the same fragment/attempt. When the 2nd 
> request is sent this results in the following error:
> {noformat}
> 2020-03-17T06:49:11,239 WARN  [IPC Server handler 2 on 15001 ()] 
> org.apache.hadoop.ipc.Server: IPC Server handler 2 on 15001, call Call#75 
> Retry#0 
> org.apache.hadoop.hive.llap.protocol.LlapProtocolBlockingPB.submitWork from 
> 19.40.252.114:33906
> java.lang.IllegalStateException: Only a single registration allowed per 
> entity. Duplicate for 
> TaskWrapper{task=attempt_1854104024183112753_6052_0_00_000128_1, 
> inWaitQueue=true, inPreemptionQueue=false, registeredForNotifications=true, 
> canFinish=true, canFinish(in queue)=true, isGuaranteed=false, 
> firstAttemptStartTime=1584442003327, dagStartTime=1584442003327, 
> withinDagPriority=0, vertexParallelism= 2132, selfAndUpstreamParallelism= 
> 2132, selfAndUpstreamComplete= 0}
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryInfo$FinishableStateTracker.registerForUpdates(QueryInfo.java:233)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryInfo.registerForFinishableStateUpdates(QueryInfo.java:205)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryFragmentInfo.registerForFinishableStateUpdates(QueryFragmentInfo.java:160)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService$TaskWrapper.maybeRegisterForFinishedStateNotifications(TaskExecutorService.java:1167)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService.schedule(TaskExecutorService.java:564)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService.schedule(TaskExecutorService.java:93)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.ContainerRunnerImpl.submitWork(ContainerRunnerImpl.java:292)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.LlapDaemon.submitWork(LlapDaemon.java:610)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.LlapProtocolServerImpl.submitWork(LlapProtocolServerImpl.java:122)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.rpc.LlapDaemonProtocolProtos$LlapDaemonProtocol$2.callBlockingMethod(LlapDaemonProtocolProtos.java:22695)
>  ~[hive-exec-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.32-1]
> at 
> org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:524)
>  ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1025) 
> ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:876) 
> ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:822) 
> ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at java.security.AccessController.doPrivileged(Native Method) 
> ~[?:1.8.0_191]
> at javax.security.auth.Subject.doAs(Subject.java:422) ~[?:1.8.0_191]
> at 
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1730)
>  ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2682) 
> ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> {noformat}
> I think the issue here is that this error occurred too late - based on the 
> stack trace, LLAP has already accepted/registered the fragment. The 
> subsequent cleanup of this fragment/attempt also affects the first request. 
> Which results in the LLAP crash described in HIVE-23061:
> {noformat}
> 2020-03-17T06:49:11,304 ERROR [ExecutionCompletionThread #0 ()] 
> org.apache.hadoop.hive.llap.daemon.impl.LlapDaemon: Thread 
> Thread[ExecutionCompletionThread 

[jira] [Commented] (HIVE-23068) Error when submitting fragment to LLAP via external client: IllegalStateException: Only a single registration allowed per entity

2020-03-23 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-23068?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17065170#comment-17065170
 ] 

Jason Dere commented on HIVE-23068:
---

Ideally the duplicate fragment/attempt request should fail at a point where it 
does not have to invoke fragmentComplete()/unregisterFragment(), which may have 
bad effects on the first request that was already submitted.

> Error when submitting fragment to LLAP via external client: 
> IllegalStateException: Only a single registration allowed per entity
> 
>
> Key: HIVE-23068
> URL: https://issues.apache.org/jira/browse/HIVE-23068
> Project: Hive
>  Issue Type: Bug
>  Components: llap
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
>
> LLAP external client (via hive-warehouse-connector) somehow seems to be 
> sending duplicate submissions for the same fragment/attempt. When the 2nd 
> request is sent this results in the following error:
> {noformat}
> 2020-03-17T06:49:11,239 WARN  [IPC Server handler 2 on 15001 ()] 
> org.apache.hadoop.ipc.Server: IPC Server handler 2 on 15001, call Call#75 
> Retry#0 
> org.apache.hadoop.hive.llap.protocol.LlapProtocolBlockingPB.submitWork from 
> 19.40.252.114:33906
> java.lang.IllegalStateException: Only a single registration allowed per 
> entity. Duplicate for 
> TaskWrapper{task=attempt_1854104024183112753_6052_0_00_000128_1, 
> inWaitQueue=true, inPreemptionQueue=false, registeredForNotifications=true, 
> canFinish=true, canFinish(in queue)=true, isGuaranteed=false, 
> firstAttemptStartTime=1584442003327, dagStartTime=1584442003327, 
> withinDagPriority=0, vertexParallelism= 2132, selfAndUpstreamParallelism= 
> 2132, selfAndUpstreamComplete= 0}
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryInfo$FinishableStateTracker.registerForUpdates(QueryInfo.java:233)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryInfo.registerForFinishableStateUpdates(QueryInfo.java:205)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryFragmentInfo.registerForFinishableStateUpdates(QueryFragmentInfo.java:160)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService$TaskWrapper.maybeRegisterForFinishedStateNotifications(TaskExecutorService.java:1167)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService.schedule(TaskExecutorService.java:564)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService.schedule(TaskExecutorService.java:93)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.ContainerRunnerImpl.submitWork(ContainerRunnerImpl.java:292)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.LlapDaemon.submitWork(LlapDaemon.java:610)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.LlapProtocolServerImpl.submitWork(LlapProtocolServerImpl.java:122)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.rpc.LlapDaemonProtocolProtos$LlapDaemonProtocol$2.callBlockingMethod(LlapDaemonProtocolProtos.java:22695)
>  ~[hive-exec-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.32-1]
> at 
> org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:524)
>  ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1025) 
> ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:876) 
> ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:822) 
> ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at java.security.AccessController.doPrivileged(Native Method) 
> ~[?:1.8.0_191]
> at javax.security.auth.Subject.doAs(Subject.java:422) ~[?:1.8.0_191]
> at 
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1730)
>  ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2682) 
> ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> {noformat}
> I think the issue here is that this error occurred too late - based on the 
> stack trace, LLAP has already accepted/registered the fragment. The 
> subsequent cleanup of this fragment/attempt also affects the first request. 
> Which results in the LLAP crash described in 

[jira] [Assigned] (HIVE-23068) Error when submitting fragment to LLAP via external client: IllegalStateException: Only a single registration allowed per entity

2020-03-23 Thread Jason Dere (Jira)


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

Jason Dere reassigned HIVE-23068:
-


> Error when submitting fragment to LLAP via external client: 
> IllegalStateException: Only a single registration allowed per entity
> 
>
> Key: HIVE-23068
> URL: https://issues.apache.org/jira/browse/HIVE-23068
> Project: Hive
>  Issue Type: Bug
>  Components: llap
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
>
> LLAP external client (via hive-warehouse-connector) somehow seems to be 
> sending duplicate submissions for the same fragment/attempt. When the 2nd 
> request is sent this results in the following error:
> {noformat}
> 2020-03-17T06:49:11,239 WARN  [IPC Server handler 2 on 15001 ()] 
> org.apache.hadoop.ipc.Server: IPC Server handler 2 on 15001, call Call#75 
> Retry#0 
> org.apache.hadoop.hive.llap.protocol.LlapProtocolBlockingPB.submitWork from 
> 19.40.252.114:33906
> java.lang.IllegalStateException: Only a single registration allowed per 
> entity. Duplicate for 
> TaskWrapper{task=attempt_1854104024183112753_6052_0_00_000128_1, 
> inWaitQueue=true, inPreemptionQueue=false, registeredForNotifications=true, 
> canFinish=true, canFinish(in queue)=true, isGuaranteed=false, 
> firstAttemptStartTime=1584442003327, dagStartTime=1584442003327, 
> withinDagPriority=0, vertexParallelism= 2132, selfAndUpstreamParallelism= 
> 2132, selfAndUpstreamComplete= 0}
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryInfo$FinishableStateTracker.registerForUpdates(QueryInfo.java:233)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryInfo.registerForFinishableStateUpdates(QueryInfo.java:205)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryFragmentInfo.registerForFinishableStateUpdates(QueryFragmentInfo.java:160)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService$TaskWrapper.maybeRegisterForFinishedStateNotifications(TaskExecutorService.java:1167)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService.schedule(TaskExecutorService.java:564)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService.schedule(TaskExecutorService.java:93)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.ContainerRunnerImpl.submitWork(ContainerRunnerImpl.java:292)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.LlapDaemon.submitWork(LlapDaemon.java:610)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.LlapProtocolServerImpl.submitWork(LlapProtocolServerImpl.java:122)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.rpc.LlapDaemonProtocolProtos$LlapDaemonProtocol$2.callBlockingMethod(LlapDaemonProtocolProtos.java:22695)
>  ~[hive-exec-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.32-1]
> at 
> org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:524)
>  ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1025) 
> ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:876) 
> ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:822) 
> ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at java.security.AccessController.doPrivileged(Native Method) 
> ~[?:1.8.0_191]
> at javax.security.auth.Subject.doAs(Subject.java:422) ~[?:1.8.0_191]
> at 
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1730)
>  ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2682) 
> ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
> {noformat}
> I think the issue here is that this error occurred too late - based on the 
> stack trace, LLAP has already accepted/registered the fragment. The 
> subsequent cleanup of this fragment/attempt also affects the first request. 
> Which results in the LLAP crash described in HIVE-23061:
> {noformat}
> 2020-03-17T06:49:11,304 ERROR [ExecutionCompletionThread #0 ()] 
> org.apache.hadoop.hive.llap.daemon.impl.LlapDaemon: Thread 
> Thread[ExecutionCompletionThread #0,5,main] threw an Exception. Shutting down 
> now...
> 

[jira] [Commented] (HIVE-23062) Hive to check Yarn RM URL in TLS and Yarn HA mode for custom Tez queue

2020-03-20 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-23062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17063726#comment-17063726
 ] 

Jason Dere commented on HIVE-23062:
---

Actually good point [~krisden], looks like YarnConfiguration.useHttps() can be 
used here

> Hive to check Yarn RM URL in TLS and Yarn HA mode for custom Tez queue
> --
>
> Key: HIVE-23062
> URL: https://issues.apache.org/jira/browse/HIVE-23062
> Project: Hive
>  Issue Type: Improvement
>  Components: HiveServer2
>Reporter: Sam An
>Assignee: Sam An
>Priority: Major
> Attachments: HIVE-23062.1.patch
>
>
> Currently if custom Tez queue is used, Hive will only check the Http port, so 
> it is not handling TLS and Yarn HA mode URL. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (HIVE-23061) LLAP crash due to unhandled exception: Cannot invoke unregister on an entity which has not been registered

2020-03-20 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-23061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17063720#comment-17063720
 ] 

Jason Dere commented on HIVE-23061:
---

As for why the error is occurring in the first place, it looks like LLAP is 
getting duplicate query fragments submissions from the external client (HWC). 
So the duplicate fragment is submitted and it looks like it fails:
{noformat}2020-03-17T06:49:11,239 WARN  [IPC Server handler 2 on 15001 ()] 
org.apache.hadoop.ipc.Server: IPC Server handler 2 on 15001, call Call#75 
Retry#0 org.apache.hadoop.hive.llap.protocol.LlapProtocolBlockingPB.submitWork 
from 19.40.252.114:33906
java.lang.IllegalStateException: Only a single registration allowed per entity. 
Duplicate for TaskWrapper{task=attempt_1854104024183112753_6052_0_00_000128_1, 
inWaitQueue=true, inPreemptionQueue=false, registeredForNotifications=true, 
canFinish=true, canFinish(in queue)=true, isGuaranteed=false, 
firstAttemptStartTime=1584442003327, dagStartTime=1584442003327, 
withinDagPriority=0, vertexParallelism= 2132, selfAndUpstreamParallelism= 2132, 
selfAndUpstreamComplete= 0}
at 
org.apache.hadoop.hive.llap.daemon.impl.QueryInfo$FinishableStateTracker.registerForUpdates(QueryInfo.java:233)
 ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
at 
org.apache.hadoop.hive.llap.daemon.impl.QueryInfo.registerForFinishableStateUpdates(QueryInfo.java:205)
 ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
at 
org.apache.hadoop.hive.llap.daemon.impl.QueryFragmentInfo.registerForFinishableStateUpdates(QueryFragmentInfo.java:160)
 ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
at 
org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService$TaskWrapper.maybeRegisterForFinishedStateNotifications(TaskExecutorService.java:1167)
 ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
at 
org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService.schedule(TaskExecutorService.java:564)
 ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
at 
org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService.schedule(TaskExecutorService.java:93)
 ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
at 
org.apache.hadoop.hive.llap.daemon.impl.ContainerRunnerImpl.submitWork(ContainerRunnerImpl.java:292)
 ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
at 
org.apache.hadoop.hive.llap.daemon.impl.LlapDaemon.submitWork(LlapDaemon.java:610)
 ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
at 
org.apache.hadoop.hive.llap.daemon.impl.LlapProtocolServerImpl.submitWork(LlapProtocolServerImpl.java:122)
 ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
at 
org.apache.hadoop.hive.llap.daemon.rpc.LlapDaemonProtocolProtos$LlapDaemonProtocol$2.callBlockingMethod(LlapDaemonProtocolProtos.java:22695)
 ~[hive-exec-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.32-1]
at 
org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:524)
 ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1025) 
~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:876) 
~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:822) 
~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_191]
at javax.security.auth.Subject.doAs(Subject.java:422) ~[?:1.8.0_191]
at 
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1730)
 ~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2682) 
~[hadoop-common-3.1.1.3.1.4.26-3.jar:?]
{noformat}

I suspect that on that error, that fragment is cleaned up which may clear the 
info for the first fragment, and when the first fragment exits it may hit this. 
Still need more investigation on this one.

But in general, I don't think we should be allowing errors from one fragment 
submission cause the entire LLAP daemon to die, which is why I've done this 
patch.

> LLAP crash due to unhandled exception: Cannot invoke unregister on an entity 
> which has not been registered
> --
>
> Key: HIVE-23061
> URL: https://issues.apache.org/jira/browse/HIVE-23061
> Project: Hive
>  Issue Type: Bug
>  Components: llap
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-23061.1.patch
>
>
> The following exception goes uncaught and causes the entire LLAP daemon to 
> shut down:
> {noformat}
> 2020-03-17T06:49:11,304 ERROR [ExecutionCompletionThread #0 ()] 
> org.apache.hadoop.hive.llap.daemon.impl.LlapDaemon: Thread 
> 

[jira] [Commented] (HIVE-23061) LLAP crash due to unhandled exception: Cannot invoke unregister on an entity which has not been registered

2020-03-20 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-23061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17063686#comment-17063686
 ] 

Jason Dere commented on HIVE-23061:
---

Actually, I'm pretty sure we cannot recover properly from 
LlapDaemonUncaughtExceptionHandler - at this point we don't know what 
thread/executor queue has failed and needs setup/restarting all over again. 

> LLAP crash due to unhandled exception: Cannot invoke unregister on an entity 
> which has not been registered
> --
>
> Key: HIVE-23061
> URL: https://issues.apache.org/jira/browse/HIVE-23061
> Project: Hive
>  Issue Type: Bug
>  Components: llap
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-23061.1.patch
>
>
> The following exception goes uncaught and causes the entire LLAP daemon to 
> shut down:
> {noformat}
> 2020-03-17T06:49:11,304 ERROR [ExecutionCompletionThread #0 ()] 
> org.apache.hadoop.hive.llap.daemon.impl.LlapDaemon: Thread 
> Thread[ExecutionCompletionThread #0,5,main] threw an Exception. Shutting down 
> now...
> java.lang.IllegalStateException: Cannot invoke unregister on an entity which 
> has not been registered
> at 
> com.google.common.base.Preconditions.checkState(Preconditions.java:508) 
> ~[hive-exec-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.32-1]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryInfo$FinishableStateTracker.unregisterForUpdates(QueryInfo.java:256)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryInfo.unregisterFinishableStateUpdate(QueryInfo.java:209)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryFragmentInfo.unregisterForFinishableStateUpdates(QueryFragmentInfo.java:166)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService$TaskWrapper.maybeUnregisterForFinishedStateNotifications(TaskExecutorService.java:1177)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService$InternalCompletionListener.onSuccess(TaskExecutorService.java:980)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService$InternalCompletionListener.onSuccess(TaskExecutorService.java:944)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> com.google.common.util.concurrent.Futures$CallbackListener.run(Futures.java:1021)
>  ~[hive-exec-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.32-1]
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>  ~[?:1.8.0_191]
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>  ~[?:1.8.0_191]
> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_191]
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (HIVE-23061) LLAP crash due to unhandled exception: Cannot invoke unregister on an entity which has not been registered

2020-03-20 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-23061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17063680#comment-17063680
 ] 

Jason Dere commented on HIVE-23061:
---

Hey [~prasanth_j], thanks for reviewing. 

{quote}
1) When exception is caught and ignored, use LOG.warn() ? Or explicitly saying 
"Ignoring".. 
{quote}
Sure.

{quote}
2) The case where we do do nested try.. do we know why it throws exception?
{quote}
I think the last level of nesting is likely unnecessary, but just keeping a 
top-level catch just in case we get some other error in the onSuccess/onFailure 
callbacks.
{quote}
3) LLAP daemon should already has 

Thread.setDefaultUncaughtExceptionHandler(new 
LlapDaemonUncaughtExceptionHandler())

This should have caught any unhandled exceptions. Any idea why it wasn't 
caught? May be uncaught exception handler is a better way to handle any 
uncaught exceptions. 
{quote}
Actually all LlapDaemonUncaughtExceptionHandler does is shut down the LLAP 
daemon down, if it receives an exception .. is that incorrect logic?
{code}
  } else {
LOG.error("Thread {} threw an Exception. Shutting down now...", t, e);
ExitUtil.terminate(-1);
  }
{code}

> LLAP crash due to unhandled exception: Cannot invoke unregister on an entity 
> which has not been registered
> --
>
> Key: HIVE-23061
> URL: https://issues.apache.org/jira/browse/HIVE-23061
> Project: Hive
>  Issue Type: Bug
>  Components: llap
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-23061.1.patch
>
>
> The following exception goes uncaught and causes the entire LLAP daemon to 
> shut down:
> {noformat}
> 2020-03-17T06:49:11,304 ERROR [ExecutionCompletionThread #0 ()] 
> org.apache.hadoop.hive.llap.daemon.impl.LlapDaemon: Thread 
> Thread[ExecutionCompletionThread #0,5,main] threw an Exception. Shutting down 
> now...
> java.lang.IllegalStateException: Cannot invoke unregister on an entity which 
> has not been registered
> at 
> com.google.common.base.Preconditions.checkState(Preconditions.java:508) 
> ~[hive-exec-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.32-1]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryInfo$FinishableStateTracker.unregisterForUpdates(QueryInfo.java:256)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryInfo.unregisterFinishableStateUpdate(QueryInfo.java:209)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryFragmentInfo.unregisterForFinishableStateUpdates(QueryFragmentInfo.java:166)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService$TaskWrapper.maybeUnregisterForFinishedStateNotifications(TaskExecutorService.java:1177)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService$InternalCompletionListener.onSuccess(TaskExecutorService.java:980)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService$InternalCompletionListener.onSuccess(TaskExecutorService.java:944)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> com.google.common.util.concurrent.Futures$CallbackListener.run(Futures.java:1021)
>  ~[hive-exec-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.32-1]
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>  ~[?:1.8.0_191]
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>  ~[?:1.8.0_191]
> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_191]
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (HIVE-23062) Hive to check Yarn RM URL in TLS and Yarn HA mode for custom Tez queue

2020-03-20 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-23062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17063660#comment-17063660
 ] 

Jason Dere commented on HIVE-23062:
---

+1 pending test resuts

> Hive to check Yarn RM URL in TLS and Yarn HA mode for custom Tez queue
> --
>
> Key: HIVE-23062
> URL: https://issues.apache.org/jira/browse/HIVE-23062
> Project: Hive
>  Issue Type: Improvement
>  Components: HiveServer2
>Reporter: Sam An
>Assignee: Sam An
>Priority: Major
> Attachments: HIVE-23062.1.patch
>
>
> Currently if custom Tez queue is used, Hive will only check the Http port, so 
> it is not handling TLS and Yarn HA mode URL. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HIVE-23061) LLAP crash due to unhandled exception: Cannot invoke unregister on an entity which has not been registered

2020-03-20 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-23061:
--
Status: Patch Available  (was: Open)

Patch to prevent an exception in 
InternalCompletionListener.onSuccess()/onFailure() from unwinding the stack and 
failing the entire LLAP application.
[~prasanthj] [~thejas], do you mind reviewing?

> LLAP crash due to unhandled exception: Cannot invoke unregister on an entity 
> which has not been registered
> --
>
> Key: HIVE-23061
> URL: https://issues.apache.org/jira/browse/HIVE-23061
> Project: Hive
>  Issue Type: Bug
>  Components: llap
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-23061.1.patch
>
>
> The following exception goes uncaught and causes the entire LLAP daemon to 
> shut down:
> {noformat}
> 2020-03-17T06:49:11,304 ERROR [ExecutionCompletionThread #0 ()] 
> org.apache.hadoop.hive.llap.daemon.impl.LlapDaemon: Thread 
> Thread[ExecutionCompletionThread #0,5,main] threw an Exception. Shutting down 
> now...
> java.lang.IllegalStateException: Cannot invoke unregister on an entity which 
> has not been registered
> at 
> com.google.common.base.Preconditions.checkState(Preconditions.java:508) 
> ~[hive-exec-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.32-1]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryInfo$FinishableStateTracker.unregisterForUpdates(QueryInfo.java:256)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryInfo.unregisterFinishableStateUpdate(QueryInfo.java:209)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryFragmentInfo.unregisterForFinishableStateUpdates(QueryFragmentInfo.java:166)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService$TaskWrapper.maybeUnregisterForFinishedStateNotifications(TaskExecutorService.java:1177)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService$InternalCompletionListener.onSuccess(TaskExecutorService.java:980)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService$InternalCompletionListener.onSuccess(TaskExecutorService.java:944)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> com.google.common.util.concurrent.Futures$CallbackListener.run(Futures.java:1021)
>  ~[hive-exec-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.32-1]
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>  ~[?:1.8.0_191]
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>  ~[?:1.8.0_191]
> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_191]
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HIVE-23061) LLAP crash due to unhandled exception: Cannot invoke unregister on an entity which has not been registered

2020-03-20 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-23061:
--
Attachment: HIVE-23061.1.patch

> LLAP crash due to unhandled exception: Cannot invoke unregister on an entity 
> which has not been registered
> --
>
> Key: HIVE-23061
> URL: https://issues.apache.org/jira/browse/HIVE-23061
> Project: Hive
>  Issue Type: Bug
>  Components: llap
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-23061.1.patch
>
>
> The following exception goes uncaught and causes the entire LLAP daemon to 
> shut down:
> {noformat}
> 2020-03-17T06:49:11,304 ERROR [ExecutionCompletionThread #0 ()] 
> org.apache.hadoop.hive.llap.daemon.impl.LlapDaemon: Thread 
> Thread[ExecutionCompletionThread #0,5,main] threw an Exception. Shutting down 
> now...
> java.lang.IllegalStateException: Cannot invoke unregister on an entity which 
> has not been registered
> at 
> com.google.common.base.Preconditions.checkState(Preconditions.java:508) 
> ~[hive-exec-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.32-1]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryInfo$FinishableStateTracker.unregisterForUpdates(QueryInfo.java:256)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryInfo.unregisterFinishableStateUpdate(QueryInfo.java:209)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryFragmentInfo.unregisterForFinishableStateUpdates(QueryFragmentInfo.java:166)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService$TaskWrapper.maybeUnregisterForFinishedStateNotifications(TaskExecutorService.java:1177)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService$InternalCompletionListener.onSuccess(TaskExecutorService.java:980)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService$InternalCompletionListener.onSuccess(TaskExecutorService.java:944)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> com.google.common.util.concurrent.Futures$CallbackListener.run(Futures.java:1021)
>  ~[hive-exec-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.32-1]
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>  ~[?:1.8.0_191]
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>  ~[?:1.8.0_191]
> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_191]
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Assigned] (HIVE-23061) LLAP crash due to unhandled exception: Cannot invoke unregister on an entity which has not been registered

2020-03-20 Thread Jason Dere (Jira)


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

Jason Dere reassigned HIVE-23061:
-


> LLAP crash due to unhandled exception: Cannot invoke unregister on an entity 
> which has not been registered
> --
>
> Key: HIVE-23061
> URL: https://issues.apache.org/jira/browse/HIVE-23061
> Project: Hive
>  Issue Type: Bug
>  Components: llap
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
>
> The following exception goes uncaught and causes the entire LLAP daemon to 
> shut down:
> {noformat}
> 2020-03-17T06:49:11,304 ERROR [ExecutionCompletionThread #0 ()] 
> org.apache.hadoop.hive.llap.daemon.impl.LlapDaemon: Thread 
> Thread[ExecutionCompletionThread #0,5,main] threw an Exception. Shutting down 
> now...
> java.lang.IllegalStateException: Cannot invoke unregister on an entity which 
> has not been registered
> at 
> com.google.common.base.Preconditions.checkState(Preconditions.java:508) 
> ~[hive-exec-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.32-1]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryInfo$FinishableStateTracker.unregisterForUpdates(QueryInfo.java:256)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryInfo.unregisterFinishableStateUpdate(QueryInfo.java:209)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.QueryFragmentInfo.unregisterForFinishableStateUpdates(QueryFragmentInfo.java:166)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService$TaskWrapper.maybeUnregisterForFinishedStateNotifications(TaskExecutorService.java:1177)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService$InternalCompletionListener.onSuccess(TaskExecutorService.java:980)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService$InternalCompletionListener.onSuccess(TaskExecutorService.java:944)
>  ~[hive-llap-server-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.26-3]
> at 
> com.google.common.util.concurrent.Futures$CallbackListener.run(Futures.java:1021)
>  ~[hive-exec-3.1.0.3.1.4.26-3.jar:3.1.0.3.1.4.32-1]
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>  ~[?:1.8.0_191]
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>  ~[?:1.8.0_191]
> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_191]
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HIVE-18252) Limit the size of the object inspector caches

2020-03-10 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-18252:
--
Resolution: Duplicate
Status: Resolved  (was: Patch Available)

Looks like this is fixed by HIVE-20274 and HIVE-19860

> Limit the size of the object inspector caches
> -
>
> Key: HIVE-18252
> URL: https://issues.apache.org/jira/browse/HIVE-18252
> Project: Hive
>  Issue Type: Bug
>  Components: Types
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-18252.1.patch, HIVE-18252.2.patch
>
>
> Was running some tests that had a lot of queries with constant values, and 
> noticed that ObjectInspectorFactory.cachedStandardStructObjectInspector 
> started using up a lot of memory.
> It appears that StructObjectInspector caching does not work properly with 
> constant values. Constant ObjectInspectors are not cached, so each constant 
> expression creates a new constant ObjectInspector. And since object 
> inspectors do not override equals(), object inspector comparison relies on 
> object instance comparison. So even if the values are exactly the same as 
> what is already in the cache, the StructObjectInspector cache lookup would 
> fail, and Hive would create a new object inspector and add it to the cache, 
> creating another entry that would never be used. Plus, there is no max cache 
> size - it's just a map that is allowed to grow as long as values keep getting 
> added to it.
> Some possible solutions I can think of:
> 1. Limit the size of the object inspector caches, rather than growing without 
> bound.
> 2. Try to fix the caching to work with constant values. This would require 
> implementing equals() on the constant object inspectors (which could be slow 
> in nested cases), or else we would have to start caching constant object 
> inspectors, which could be expensive in terms of memory usage. Could be used 
> in combination with (1). By itself this is not a great solution because this 
> still has the unbounded cache growth issue.
> 3. Disable caching in the case of constant object inspectors since this 
> scenario currently doesn't work. This could be used in combination with (1).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HIVE-22973) Handle 0 length batches in LlapArrowRowRecordReader

2020-03-05 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-22973:
--
Fix Version/s: 4.0.0
   Resolution: Fixed
   Status: Resolved  (was: Patch Available)

Committed to master

> Handle 0 length batches in LlapArrowRowRecordReader
> ---
>
> Key: HIVE-22973
> URL: https://issues.apache.org/jira/browse/HIVE-22973
> Project: Hive
>  Issue Type: Bug
>  Components: llap
>Reporter: Shubham Chaurasia
>Assignee: Shubham Chaurasia
>Priority: Major
>  Labels: pull-request-available
> Fix For: 4.0.0
>
> Attachments: HIVE-22973.01.patch, HIVE-22973.02.patch
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> In https://issues.apache.org/jira/browse/HIVE-22856, we allowed 
> {{LlapArrowBatchRecordReader}} to permit 0 length arrow batches. 
> {{LlapArrowRowRecordReader}} which is a wrapper over 
> {{LlapArrowBatchRecordReader}} should also handle this.
> On one of the systems (cannot be reproduced easily) where we were running 
> test {{TestJdbcWithMiniLlapVectorArrow}}, we saw following exception - 
> {code:java}
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 30.173 s <<< 
> FAILURE! - in org.apache.hive.jdbc.TestJdbcWithMiniLlapVectorArrow
> testLlapInputFormatEndToEnd(org.apache.hive.jdbc.TestJdbcWithMiniLlapVectorArrow)
>   Time elapsed: 6.476 s  <<< ERROR!
> java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 0
>   at 
> org.apache.hadoop.hive.llap.LlapArrowRowRecordReader.next(LlapArrowRowRecordReader.java:80)
>   at 
> org.apache.hadoop.hive.llap.LlapArrowRowRecordReader.next(LlapArrowRowRecordReader.java:41)
>   at 
> org.apache.hive.jdbc.BaseJdbcWithMiniLlap.processQuery(BaseJdbcWithMiniLlap.java:540)
>   at 
> org.apache.hive.jdbc.BaseJdbcWithMiniLlap.processQuery(BaseJdbcWithMiniLlap.java:504)
>   at 
> org.apache.hive.jdbc.BaseJdbcWithMiniLlap.testLlapInputFormatEndToEnd(BaseJdbcWithMiniLlap.java:236)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:498)
>   at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>   at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
>   at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>   at 
> org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74)
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
>   at 
> org.apache.hadoop.hive.llap.LlapArrowRowRecordReader.next(LlapArrowRowRecordReader.java:77)
>   ... 13 more
> {code}
> cc [~maheshk114] [~jdere]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HIVE-22973) Handle 0 length batches in LlapArrowRowRecordReader

2020-03-04 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-22973:
--
Attachment: HIVE-22973.02.patch

> Handle 0 length batches in LlapArrowRowRecordReader
> ---
>
> Key: HIVE-22973
> URL: https://issues.apache.org/jira/browse/HIVE-22973
> Project: Hive
>  Issue Type: Bug
>  Components: llap
>Reporter: Shubham Chaurasia
>Assignee: Shubham Chaurasia
>Priority: Major
>  Labels: pull-request-available
> Attachments: HIVE-22973.01.patch, HIVE-22973.02.patch
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> In https://issues.apache.org/jira/browse/HIVE-22856, we allowed 
> {{LlapArrowBatchRecordReader}} to permit 0 length arrow batches. 
> {{LlapArrowRowRecordReader}} which is a wrapper over 
> {{LlapArrowBatchRecordReader}} should also handle this.
> On one of the systems (cannot be reproduced easily) where we were running 
> test {{TestJdbcWithMiniLlapVectorArrow}}, we saw following exception - 
> {code:java}
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 30.173 s <<< 
> FAILURE! - in org.apache.hive.jdbc.TestJdbcWithMiniLlapVectorArrow
> testLlapInputFormatEndToEnd(org.apache.hive.jdbc.TestJdbcWithMiniLlapVectorArrow)
>   Time elapsed: 6.476 s  <<< ERROR!
> java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 0
>   at 
> org.apache.hadoop.hive.llap.LlapArrowRowRecordReader.next(LlapArrowRowRecordReader.java:80)
>   at 
> org.apache.hadoop.hive.llap.LlapArrowRowRecordReader.next(LlapArrowRowRecordReader.java:41)
>   at 
> org.apache.hive.jdbc.BaseJdbcWithMiniLlap.processQuery(BaseJdbcWithMiniLlap.java:540)
>   at 
> org.apache.hive.jdbc.BaseJdbcWithMiniLlap.processQuery(BaseJdbcWithMiniLlap.java:504)
>   at 
> org.apache.hive.jdbc.BaseJdbcWithMiniLlap.testLlapInputFormatEndToEnd(BaseJdbcWithMiniLlap.java:236)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:498)
>   at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>   at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
>   at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>   at 
> org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74)
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
>   at 
> org.apache.hadoop.hive.llap.LlapArrowRowRecordReader.next(LlapArrowRowRecordReader.java:77)
>   ... 13 more
> {code}
> cc [~maheshk114] [~jdere]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Comment Edited] (HIVE-22973) Handle 0 length batches in LlapArrowRowRecordReader

2020-03-04 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-22973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17051408#comment-17051408
 ] 

Jason Dere edited comment on HIVE-22973 at 3/4/20, 4:48 PM:


+1
re-attaching same patch to kick off tests again


was (Author: jdere):
+1

> Handle 0 length batches in LlapArrowRowRecordReader
> ---
>
> Key: HIVE-22973
> URL: https://issues.apache.org/jira/browse/HIVE-22973
> Project: Hive
>  Issue Type: Bug
>  Components: llap
>Reporter: Shubham Chaurasia
>Assignee: Shubham Chaurasia
>Priority: Major
>  Labels: pull-request-available
> Attachments: HIVE-22973.01.patch, HIVE-22973.02.patch
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> In https://issues.apache.org/jira/browse/HIVE-22856, we allowed 
> {{LlapArrowBatchRecordReader}} to permit 0 length arrow batches. 
> {{LlapArrowRowRecordReader}} which is a wrapper over 
> {{LlapArrowBatchRecordReader}} should also handle this.
> On one of the systems (cannot be reproduced easily) where we were running 
> test {{TestJdbcWithMiniLlapVectorArrow}}, we saw following exception - 
> {code:java}
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 30.173 s <<< 
> FAILURE! - in org.apache.hive.jdbc.TestJdbcWithMiniLlapVectorArrow
> testLlapInputFormatEndToEnd(org.apache.hive.jdbc.TestJdbcWithMiniLlapVectorArrow)
>   Time elapsed: 6.476 s  <<< ERROR!
> java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 0
>   at 
> org.apache.hadoop.hive.llap.LlapArrowRowRecordReader.next(LlapArrowRowRecordReader.java:80)
>   at 
> org.apache.hadoop.hive.llap.LlapArrowRowRecordReader.next(LlapArrowRowRecordReader.java:41)
>   at 
> org.apache.hive.jdbc.BaseJdbcWithMiniLlap.processQuery(BaseJdbcWithMiniLlap.java:540)
>   at 
> org.apache.hive.jdbc.BaseJdbcWithMiniLlap.processQuery(BaseJdbcWithMiniLlap.java:504)
>   at 
> org.apache.hive.jdbc.BaseJdbcWithMiniLlap.testLlapInputFormatEndToEnd(BaseJdbcWithMiniLlap.java:236)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:498)
>   at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>   at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
>   at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>   at 
> org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74)
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
>   at 
> org.apache.hadoop.hive.llap.LlapArrowRowRecordReader.next(LlapArrowRowRecordReader.java:77)
>   ... 13 more
> {code}
> cc [~maheshk114] [~jdere]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (HIVE-22973) Handle 0 length batches in LlapArrowRowRecordReader

2020-03-04 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-22973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17051408#comment-17051408
 ] 

Jason Dere commented on HIVE-22973:
---

+1

> Handle 0 length batches in LlapArrowRowRecordReader
> ---
>
> Key: HIVE-22973
> URL: https://issues.apache.org/jira/browse/HIVE-22973
> Project: Hive
>  Issue Type: Bug
>  Components: llap
>Reporter: Shubham Chaurasia
>Assignee: Shubham Chaurasia
>Priority: Major
>  Labels: pull-request-available
> Attachments: HIVE-22973.01.patch
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> In https://issues.apache.org/jira/browse/HIVE-22856, we allowed 
> {{LlapArrowBatchRecordReader}} to permit 0 length arrow batches. 
> {{LlapArrowRowRecordReader}} which is a wrapper over 
> {{LlapArrowBatchRecordReader}} should also handle this.
> On one of the systems (cannot be reproduced easily) where we were running 
> test {{TestJdbcWithMiniLlapVectorArrow}}, we saw following exception - 
> {code:java}
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 30.173 s <<< 
> FAILURE! - in org.apache.hive.jdbc.TestJdbcWithMiniLlapVectorArrow
> testLlapInputFormatEndToEnd(org.apache.hive.jdbc.TestJdbcWithMiniLlapVectorArrow)
>   Time elapsed: 6.476 s  <<< ERROR!
> java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 0
>   at 
> org.apache.hadoop.hive.llap.LlapArrowRowRecordReader.next(LlapArrowRowRecordReader.java:80)
>   at 
> org.apache.hadoop.hive.llap.LlapArrowRowRecordReader.next(LlapArrowRowRecordReader.java:41)
>   at 
> org.apache.hive.jdbc.BaseJdbcWithMiniLlap.processQuery(BaseJdbcWithMiniLlap.java:540)
>   at 
> org.apache.hive.jdbc.BaseJdbcWithMiniLlap.processQuery(BaseJdbcWithMiniLlap.java:504)
>   at 
> org.apache.hive.jdbc.BaseJdbcWithMiniLlap.testLlapInputFormatEndToEnd(BaseJdbcWithMiniLlap.java:236)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:498)
>   at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
>   at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>   at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
>   at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>   at 
> org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74)
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
>   at 
> org.apache.hadoop.hive.llap.LlapArrowRowRecordReader.next(LlapArrowRowRecordReader.java:77)
>   ... 13 more
> {code}
> cc [~maheshk114] [~jdere]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Assigned] (HIVE-22946) HIVE-20082 removed conversion of complex types to string

2020-02-28 Thread Jason Dere (Jira)


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

Jason Dere reassigned HIVE-22946:
-


> HIVE-20082 removed conversion of complex types to string
> 
>
> Key: HIVE-22946
> URL: https://issues.apache.org/jira/browse/HIVE-22946
> Project: Hive
>  Issue Type: Bug
>  Components: Types, UDF
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
>
> Looks like we used to support cast/conversion of complex data types (array, 
> map, struct) to string, and HIVE-20082 removed that.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HIVE-22815) reduce the unnecessary file system object creation in MROutput

2020-02-18 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-22815:
--
Fix Version/s: 4.0.0
   Resolution: Fixed
   Status: Resolved  (was: Patch Available)

Commited to master

> reduce the unnecessary file system object creation in MROutput 
> ---
>
> Key: HIVE-22815
> URL: https://issues.apache.org/jira/browse/HIVE-22815
> Project: Hive
>  Issue Type: Bug
>Reporter: Richard Zhang
>Assignee: Richard Zhang
>Priority: Major
> Fix For: 4.0.0
>
> Attachments: Hive-22815.2.patch, Hive-22815.5.patch, 
> Hive-22815.8.patch
>
>
> MROutput generates unnecessary file system object which may create long 
> latency in Cloud environment. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HIVE-20312) Allow arrow clients to use their own BufferAllocator with LlapOutputFormatService

2020-02-10 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-20312:
--
Fix Version/s: 4.0.0
   Resolution: Fixed
   Status: Resolved  (was: Patch Available)

> Allow arrow clients to use their own BufferAllocator with 
> LlapOutputFormatService
> -
>
> Key: HIVE-20312
> URL: https://issues.apache.org/jira/browse/HIVE-20312
> Project: Hive
>  Issue Type: Improvement
>Reporter: Eric Wohlstadter
>Assignee: Eric Wohlstadter
>Priority: Major
> Fix For: 4.0.0
>
> Attachments: HIVE-20312.1.patch, HIVE-20312.2.patch, 
> HIVE-20312.3.patch
>
>
> Clients should be able to provide their own BufferAllocator to 
> LlapBaseInputFormat if allocator operations depend on client-side logic. For 
> example, clients may want to manage the allocator hierarchy per client-side 
> task, thread, etc.. 
> Currently the client is forced to use one global RootAllocator per process.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (HIVE-20312) Allow arrow clients to use their own BufferAllocator with LlapOutputFormatService

2020-02-10 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-20312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17033928#comment-17033928
 ] 

Jason Dere commented on HIVE-20312:
---

Thanks [~ShubhamChaurasia], I've gone ahead and committed the patch to master.

> Allow arrow clients to use their own BufferAllocator with 
> LlapOutputFormatService
> -
>
> Key: HIVE-20312
> URL: https://issues.apache.org/jira/browse/HIVE-20312
> Project: Hive
>  Issue Type: Improvement
>Reporter: Eric Wohlstadter
>Assignee: Eric Wohlstadter
>Priority: Major
> Attachments: HIVE-20312.1.patch, HIVE-20312.2.patch, 
> HIVE-20312.3.patch
>
>
> Clients should be able to provide their own BufferAllocator to 
> LlapBaseInputFormat if allocator operations depend on client-side logic. For 
> example, clients may want to manage the allocator hierarchy per client-side 
> task, thread, etc.. 
> Currently the client is forced to use one global RootAllocator per process.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HIVE-22856) Hive LLAP LlapArrowBatchRecordReader skipping remaining batches when ArrowStreamReader returns a 0 length batch.

2020-02-10 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-22856:
--
Attachment: (was: HIVE-22856.01.patch)

> Hive LLAP LlapArrowBatchRecordReader skipping remaining batches when 
> ArrowStreamReader returns a 0 length batch.
> 
>
> Key: HIVE-22856
> URL: https://issues.apache.org/jira/browse/HIVE-22856
> Project: Hive
>  Issue Type: Bug
>Reporter: mahesh kumar behera
>Assignee: mahesh kumar behera
>Priority: Major
> Attachments: HIVE-22856.01.patch
>
>
> LlapArrowBatchRecordReader returns false when the ArrowStreamReader 
> loadNextBatch returns column vector with 0 length. But we should keep reading 
> data until loadNextBatch returns false. Some batch may return column vector 
> of length 0, but we should ignore and wait for the next batch.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HIVE-22856) Hive LLAP LlapArrowBatchRecordReader skipping remaining batches when ArrowStreamReader returns a 0 length batch.

2020-02-10 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-22856:
--
Attachment: HIVE-22856.01.patch

> Hive LLAP LlapArrowBatchRecordReader skipping remaining batches when 
> ArrowStreamReader returns a 0 length batch.
> 
>
> Key: HIVE-22856
> URL: https://issues.apache.org/jira/browse/HIVE-22856
> Project: Hive
>  Issue Type: Bug
>Reporter: mahesh kumar behera
>Assignee: mahesh kumar behera
>Priority: Major
> Attachments: HIVE-22856.01.patch
>
>
> LlapArrowBatchRecordReader returns false when the ArrowStreamReader 
> loadNextBatch returns column vector with 0 length. But we should keep reading 
> data until loadNextBatch returns false. Some batch may return column vector 
> of length 0, but we should ignore and wait for the next batch.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (HIVE-22856) Hive LLAP LlapArrowBatchRecordReader skipping remaining batches when ArrowStreamReader returns a 0 length batch.

2020-02-10 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-22856?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17033745#comment-17033745
 ] 

Jason Dere commented on HIVE-22856:
---

+1 nice catch

> Hive LLAP LlapArrowBatchRecordReader skipping remaining batches when 
> ArrowStreamReader returns a 0 length batch.
> 
>
> Key: HIVE-22856
> URL: https://issues.apache.org/jira/browse/HIVE-22856
> Project: Hive
>  Issue Type: Bug
>Reporter: mahesh kumar behera
>Assignee: mahesh kumar behera
>Priority: Major
> Attachments: HIVE-22856.01.patch
>
>
> LlapArrowBatchRecordReader returns false when the ArrowStreamReader 
> loadNextBatch returns column vector with 0 length. But we should keep reading 
> data until loadNextBatch returns false. Some batch may return column vector 
> of length 0, but we should ignore and wait for the next batch.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (HIVE-22515) Support cast to decimal64 in Vectorization

2020-01-29 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-22515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17025727#comment-17025727
 ] 

Jason Dere commented on HIVE-22515:
---

+1

> Support cast to decimal64 in Vectorization
> --
>
> Key: HIVE-22515
> URL: https://issues.apache.org/jira/browse/HIVE-22515
> Project: Hive
>  Issue Type: Bug
>Reporter: Ramesh Kumar Thangarajan
>Assignee: Ramesh Kumar Thangarajan
>Priority: Major
>  Labels: pull-request-available
> Attachments: HIVE-22515.11.patch, HIVE-22515.5.patch, 
> HIVE-22515.8.patch, HIVE-22515.9.patch
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Support cast to decimal64 in Vectorization



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HIVE-22714) TestScheduledQueryService is flaky

2020-01-10 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-22714:
--
Fix Version/s: 4.0.0
   Resolution: Fixed
   Status: Resolved  (was: Patch Available)

Committed to master

> TestScheduledQueryService is flaky
> --
>
> Key: HIVE-22714
> URL: https://issues.apache.org/jira/browse/HIVE-22714
> Project: Hive
>  Issue Type: Bug
>  Components: Tests
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Fix For: 4.0.0
>
> Attachments: HIVE-22714.1.patch
>
>
> {noformat}
> [ERROR] Failures: 
> [ERROR]   TestScheduledQueryService.testScheduledQueryExecution:152 
> Expected: <5>
>  but: was <0>
> [INFO] 
> [ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
> {noformat}
> Looks like sometimes we are not waiting long enough for the INSERT query to 
> complete and the SELECT runs before it finishes:
> {noformat}
> $ egrep "insert|select" 
> target/surefire-reports/org.apache.hadoop.hive.ql.schq.TestScheduledQueryService-output.txt
>  | grep HOOK
> PREHOOK: query: insert into tu values(1),(2),(3),(4),(5)
> 2020-01-09T14:49:09,497  INFO [SchQ 0] SessionState: PREHOOK: query: insert 
> into tu values(1),(2),(3),(4),(5)
> PREHOOK: query: select 1 from tu
> 2020-01-09T14:49:11,452  INFO [main] SessionState: PREHOOK: query: select 1 
> from tu
> POSTHOOK: query: select 1 from tu
> 2020-01-09T14:49:11,452  INFO [main] SessionState: POSTHOOK: query: select 1 
> from tu
> POSTHOOK: query: insert into tu values(1),(2),(3),(4),(5)
> 2020-01-09T14:49:12,062  INFO [SchQ 0] SessionState: POSTHOOK: query: insert 
> into tu values(1),(2),(3),(4),(5)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HIVE-22595) Dynamic partition inserts fail on Avro table table with external schema

2020-01-10 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-22595:
--
Fix Version/s: 4.0.0
   Resolution: Fixed
   Status: Resolved  (was: Patch Available)

Committed to master

> Dynamic partition inserts fail on Avro table table with external schema
> ---
>
> Key: HIVE-22595
> URL: https://issues.apache.org/jira/browse/HIVE-22595
> Project: Hive
>  Issue Type: Bug
>  Components: Avro, Serializers/Deserializers
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Fix For: 4.0.0
>
> Attachments: HIVE-22595.1.patch, HIVE-22595.2.patch, 
> HIVE-22595.3.patch
>
>
> Example qfile test:
> {noformat}
> create external table avro_extschema_insert1 (name string) partitioned by (p1 
> string)
>   stored as avro tblproperties 
> ('avro.schema.url'='${system:test.tmp.dir}/table1.avsc');
> create external table avro_extschema_insert2 like avro_extschema_insert1;
> insert overwrite table avro_extschema_insert1 partition (p1='part1') values 
> ('col1_value', 1, 'col3_value');
> insert overwrite table avro_extschema_insert2 partition (p1) select * from 
> avro_extschema_insert1;
> {noformat}
> The last statement fails with the following error:
> {noformat}
> ], TaskAttempt 3 failed, info=[Error: Error while running task ( failure ) : 
> attempt_1575484789169_0003_4_00_00_3:java.lang.RuntimeException: 
> java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: 
> Hive Runtime Error while processing row
>   at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:296)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.run(TezProcessor.java:250)
>   at 
> org.apache.tez.runtime.LogicalIOProcessorRuntimeTask.run(LogicalIOProcessorRuntimeTask.java:374)
>   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:1730)
>   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 
> com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
>   at 
> com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:69)
>   at 
> com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
>   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: 
> org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while 
> processing row
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.processRow(MapRecordSource.java:101)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.pushRecord(MapRecordSource.java:76)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.run(MapRecordProcessor.java:426)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:267)
>   ... 16 more
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime 
> Error while processing row
>   at 
> org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:576)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.processRow(MapRecordSource.java:92)
>   ... 19 more
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: 
> org.apache.hadoop.hive.serde2.avro.AvroSerdeException: Number of input 
> columns was different than output columns (in = 2 vs out = 1
>   at 
> org.apache.hadoop.hive.ql.exec.FileSinkOperator.process(FileSinkOperator.java:1047)
>   at 
> org.apache.hadoop.hive.ql.exec.Operator.baseForward(Operator.java:994)
>   at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:940)
>   at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:927)
>   at 
> org.apache.hadoop.hive.ql.exec.SelectOperator.process(SelectOperator.java:95)
>   at 
> 

[jira] [Updated] (HIVE-22714) TestScheduledQueryService is flaky

2020-01-09 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-22714:
--
Assignee: Jason Dere
  Status: Patch Available  (was: Open)

Patch fixes the test by waiting for a longer amount of time (up to 30 secs) 
before moving onto the select statement.

[~kgyrtkirk] can you review?

> TestScheduledQueryService is flaky
> --
>
> Key: HIVE-22714
> URL: https://issues.apache.org/jira/browse/HIVE-22714
> Project: Hive
>  Issue Type: Bug
>  Components: Tests
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-22714.1.patch
>
>
> {noformat}
> [ERROR] Failures: 
> [ERROR]   TestScheduledQueryService.testScheduledQueryExecution:152 
> Expected: <5>
>  but: was <0>
> [INFO] 
> [ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
> {noformat}
> Looks like sometimes we are not waiting long enough for the INSERT query to 
> complete and the SELECT runs before it finishes:
> {noformat}
> $ egrep "insert|select" 
> target/surefire-reports/org.apache.hadoop.hive.ql.schq.TestScheduledQueryService-output.txt
>  | grep HOOK
> PREHOOK: query: insert into tu values(1),(2),(3),(4),(5)
> 2020-01-09T14:49:09,497  INFO [SchQ 0] SessionState: PREHOOK: query: insert 
> into tu values(1),(2),(3),(4),(5)
> PREHOOK: query: select 1 from tu
> 2020-01-09T14:49:11,452  INFO [main] SessionState: PREHOOK: query: select 1 
> from tu
> POSTHOOK: query: select 1 from tu
> 2020-01-09T14:49:11,452  INFO [main] SessionState: POSTHOOK: query: select 1 
> from tu
> POSTHOOK: query: insert into tu values(1),(2),(3),(4),(5)
> 2020-01-09T14:49:12,062  INFO [SchQ 0] SessionState: POSTHOOK: query: insert 
> into tu values(1),(2),(3),(4),(5)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HIVE-22714) TestScheduledQueryService is flaky

2020-01-09 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-22714:
--
Attachment: HIVE-22714.1.patch

> TestScheduledQueryService is flaky
> --
>
> Key: HIVE-22714
> URL: https://issues.apache.org/jira/browse/HIVE-22714
> Project: Hive
>  Issue Type: Bug
>  Components: Tests
>Reporter: Jason Dere
>Priority: Major
> Attachments: HIVE-22714.1.patch
>
>
> {noformat}
> [ERROR] Failures: 
> [ERROR]   TestScheduledQueryService.testScheduledQueryExecution:152 
> Expected: <5>
>  but: was <0>
> [INFO] 
> [ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
> {noformat}
> Looks like sometimes we are not waiting long enough for the INSERT query to 
> complete and the SELECT runs before it finishes:
> {noformat}
> $ egrep "insert|select" 
> target/surefire-reports/org.apache.hadoop.hive.ql.schq.TestScheduledQueryService-output.txt
>  | grep HOOK
> PREHOOK: query: insert into tu values(1),(2),(3),(4),(5)
> 2020-01-09T14:49:09,497  INFO [SchQ 0] SessionState: PREHOOK: query: insert 
> into tu values(1),(2),(3),(4),(5)
> PREHOOK: query: select 1 from tu
> 2020-01-09T14:49:11,452  INFO [main] SessionState: PREHOOK: query: select 1 
> from tu
> POSTHOOK: query: select 1 from tu
> 2020-01-09T14:49:11,452  INFO [main] SessionState: POSTHOOK: query: select 1 
> from tu
> POSTHOOK: query: insert into tu values(1),(2),(3),(4),(5)
> 2020-01-09T14:49:12,062  INFO [SchQ 0] SessionState: POSTHOOK: query: insert 
> into tu values(1),(2),(3),(4),(5)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HIVE-22709) NullPointerException during query compilation after HIVE-22578

2020-01-09 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-22709:
--
Fix Version/s: 4.0.0
   Resolution: Fixed
   Status: Resolved  (was: Patch Available)

Committed to master

> NullPointerException during query compilation after HIVE-22578
> --
>
> Key: HIVE-22709
> URL: https://issues.apache.org/jira/browse/HIVE-22709
> Project: Hive
>  Issue Type: Bug
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Fix For: 4.0.0
>
> Attachments: HIVE-22709.1.patch, HIVE-22709.1.patch, 
> results_cache_with_auth.q
>
>
> Getting a NPE during query compilation, when query results cache and Ranger 
> auth is enabled. This seems to have been caused by HIVE-22578.
> {noformat}
>  java.lang.NullPointerException
>   at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getQueryStringFromAst(SemanticAnalyzer.java:14987)
>   at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getQueryStringForCache(SemanticAnalyzer.java:15036)
>   at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.createLookupInfoForQuery(SemanticAnalyzer.java:15077)
>   at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:12513)
>   at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:358)
>   at 
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:283)
>   at 
> org.apache.hadoop.hive.ql.parse.ExplainSemanticAnalyzer.analyzeInternal(ExplainSemanticAnalyzer.java:171)
>   at 
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:283)
>   at org.apache.hadoop.hive.ql.Compiler.analyze(Compiler.java:219)
>   at org.apache.hadoop.hive.ql.Compiler.compile(Compiler.java:103)
>   at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:215)
>   at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:828)
>   at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:774)
>   at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:768)
>   at 
> org.apache.hadoop.hive.ql.reexec.ReExecDriver.compileAndRespond(ReExecDriver.java:125)
>   at 
> org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:229)
>   at 
> org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:249)
>   at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:193)
>   at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:415)
>   at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:346)
>   at 
> org.apache.hadoop.hive.ql.QTestUtil.executeClientInternal(QTestUtil.java:708)
>   at org.apache.hadoop.hive.ql.QTestUtil.executeClient(QTestUtil.java:678)
>   at 
> org.apache.hadoop.hive.cli.control.CoreCliDriver.runTest(CoreCliDriver.java:169)
>   at 
> org.apache.hadoop.hive.cli.control.CliAdapter.runTest(CliAdapter.java:157)
>   at 
> org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver(TestCliDriver.java:59)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HIVE-22709) NullPointerException during query compilation after HIVE-22578

2020-01-09 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-22709:
--
Attachment: HIVE-22709.1.patch

> NullPointerException during query compilation after HIVE-22578
> --
>
> Key: HIVE-22709
> URL: https://issues.apache.org/jira/browse/HIVE-22709
> Project: Hive
>  Issue Type: Bug
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-22709.1.patch, HIVE-22709.1.patch, 
> results_cache_with_auth.q
>
>
> Getting a NPE during query compilation, when query results cache and Ranger 
> auth is enabled. This seems to have been caused by HIVE-22578.
> {noformat}
>  java.lang.NullPointerException
>   at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getQueryStringFromAst(SemanticAnalyzer.java:14987)
>   at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getQueryStringForCache(SemanticAnalyzer.java:15036)
>   at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.createLookupInfoForQuery(SemanticAnalyzer.java:15077)
>   at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:12513)
>   at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:358)
>   at 
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:283)
>   at 
> org.apache.hadoop.hive.ql.parse.ExplainSemanticAnalyzer.analyzeInternal(ExplainSemanticAnalyzer.java:171)
>   at 
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:283)
>   at org.apache.hadoop.hive.ql.Compiler.analyze(Compiler.java:219)
>   at org.apache.hadoop.hive.ql.Compiler.compile(Compiler.java:103)
>   at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:215)
>   at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:828)
>   at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:774)
>   at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:768)
>   at 
> org.apache.hadoop.hive.ql.reexec.ReExecDriver.compileAndRespond(ReExecDriver.java:125)
>   at 
> org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:229)
>   at 
> org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:249)
>   at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:193)
>   at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:415)
>   at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:346)
>   at 
> org.apache.hadoop.hive.ql.QTestUtil.executeClientInternal(QTestUtil.java:708)
>   at org.apache.hadoop.hive.ql.QTestUtil.executeClient(QTestUtil.java:678)
>   at 
> org.apache.hadoop.hive.cli.control.CoreCliDriver.runTest(CoreCliDriver.java:169)
>   at 
> org.apache.hadoop.hive.cli.control.CliAdapter.runTest(CliAdapter.java:157)
>   at 
> org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver(TestCliDriver.java:59)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HIVE-22709) NullPointerException during query compilation after HIVE-22578

2020-01-08 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-22709:
--
Attachment: HIVE-22709.1.patch

> NullPointerException during query compilation after HIVE-22578
> --
>
> Key: HIVE-22709
> URL: https://issues.apache.org/jira/browse/HIVE-22709
> Project: Hive
>  Issue Type: Bug
>Reporter: Jason Dere
>Priority: Major
> Attachments: HIVE-22709.1.patch, results_cache_with_auth.q
>
>
> Getting a NPE during query compilation, when query results cache and Ranger 
> auth is enabled. This seems to have been caused by HIVE-22578.
> {noformat}
>  java.lang.NullPointerException
>   at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getQueryStringFromAst(SemanticAnalyzer.java:14987)
>   at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getQueryStringForCache(SemanticAnalyzer.java:15036)
>   at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.createLookupInfoForQuery(SemanticAnalyzer.java:15077)
>   at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:12513)
>   at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:358)
>   at 
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:283)
>   at 
> org.apache.hadoop.hive.ql.parse.ExplainSemanticAnalyzer.analyzeInternal(ExplainSemanticAnalyzer.java:171)
>   at 
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:283)
>   at org.apache.hadoop.hive.ql.Compiler.analyze(Compiler.java:219)
>   at org.apache.hadoop.hive.ql.Compiler.compile(Compiler.java:103)
>   at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:215)
>   at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:828)
>   at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:774)
>   at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:768)
>   at 
> org.apache.hadoop.hive.ql.reexec.ReExecDriver.compileAndRespond(ReExecDriver.java:125)
>   at 
> org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:229)
>   at 
> org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:249)
>   at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:193)
>   at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:415)
>   at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:346)
>   at 
> org.apache.hadoop.hive.ql.QTestUtil.executeClientInternal(QTestUtil.java:708)
>   at org.apache.hadoop.hive.ql.QTestUtil.executeClient(QTestUtil.java:678)
>   at 
> org.apache.hadoop.hive.cli.control.CoreCliDriver.runTest(CoreCliDriver.java:169)
>   at 
> org.apache.hadoop.hive.cli.control.CliAdapter.runTest(CliAdapter.java:157)
>   at 
> org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver(TestCliDriver.java:59)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HIVE-22709) NullPointerException during query compilation after HIVE-22578

2020-01-08 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-22709:
--
Assignee: Jason Dere
  Status: Patch Available  (was: Open)

Attaching patch to fix this - changing "ast" to "astForAnalyze" within 
SemanticAnalyzer.analyzeInternal(). Test case also added.

[~hamvas.aron], [~kgyrtkirk] can you review?

> NullPointerException during query compilation after HIVE-22578
> --
>
> Key: HIVE-22709
> URL: https://issues.apache.org/jira/browse/HIVE-22709
> Project: Hive
>  Issue Type: Bug
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-22709.1.patch, results_cache_with_auth.q
>
>
> Getting a NPE during query compilation, when query results cache and Ranger 
> auth is enabled. This seems to have been caused by HIVE-22578.
> {noformat}
>  java.lang.NullPointerException
>   at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getQueryStringFromAst(SemanticAnalyzer.java:14987)
>   at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getQueryStringForCache(SemanticAnalyzer.java:15036)
>   at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.createLookupInfoForQuery(SemanticAnalyzer.java:15077)
>   at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:12513)
>   at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:358)
>   at 
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:283)
>   at 
> org.apache.hadoop.hive.ql.parse.ExplainSemanticAnalyzer.analyzeInternal(ExplainSemanticAnalyzer.java:171)
>   at 
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:283)
>   at org.apache.hadoop.hive.ql.Compiler.analyze(Compiler.java:219)
>   at org.apache.hadoop.hive.ql.Compiler.compile(Compiler.java:103)
>   at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:215)
>   at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:828)
>   at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:774)
>   at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:768)
>   at 
> org.apache.hadoop.hive.ql.reexec.ReExecDriver.compileAndRespond(ReExecDriver.java:125)
>   at 
> org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:229)
>   at 
> org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:249)
>   at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:193)
>   at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:415)
>   at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:346)
>   at 
> org.apache.hadoop.hive.ql.QTestUtil.executeClientInternal(QTestUtil.java:708)
>   at org.apache.hadoop.hive.ql.QTestUtil.executeClient(QTestUtil.java:678)
>   at 
> org.apache.hadoop.hive.cli.control.CoreCliDriver.runTest(CoreCliDriver.java:169)
>   at 
> org.apache.hadoop.hive.cli.control.CliAdapter.runTest(CliAdapter.java:157)
>   at 
> org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver(TestCliDriver.java:59)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (HIVE-22709) NullPointerException during query compilation after HIVE-22578

2020-01-08 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-22709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17011011#comment-17011011
 ] 

Jason Dere commented on HIVE-22709:
---

I think I see what happened - when the method signature of 
SemanticAnalyzer.analyzeInternal was changed from 
{code}
  void analyzeInternal(ASTNode ast, Supplier pcf) throws 
SemanticException {
{code}
to
{code}
 void analyzeInternal(ASTNode astToAnalyze, Supplier pcf) 
throws SemanticException {
{code}

then in this line:
{code}
lookupInfo = createLookupInfoForQuery(ast);
{code}
"ast" changed from being a method parameter to the SemanticAnalyzer.ast field. 
We just need to change that line to lookupInfo = 
createLookupInfoForQuery(astToAnalyze);
In fact all references to "ast" in that method will need to be changed to 
astToAnalyze since the parameter was renamed, it is unfortunate that 
SemanticAnalyzer had an ast field which hid this error.

> NullPointerException during query compilation after HIVE-22578
> --
>
> Key: HIVE-22709
> URL: https://issues.apache.org/jira/browse/HIVE-22709
> Project: Hive
>  Issue Type: Bug
>Reporter: Jason Dere
>Priority: Major
> Attachments: results_cache_with_auth.q
>
>
> Getting a NPE during query compilation, when query results cache and Ranger 
> auth is enabled. This seems to have been caused by HIVE-22578.
> {noformat}
>  java.lang.NullPointerException
>   at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getQueryStringFromAst(SemanticAnalyzer.java:14987)
>   at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getQueryStringForCache(SemanticAnalyzer.java:15036)
>   at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.createLookupInfoForQuery(SemanticAnalyzer.java:15077)
>   at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:12513)
>   at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:358)
>   at 
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:283)
>   at 
> org.apache.hadoop.hive.ql.parse.ExplainSemanticAnalyzer.analyzeInternal(ExplainSemanticAnalyzer.java:171)
>   at 
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:283)
>   at org.apache.hadoop.hive.ql.Compiler.analyze(Compiler.java:219)
>   at org.apache.hadoop.hive.ql.Compiler.compile(Compiler.java:103)
>   at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:215)
>   at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:828)
>   at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:774)
>   at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:768)
>   at 
> org.apache.hadoop.hive.ql.reexec.ReExecDriver.compileAndRespond(ReExecDriver.java:125)
>   at 
> org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:229)
>   at 
> org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:249)
>   at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:193)
>   at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:415)
>   at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:346)
>   at 
> org.apache.hadoop.hive.ql.QTestUtil.executeClientInternal(QTestUtil.java:708)
>   at org.apache.hadoop.hive.ql.QTestUtil.executeClient(QTestUtil.java:678)
>   at 
> org.apache.hadoop.hive.cli.control.CoreCliDriver.runTest(CoreCliDriver.java:169)
>   at 
> org.apache.hadoop.hive.cli.control.CliAdapter.runTest(CliAdapter.java:157)
>   at 
> org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver(TestCliDriver.java:59)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (HIVE-22709) NullPointerException during query compilation after HIVE-22578

2020-01-08 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-22709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17010964#comment-17010964
 ] 

Jason Dere commented on HIVE-22709:
---

Attaching a qfile test which reproduces the issue. It passes if I revert the 
changes from HIVE-22578.

> NullPointerException during query compilation after HIVE-22578
> --
>
> Key: HIVE-22709
> URL: https://issues.apache.org/jira/browse/HIVE-22709
> Project: Hive
>  Issue Type: Bug
>Reporter: Jason Dere
>Priority: Major
> Attachments: results_cache_with_auth.q
>
>
> Getting a NPE during query compilation, when query results cache and Ranger 
> auth is enabled. This seems to have been caused by HIVE-22578.
> {noformat}
>  java.lang.NullPointerException
>   at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getQueryStringFromAst(SemanticAnalyzer.java:14987)
>   at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getQueryStringForCache(SemanticAnalyzer.java:15036)
>   at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.createLookupInfoForQuery(SemanticAnalyzer.java:15077)
>   at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:12513)
>   at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:358)
>   at 
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:283)
>   at 
> org.apache.hadoop.hive.ql.parse.ExplainSemanticAnalyzer.analyzeInternal(ExplainSemanticAnalyzer.java:171)
>   at 
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:283)
>   at org.apache.hadoop.hive.ql.Compiler.analyze(Compiler.java:219)
>   at org.apache.hadoop.hive.ql.Compiler.compile(Compiler.java:103)
>   at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:215)
>   at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:828)
>   at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:774)
>   at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:768)
>   at 
> org.apache.hadoop.hive.ql.reexec.ReExecDriver.compileAndRespond(ReExecDriver.java:125)
>   at 
> org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:229)
>   at 
> org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:249)
>   at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:193)
>   at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:415)
>   at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:346)
>   at 
> org.apache.hadoop.hive.ql.QTestUtil.executeClientInternal(QTestUtil.java:708)
>   at org.apache.hadoop.hive.ql.QTestUtil.executeClient(QTestUtil.java:678)
>   at 
> org.apache.hadoop.hive.cli.control.CoreCliDriver.runTest(CoreCliDriver.java:169)
>   at 
> org.apache.hadoop.hive.cli.control.CliAdapter.runTest(CliAdapter.java:157)
>   at 
> org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver(TestCliDriver.java:59)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HIVE-22709) NullPointerException during query compilation after HIVE-22578

2020-01-08 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-22709:
--
Attachment: results_cache_with_auth.q

> NullPointerException during query compilation after HIVE-22578
> --
>
> Key: HIVE-22709
> URL: https://issues.apache.org/jira/browse/HIVE-22709
> Project: Hive
>  Issue Type: Bug
>Reporter: Jason Dere
>Priority: Major
> Attachments: results_cache_with_auth.q
>
>
> Getting a NPE during query compilation, when query results cache and Ranger 
> auth is enabled. This seems to have been caused by HIVE-22578.
> {noformat}
>  java.lang.NullPointerException
>   at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getQueryStringFromAst(SemanticAnalyzer.java:14987)
>   at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getQueryStringForCache(SemanticAnalyzer.java:15036)
>   at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.createLookupInfoForQuery(SemanticAnalyzer.java:15077)
>   at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:12513)
>   at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:358)
>   at 
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:283)
>   at 
> org.apache.hadoop.hive.ql.parse.ExplainSemanticAnalyzer.analyzeInternal(ExplainSemanticAnalyzer.java:171)
>   at 
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:283)
>   at org.apache.hadoop.hive.ql.Compiler.analyze(Compiler.java:219)
>   at org.apache.hadoop.hive.ql.Compiler.compile(Compiler.java:103)
>   at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:215)
>   at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:828)
>   at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:774)
>   at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:768)
>   at 
> org.apache.hadoop.hive.ql.reexec.ReExecDriver.compileAndRespond(ReExecDriver.java:125)
>   at 
> org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:229)
>   at 
> org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:249)
>   at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:193)
>   at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:415)
>   at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:346)
>   at 
> org.apache.hadoop.hive.ql.QTestUtil.executeClientInternal(QTestUtil.java:708)
>   at org.apache.hadoop.hive.ql.QTestUtil.executeClient(QTestUtil.java:678)
>   at 
> org.apache.hadoop.hive.cli.control.CoreCliDriver.runTest(CoreCliDriver.java:169)
>   at 
> org.apache.hadoop.hive.cli.control.CliAdapter.runTest(CliAdapter.java:157)
>   at 
> org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver(TestCliDriver.java:59)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (HIVE-22595) Dynamic partition inserts fail on Avro table table with external schema

2020-01-06 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-22595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17008999#comment-17008999
 ] 

Jason Dere commented on HIVE-22595:
---

[~jcamachorodriguez] [~ashutoshc] can you review this one?

> Dynamic partition inserts fail on Avro table table with external schema
> ---
>
> Key: HIVE-22595
> URL: https://issues.apache.org/jira/browse/HIVE-22595
> Project: Hive
>  Issue Type: Bug
>  Components: Avro, Serializers/Deserializers
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-22595.1.patch, HIVE-22595.2.patch, 
> HIVE-22595.3.patch
>
>
> Example qfile test:
> {noformat}
> create external table avro_extschema_insert1 (name string) partitioned by (p1 
> string)
>   stored as avro tblproperties 
> ('avro.schema.url'='${system:test.tmp.dir}/table1.avsc');
> create external table avro_extschema_insert2 like avro_extschema_insert1;
> insert overwrite table avro_extschema_insert1 partition (p1='part1') values 
> ('col1_value', 1, 'col3_value');
> insert overwrite table avro_extschema_insert2 partition (p1) select * from 
> avro_extschema_insert1;
> {noformat}
> The last statement fails with the following error:
> {noformat}
> ], TaskAttempt 3 failed, info=[Error: Error while running task ( failure ) : 
> attempt_1575484789169_0003_4_00_00_3:java.lang.RuntimeException: 
> java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: 
> Hive Runtime Error while processing row
>   at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:296)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.run(TezProcessor.java:250)
>   at 
> org.apache.tez.runtime.LogicalIOProcessorRuntimeTask.run(LogicalIOProcessorRuntimeTask.java:374)
>   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:1730)
>   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 
> com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
>   at 
> com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:69)
>   at 
> com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
>   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: 
> org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while 
> processing row
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.processRow(MapRecordSource.java:101)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.pushRecord(MapRecordSource.java:76)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.run(MapRecordProcessor.java:426)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:267)
>   ... 16 more
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime 
> Error while processing row
>   at 
> org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:576)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.processRow(MapRecordSource.java:92)
>   ... 19 more
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: 
> org.apache.hadoop.hive.serde2.avro.AvroSerdeException: Number of input 
> columns was different than output columns (in = 2 vs out = 1
>   at 
> org.apache.hadoop.hive.ql.exec.FileSinkOperator.process(FileSinkOperator.java:1047)
>   at 
> org.apache.hadoop.hive.ql.exec.Operator.baseForward(Operator.java:994)
>   at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:940)
>   at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:927)
>   at 
> org.apache.hadoop.hive.ql.exec.SelectOperator.process(SelectOperator.java:95)
>   at 
> org.apache.hadoop.hive.ql.exec.Operator.baseForward(Operator.java:994)
>   at 

[jira] [Commented] (HIVE-22595) Dynamic partition inserts fail on Avro table table with external schema

2020-01-03 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-22595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17007793#comment-17007793
 ] 

Jason Dere commented on HIVE-22595:
---

Updating the patch so that avro_extschema_insert is only run by 
TestMiniLlapLocalCliDriver, and hoping that the TestHiveCli failures are due to 
HIVE-22649

> Dynamic partition inserts fail on Avro table table with external schema
> ---
>
> Key: HIVE-22595
> URL: https://issues.apache.org/jira/browse/HIVE-22595
> Project: Hive
>  Issue Type: Bug
>  Components: Avro, Serializers/Deserializers
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-22595.1.patch, HIVE-22595.2.patch, 
> HIVE-22595.3.patch
>
>
> Example qfile test:
> {noformat}
> create external table avro_extschema_insert1 (name string) partitioned by (p1 
> string)
>   stored as avro tblproperties 
> ('avro.schema.url'='${system:test.tmp.dir}/table1.avsc');
> create external table avro_extschema_insert2 like avro_extschema_insert1;
> insert overwrite table avro_extschema_insert1 partition (p1='part1') values 
> ('col1_value', 1, 'col3_value');
> insert overwrite table avro_extschema_insert2 partition (p1) select * from 
> avro_extschema_insert1;
> {noformat}
> The last statement fails with the following error:
> {noformat}
> ], TaskAttempt 3 failed, info=[Error: Error while running task ( failure ) : 
> attempt_1575484789169_0003_4_00_00_3:java.lang.RuntimeException: 
> java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: 
> Hive Runtime Error while processing row
>   at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:296)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.run(TezProcessor.java:250)
>   at 
> org.apache.tez.runtime.LogicalIOProcessorRuntimeTask.run(LogicalIOProcessorRuntimeTask.java:374)
>   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:1730)
>   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 
> com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
>   at 
> com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:69)
>   at 
> com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
>   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: 
> org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while 
> processing row
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.processRow(MapRecordSource.java:101)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.pushRecord(MapRecordSource.java:76)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.run(MapRecordProcessor.java:426)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:267)
>   ... 16 more
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime 
> Error while processing row
>   at 
> org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:576)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.processRow(MapRecordSource.java:92)
>   ... 19 more
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: 
> org.apache.hadoop.hive.serde2.avro.AvroSerdeException: Number of input 
> columns was different than output columns (in = 2 vs out = 1
>   at 
> org.apache.hadoop.hive.ql.exec.FileSinkOperator.process(FileSinkOperator.java:1047)
>   at 
> org.apache.hadoop.hive.ql.exec.Operator.baseForward(Operator.java:994)
>   at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:940)
>   at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:927)
>   at 
> org.apache.hadoop.hive.ql.exec.SelectOperator.process(SelectOperator.java:95)
>   at 
> 

[jira] [Updated] (HIVE-22595) Dynamic partition inserts fail on Avro table table with external schema

2020-01-03 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-22595:
--
Attachment: HIVE-22595.3.patch

> Dynamic partition inserts fail on Avro table table with external schema
> ---
>
> Key: HIVE-22595
> URL: https://issues.apache.org/jira/browse/HIVE-22595
> Project: Hive
>  Issue Type: Bug
>  Components: Avro, Serializers/Deserializers
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-22595.1.patch, HIVE-22595.2.patch, 
> HIVE-22595.3.patch
>
>
> Example qfile test:
> {noformat}
> create external table avro_extschema_insert1 (name string) partitioned by (p1 
> string)
>   stored as avro tblproperties 
> ('avro.schema.url'='${system:test.tmp.dir}/table1.avsc');
> create external table avro_extschema_insert2 like avro_extschema_insert1;
> insert overwrite table avro_extschema_insert1 partition (p1='part1') values 
> ('col1_value', 1, 'col3_value');
> insert overwrite table avro_extschema_insert2 partition (p1) select * from 
> avro_extschema_insert1;
> {noformat}
> The last statement fails with the following error:
> {noformat}
> ], TaskAttempt 3 failed, info=[Error: Error while running task ( failure ) : 
> attempt_1575484789169_0003_4_00_00_3:java.lang.RuntimeException: 
> java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: 
> Hive Runtime Error while processing row
>   at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:296)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.run(TezProcessor.java:250)
>   at 
> org.apache.tez.runtime.LogicalIOProcessorRuntimeTask.run(LogicalIOProcessorRuntimeTask.java:374)
>   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:1730)
>   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 
> com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
>   at 
> com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:69)
>   at 
> com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
>   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: 
> org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while 
> processing row
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.processRow(MapRecordSource.java:101)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.pushRecord(MapRecordSource.java:76)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.run(MapRecordProcessor.java:426)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:267)
>   ... 16 more
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime 
> Error while processing row
>   at 
> org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:576)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.processRow(MapRecordSource.java:92)
>   ... 19 more
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: 
> org.apache.hadoop.hive.serde2.avro.AvroSerdeException: Number of input 
> columns was different than output columns (in = 2 vs out = 1
>   at 
> org.apache.hadoop.hive.ql.exec.FileSinkOperator.process(FileSinkOperator.java:1047)
>   at 
> org.apache.hadoop.hive.ql.exec.Operator.baseForward(Operator.java:994)
>   at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:940)
>   at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:927)
>   at 
> org.apache.hadoop.hive.ql.exec.SelectOperator.process(SelectOperator.java:95)
>   at 
> org.apache.hadoop.hive.ql.exec.Operator.baseForward(Operator.java:994)
>   at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:940)
>   at 
> 

[jira] [Commented] (HIVE-22649) Fix TestHiveCli: scratchdir should be writable

2020-01-03 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-22649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17007776#comment-17007776
 ] 

Jason Dere commented on HIVE-22649:
---

Hi [~dkuzmenko], sorry for responding late on this one.

It may be possible that HIVE-22599 causes this, if the logic to initialize the 
query results cache is called before the call to ensurePathIsWritable(). In 
that case the call to mkdirs() in QueryResultsCache.QueryResultsCache() might 
be the first to create the "/tmp/hive" directory (and with default perms per 
[http://hadoop.apache.org/docs/r2.7.5/api/src-html/org/apache/hadoop/fs/FileSystem.html#line.596]).

Trying to think of what options we have here:

1) Revert HIVE-22599

2) Make sure that ensurePathIsWritable(HiveConf.ConfVars.SCRATCHDIR) is called 
before QueryResultsCache.initialize(), during HiveServer2.init() (or maybe 
within QueryResultsCache.initialize() itself),  to ensure that the session tmp 
dir is initialized with the correct perms.

> Fix TestHiveCli: scratchdir should be writable
> --
>
> Key: HIVE-22649
> URL: https://issues.apache.org/jira/browse/HIVE-22649
> Project: Hive
>  Issue Type: Sub-task
>Reporter: Denys Kuzmenko
>Assignee: Denys Kuzmenko
>Priority: Major
> Attachments: HIVE-22649.1.patch, HIVE-22649.2.patch
>
>
> Error applying authorization policy on hive configuration: The dir: /tmp/hive 
> on HDFS should be writable. Current permissions are: rwxr-xr-x
> SessionState.java
> {code}
>   private Path createRootHDFSDir(HiveConf conf) throws IOException {
> Path rootHDFSDirPath = new Path(HiveConf.getVar(conf, 
> HiveConf.ConfVars.SCRATCHDIR));
> *Utilities.ensurePathIsWritable(rootHDFSDirPath, conf);*
> return rootHDFSDirPath;
>   }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HIVE-22599) Query results cache: 733 permissions check is not necessary

2019-12-13 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-22599:
--
Fix Version/s: 4.0.0
   Resolution: Fixed
   Status: Resolved  (was: Patch Available)

Committed to master

> Query results cache: 733 permissions check is not necessary
> ---
>
> Key: HIVE-22599
> URL: https://issues.apache.org/jira/browse/HIVE-22599
> Project: Hive
>  Issue Type: Bug
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Fix For: 4.0.0
>
> Attachments: HIVE-22599.1.patch
>
>
> The query results cache initialization makes a call to 
> Utilties.ensurePathIsWritable(), which checks the results cache directory for 
> 733 permissions (default cache dir is
> {{/tmp/hive/_resultscache_).}}
> The 733 permissions (at least the 033 part) are not actually necessary - we 
> actually don't really want the results cache directory to be world-writable, 
> and the subdirectories we create within this one are actually done with 700 
> perms. So I think the call to Utilties.ensurePathIsWritable() can be removed.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (HIVE-22595) Dynamic partition inserts fail on Avro table table with external schema

2019-12-13 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-22595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16995988#comment-16995988
 ] 

Jason Dere commented on HIVE-22595:
---

Looks like a bucketing column can get added to the end which makes patch v1 
incorrect.

Attaching patch v2 - this tries to fix this by having AvroSerDe update the 
column name/type properties when the serde is initialized. This should fix the 
behavior of the original call to Utilities.getDPColOffset().

> Dynamic partition inserts fail on Avro table table with external schema
> ---
>
> Key: HIVE-22595
> URL: https://issues.apache.org/jira/browse/HIVE-22595
> Project: Hive
>  Issue Type: Bug
>  Components: Avro, Serializers/Deserializers
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-22595.1.patch, HIVE-22595.2.patch
>
>
> Example qfile test:
> {noformat}
> create external table avro_extschema_insert1 (name string) partitioned by (p1 
> string)
>   stored as avro tblproperties 
> ('avro.schema.url'='${system:test.tmp.dir}/table1.avsc');
> create external table avro_extschema_insert2 like avro_extschema_insert1;
> insert overwrite table avro_extschema_insert1 partition (p1='part1') values 
> ('col1_value', 1, 'col3_value');
> insert overwrite table avro_extschema_insert2 partition (p1) select * from 
> avro_extschema_insert1;
> {noformat}
> The last statement fails with the following error:
> {noformat}
> ], TaskAttempt 3 failed, info=[Error: Error while running task ( failure ) : 
> attempt_1575484789169_0003_4_00_00_3:java.lang.RuntimeException: 
> java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: 
> Hive Runtime Error while processing row
>   at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:296)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.run(TezProcessor.java:250)
>   at 
> org.apache.tez.runtime.LogicalIOProcessorRuntimeTask.run(LogicalIOProcessorRuntimeTask.java:374)
>   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:1730)
>   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 
> com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
>   at 
> com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:69)
>   at 
> com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
>   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: 
> org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while 
> processing row
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.processRow(MapRecordSource.java:101)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.pushRecord(MapRecordSource.java:76)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.run(MapRecordProcessor.java:426)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:267)
>   ... 16 more
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime 
> Error while processing row
>   at 
> org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:576)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.processRow(MapRecordSource.java:92)
>   ... 19 more
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: 
> org.apache.hadoop.hive.serde2.avro.AvroSerdeException: Number of input 
> columns was different than output columns (in = 2 vs out = 1
>   at 
> org.apache.hadoop.hive.ql.exec.FileSinkOperator.process(FileSinkOperator.java:1047)
>   at 
> org.apache.hadoop.hive.ql.exec.Operator.baseForward(Operator.java:994)
>   at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:940)
>   at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:927)

[jira] [Updated] (HIVE-22595) Dynamic partition inserts fail on Avro table table with external schema

2019-12-13 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-22595:
--
Attachment: HIVE-22595.2.patch

> Dynamic partition inserts fail on Avro table table with external schema
> ---
>
> Key: HIVE-22595
> URL: https://issues.apache.org/jira/browse/HIVE-22595
> Project: Hive
>  Issue Type: Bug
>  Components: Avro, Serializers/Deserializers
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-22595.1.patch, HIVE-22595.2.patch
>
>
> Example qfile test:
> {noformat}
> create external table avro_extschema_insert1 (name string) partitioned by (p1 
> string)
>   stored as avro tblproperties 
> ('avro.schema.url'='${system:test.tmp.dir}/table1.avsc');
> create external table avro_extschema_insert2 like avro_extschema_insert1;
> insert overwrite table avro_extschema_insert1 partition (p1='part1') values 
> ('col1_value', 1, 'col3_value');
> insert overwrite table avro_extschema_insert2 partition (p1) select * from 
> avro_extschema_insert1;
> {noformat}
> The last statement fails with the following error:
> {noformat}
> ], TaskAttempt 3 failed, info=[Error: Error while running task ( failure ) : 
> attempt_1575484789169_0003_4_00_00_3:java.lang.RuntimeException: 
> java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: 
> Hive Runtime Error while processing row
>   at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:296)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.run(TezProcessor.java:250)
>   at 
> org.apache.tez.runtime.LogicalIOProcessorRuntimeTask.run(LogicalIOProcessorRuntimeTask.java:374)
>   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:1730)
>   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 
> com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
>   at 
> com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:69)
>   at 
> com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
>   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: 
> org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while 
> processing row
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.processRow(MapRecordSource.java:101)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.pushRecord(MapRecordSource.java:76)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.run(MapRecordProcessor.java:426)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:267)
>   ... 16 more
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime 
> Error while processing row
>   at 
> org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:576)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.processRow(MapRecordSource.java:92)
>   ... 19 more
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: 
> org.apache.hadoop.hive.serde2.avro.AvroSerdeException: Number of input 
> columns was different than output columns (in = 2 vs out = 1
>   at 
> org.apache.hadoop.hive.ql.exec.FileSinkOperator.process(FileSinkOperator.java:1047)
>   at 
> org.apache.hadoop.hive.ql.exec.Operator.baseForward(Operator.java:994)
>   at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:940)
>   at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:927)
>   at 
> org.apache.hadoop.hive.ql.exec.SelectOperator.process(SelectOperator.java:95)
>   at 
> org.apache.hadoop.hive.ql.exec.Operator.baseForward(Operator.java:994)
>   at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:940)
>   at 
> 

[jira] [Commented] (HIVE-22599) Query results cache: 733 permissions check is not necessary

2019-12-10 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-22599?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16993059#comment-16993059
 ] 

Jason Dere commented on HIVE-22599:
---

[~gopalv], do you mind reviewing this small change?

> Query results cache: 733 permissions check is not necessary
> ---
>
> Key: HIVE-22599
> URL: https://issues.apache.org/jira/browse/HIVE-22599
> Project: Hive
>  Issue Type: Bug
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-22599.1.patch
>
>
> The query results cache initialization makes a call to 
> Utilties.ensurePathIsWritable(), which checks the results cache directory for 
> 733 permissions (default cache dir is
> {{/tmp/hive/_resultscache_).}}
> The 733 permissions (at least the 033 part) are not actually necessary - we 
> actually don't really want the results cache directory to be world-writable, 
> and the subdirectories we create within this one are actually done with 700 
> perms. So I think the call to Utilties.ensurePathIsWritable() can be removed.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HIVE-22599) Query results cache: 733 permissions check is not necessary

2019-12-10 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-22599:
--
Attachment: HIVE-22599.1.patch

> Query results cache: 733 permissions check is not necessary
> ---
>
> Key: HIVE-22599
> URL: https://issues.apache.org/jira/browse/HIVE-22599
> Project: Hive
>  Issue Type: Bug
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-22599.1.patch
>
>
> The query results cache initialization makes a call to 
> Utilties.ensurePathIsWritable(), which checks the results cache directory for 
> 733 permissions (default cache dir is
> {{/tmp/hive/_resultscache_).}}
> The 733 permissions (at least the 033 part) are not actually necessary - we 
> actually don't really want the results cache directory to be world-writable, 
> and the subdirectories we create within this one are actually done with 700 
> perms. So I think the call to Utilties.ensurePathIsWritable() can be removed.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HIVE-22599) Query results cache: 733 permissions check is not necessary

2019-12-10 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-22599:
--
Attachment: (was: HIVE-22599.1.patch)

> Query results cache: 733 permissions check is not necessary
> ---
>
> Key: HIVE-22599
> URL: https://issues.apache.org/jira/browse/HIVE-22599
> Project: Hive
>  Issue Type: Bug
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-22599.1.patch
>
>
> The query results cache initialization makes a call to 
> Utilties.ensurePathIsWritable(), which checks the results cache directory for 
> 733 permissions (default cache dir is
> {{/tmp/hive/_resultscache_).}}
> The 733 permissions (at least the 033 part) are not actually necessary - we 
> actually don't really want the results cache directory to be world-writable, 
> and the subdirectories we create within this one are actually done with 700 
> perms. So I think the call to Utilties.ensurePathIsWritable() can be removed.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HIVE-22599) Query results cache: 733 permissions check is not necessary

2019-12-08 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-22599:
--
Attachment: HIVE-22599.1.patch
Status: Patch Available  (was: Open)

> Query results cache: 733 permissions check is not necessary
> ---
>
> Key: HIVE-22599
> URL: https://issues.apache.org/jira/browse/HIVE-22599
> Project: Hive
>  Issue Type: Bug
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-22599.1.patch
>
>
> The query results cache initialization makes a call to 
> Utilties.ensurePathIsWritable(), which checks the results cache directory for 
> 733 permissions (default cache dir is
> {{/tmp/hive/_resultscache_).}}
> The 733 permissions (at least the 033 part) are not actually necessary - we 
> actually don't really want the results cache directory to be world-writable, 
> and the subdirectories we create within this one are actually done with 700 
> perms. So I think the call to Utilties.ensurePathIsWritable() can be removed.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Assigned] (HIVE-22599) Query results cache: 733 permissions check is not necessary

2019-12-08 Thread Jason Dere (Jira)


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

Jason Dere reassigned HIVE-22599:
-


> Query results cache: 733 permissions check is not necessary
> ---
>
> Key: HIVE-22599
> URL: https://issues.apache.org/jira/browse/HIVE-22599
> Project: Hive
>  Issue Type: Bug
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
>
> The query results cache initialization makes a call to 
> Utilties.ensurePathIsWritable(), which checks the results cache directory for 
> 733 permissions (default cache dir is
> {{/tmp/hive/_resultscache_).}}
> The 733 permissions (at least the 033 part) are not actually necessary - we 
> actually don't really want the results cache directory to be world-writable, 
> and the subdirectories we create within this one are actually done with 700 
> perms. So I think the call to Utilties.ensurePathIsWritable() can be removed.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (HIVE-22595) Dynamic partition inserts fail on Avro table table with external schema

2019-12-08 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-22595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16991076#comment-16991076
 ] 

Jason Dere commented on HIVE-22595:
---

Patch v1 removes Utilities.getDPColOffset() which is not correct when with 
external schema, plus testcase.

> Dynamic partition inserts fail on Avro table table with external schema
> ---
>
> Key: HIVE-22595
> URL: https://issues.apache.org/jira/browse/HIVE-22595
> Project: Hive
>  Issue Type: Bug
>  Components: Avro, Serializers/Deserializers
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-22595.1.patch
>
>
> Example qfile test:
> {noformat}
> create external table avro_extschema_insert1 (name string) partitioned by (p1 
> string)
>   stored as avro tblproperties 
> ('avro.schema.url'='${system:test.tmp.dir}/table1.avsc');
> create external table avro_extschema_insert2 like avro_extschema_insert1;
> insert overwrite table avro_extschema_insert1 partition (p1='part1') values 
> ('col1_value', 1, 'col3_value');
> insert overwrite table avro_extschema_insert2 partition (p1) select * from 
> avro_extschema_insert1;
> {noformat}
> The last statement fails with the following error:
> {noformat}
> ], TaskAttempt 3 failed, info=[Error: Error while running task ( failure ) : 
> attempt_1575484789169_0003_4_00_00_3:java.lang.RuntimeException: 
> java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: 
> Hive Runtime Error while processing row
>   at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:296)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.run(TezProcessor.java:250)
>   at 
> org.apache.tez.runtime.LogicalIOProcessorRuntimeTask.run(LogicalIOProcessorRuntimeTask.java:374)
>   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:1730)
>   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 
> com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
>   at 
> com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:69)
>   at 
> com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
>   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: 
> org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while 
> processing row
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.processRow(MapRecordSource.java:101)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.pushRecord(MapRecordSource.java:76)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.run(MapRecordProcessor.java:426)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:267)
>   ... 16 more
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime 
> Error while processing row
>   at 
> org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:576)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.processRow(MapRecordSource.java:92)
>   ... 19 more
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: 
> org.apache.hadoop.hive.serde2.avro.AvroSerdeException: Number of input 
> columns was different than output columns (in = 2 vs out = 1
>   at 
> org.apache.hadoop.hive.ql.exec.FileSinkOperator.process(FileSinkOperator.java:1047)
>   at 
> org.apache.hadoop.hive.ql.exec.Operator.baseForward(Operator.java:994)
>   at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:940)
>   at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:927)
>   at 
> org.apache.hadoop.hive.ql.exec.SelectOperator.process(SelectOperator.java:95)
>   at 
> org.apache.hadoop.hive.ql.exec.Operator.baseForward(Operator.java:994)
>   at 

[jira] [Updated] (HIVE-22595) Dynamic partition inserts fail on Avro table table with external schema

2019-12-08 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-22595:
--
Status: Patch Available  (was: Open)

> Dynamic partition inserts fail on Avro table table with external schema
> ---
>
> Key: HIVE-22595
> URL: https://issues.apache.org/jira/browse/HIVE-22595
> Project: Hive
>  Issue Type: Bug
>  Components: Avro, Serializers/Deserializers
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-22595.1.patch
>
>
> Example qfile test:
> {noformat}
> create external table avro_extschema_insert1 (name string) partitioned by (p1 
> string)
>   stored as avro tblproperties 
> ('avro.schema.url'='${system:test.tmp.dir}/table1.avsc');
> create external table avro_extschema_insert2 like avro_extschema_insert1;
> insert overwrite table avro_extschema_insert1 partition (p1='part1') values 
> ('col1_value', 1, 'col3_value');
> insert overwrite table avro_extschema_insert2 partition (p1) select * from 
> avro_extschema_insert1;
> {noformat}
> The last statement fails with the following error:
> {noformat}
> ], TaskAttempt 3 failed, info=[Error: Error while running task ( failure ) : 
> attempt_1575484789169_0003_4_00_00_3:java.lang.RuntimeException: 
> java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: 
> Hive Runtime Error while processing row
>   at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:296)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.run(TezProcessor.java:250)
>   at 
> org.apache.tez.runtime.LogicalIOProcessorRuntimeTask.run(LogicalIOProcessorRuntimeTask.java:374)
>   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:1730)
>   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 
> com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
>   at 
> com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:69)
>   at 
> com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
>   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: 
> org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while 
> processing row
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.processRow(MapRecordSource.java:101)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.pushRecord(MapRecordSource.java:76)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.run(MapRecordProcessor.java:426)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:267)
>   ... 16 more
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime 
> Error while processing row
>   at 
> org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:576)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.processRow(MapRecordSource.java:92)
>   ... 19 more
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: 
> org.apache.hadoop.hive.serde2.avro.AvroSerdeException: Number of input 
> columns was different than output columns (in = 2 vs out = 1
>   at 
> org.apache.hadoop.hive.ql.exec.FileSinkOperator.process(FileSinkOperator.java:1047)
>   at 
> org.apache.hadoop.hive.ql.exec.Operator.baseForward(Operator.java:994)
>   at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:940)
>   at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:927)
>   at 
> org.apache.hadoop.hive.ql.exec.SelectOperator.process(SelectOperator.java:95)
>   at 
> org.apache.hadoop.hive.ql.exec.Operator.baseForward(Operator.java:994)
>   at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:940)
>   at 
> 

[jira] [Updated] (HIVE-22595) Dynamic partition inserts fail on Avro table table with external schema

2019-12-08 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-22595:
--
Attachment: HIVE-22595.1.patch

> Dynamic partition inserts fail on Avro table table with external schema
> ---
>
> Key: HIVE-22595
> URL: https://issues.apache.org/jira/browse/HIVE-22595
> Project: Hive
>  Issue Type: Bug
>  Components: Avro, Serializers/Deserializers
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-22595.1.patch
>
>
> Example qfile test:
> {noformat}
> create external table avro_extschema_insert1 (name string) partitioned by (p1 
> string)
>   stored as avro tblproperties 
> ('avro.schema.url'='${system:test.tmp.dir}/table1.avsc');
> create external table avro_extschema_insert2 like avro_extschema_insert1;
> insert overwrite table avro_extschema_insert1 partition (p1='part1') values 
> ('col1_value', 1, 'col3_value');
> insert overwrite table avro_extschema_insert2 partition (p1) select * from 
> avro_extschema_insert1;
> {noformat}
> The last statement fails with the following error:
> {noformat}
> ], TaskAttempt 3 failed, info=[Error: Error while running task ( failure ) : 
> attempt_1575484789169_0003_4_00_00_3:java.lang.RuntimeException: 
> java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: 
> Hive Runtime Error while processing row
>   at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:296)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.run(TezProcessor.java:250)
>   at 
> org.apache.tez.runtime.LogicalIOProcessorRuntimeTask.run(LogicalIOProcessorRuntimeTask.java:374)
>   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:1730)
>   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 
> com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
>   at 
> com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:69)
>   at 
> com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
>   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: 
> org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while 
> processing row
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.processRow(MapRecordSource.java:101)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.pushRecord(MapRecordSource.java:76)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.run(MapRecordProcessor.java:426)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:267)
>   ... 16 more
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime 
> Error while processing row
>   at 
> org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:576)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.processRow(MapRecordSource.java:92)
>   ... 19 more
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: 
> org.apache.hadoop.hive.serde2.avro.AvroSerdeException: Number of input 
> columns was different than output columns (in = 2 vs out = 1
>   at 
> org.apache.hadoop.hive.ql.exec.FileSinkOperator.process(FileSinkOperator.java:1047)
>   at 
> org.apache.hadoop.hive.ql.exec.Operator.baseForward(Operator.java:994)
>   at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:940)
>   at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:927)
>   at 
> org.apache.hadoop.hive.ql.exec.SelectOperator.process(SelectOperator.java:95)
>   at 
> org.apache.hadoop.hive.ql.exec.Operator.baseForward(Operator.java:994)
>   at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:940)
>   at 
> 

[jira] [Commented] (HIVE-22595) Dynamic partition inserts fail on Avro table table with external schema

2019-12-06 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-22595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16990284#comment-16990284
 ] 

Jason Dere commented on HIVE-22595:
---

I think this was introduced by HIVE-11972, but I guess we never ran into this 
one until now.
In the case of an external schema we cannot rely on the column list from the 
TableDesc properties to give the correct number of columns.

> Dynamic partition inserts fail on Avro table table with external schema
> ---
>
> Key: HIVE-22595
> URL: https://issues.apache.org/jira/browse/HIVE-22595
> Project: Hive
>  Issue Type: Bug
>  Components: Avro, Serializers/Deserializers
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
>
> Example qfile test:
> {noformat}
> create external table avro_extschema_insert1 (name string) partitioned by (p1 
> string)
>   stored as avro tblproperties 
> ('avro.schema.url'='${system:test.tmp.dir}/table1.avsc');
> create external table avro_extschema_insert2 like avro_extschema_insert1;
> insert overwrite table avro_extschema_insert1 partition (p1='part1') values 
> ('col1_value', 1, 'col3_value');
> insert overwrite table avro_extschema_insert2 partition (p1) select * from 
> avro_extschema_insert1;
> {noformat}
> The last statement fails with the following error:
> {noformat}
> ], TaskAttempt 3 failed, info=[Error: Error while running task ( failure ) : 
> attempt_1575484789169_0003_4_00_00_3:java.lang.RuntimeException: 
> java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: 
> Hive Runtime Error while processing row
>   at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:296)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.run(TezProcessor.java:250)
>   at 
> org.apache.tez.runtime.LogicalIOProcessorRuntimeTask.run(LogicalIOProcessorRuntimeTask.java:374)
>   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:1730)
>   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 
> com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
>   at 
> com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:69)
>   at 
> com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
>   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: 
> org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while 
> processing row
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.processRow(MapRecordSource.java:101)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.pushRecord(MapRecordSource.java:76)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.run(MapRecordProcessor.java:426)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:267)
>   ... 16 more
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime 
> Error while processing row
>   at 
> org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:576)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.processRow(MapRecordSource.java:92)
>   ... 19 more
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: 
> org.apache.hadoop.hive.serde2.avro.AvroSerdeException: Number of input 
> columns was different than output columns (in = 2 vs out = 1
>   at 
> org.apache.hadoop.hive.ql.exec.FileSinkOperator.process(FileSinkOperator.java:1047)
>   at 
> org.apache.hadoop.hive.ql.exec.Operator.baseForward(Operator.java:994)
>   at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:940)
>   at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:927)
>   at 
> org.apache.hadoop.hive.ql.exec.SelectOperator.process(SelectOperator.java:95)
>   at 
> 

[jira] [Assigned] (HIVE-22595) Dynamic partition inserts fail on Avro table table with external schema

2019-12-06 Thread Jason Dere (Jira)


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

Jason Dere reassigned HIVE-22595:
-


> Dynamic partition inserts fail on Avro table table with external schema
> ---
>
> Key: HIVE-22595
> URL: https://issues.apache.org/jira/browse/HIVE-22595
> Project: Hive
>  Issue Type: Bug
>  Components: Avro, Serializers/Deserializers
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
>
> Example qfile test:
> {noformat}
> create external table avro_extschema_insert1 (name string) partitioned by (p1 
> string)
>   stored as avro tblproperties 
> ('avro.schema.url'='${system:test.tmp.dir}/table1.avsc');
> create external table avro_extschema_insert2 like avro_extschema_insert1;
> insert overwrite table avro_extschema_insert1 partition (p1='part1') values 
> ('col1_value', 1, 'col3_value');
> insert overwrite table avro_extschema_insert2 partition (p1) select * from 
> avro_extschema_insert1;
> {noformat}
> The last statement fails with the following error:
> {noformat}
> ], TaskAttempt 3 failed, info=[Error: Error while running task ( failure ) : 
> attempt_1575484789169_0003_4_00_00_3:java.lang.RuntimeException: 
> java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: 
> Hive Runtime Error while processing row
>   at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:296)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.run(TezProcessor.java:250)
>   at 
> org.apache.tez.runtime.LogicalIOProcessorRuntimeTask.run(LogicalIOProcessorRuntimeTask.java:374)
>   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:1730)
>   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 
> com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
>   at 
> com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:69)
>   at 
> com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
>   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: 
> org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while 
> processing row
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.processRow(MapRecordSource.java:101)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.pushRecord(MapRecordSource.java:76)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.run(MapRecordProcessor.java:426)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:267)
>   ... 16 more
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime 
> Error while processing row
>   at 
> org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:576)
>   at 
> org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.processRow(MapRecordSource.java:92)
>   ... 19 more
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: 
> org.apache.hadoop.hive.serde2.avro.AvroSerdeException: Number of input 
> columns was different than output columns (in = 2 vs out = 1
>   at 
> org.apache.hadoop.hive.ql.exec.FileSinkOperator.process(FileSinkOperator.java:1047)
>   at 
> org.apache.hadoop.hive.ql.exec.Operator.baseForward(Operator.java:994)
>   at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:940)
>   at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:927)
>   at 
> org.apache.hadoop.hive.ql.exec.SelectOperator.process(SelectOperator.java:95)
>   at 
> org.apache.hadoop.hive.ql.exec.Operator.baseForward(Operator.java:994)
>   at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:940)
>   at 
> org.apache.hadoop.hive.ql.exec.TableScanOperator.process(TableScanOperator.java:125)
>   at 
> 

[jira] [Commented] (HIVE-20801) ACID: Allow DbTxnManager to ignore non-ACID table locking

2019-12-03 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-20801?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16987340#comment-16987340
 ] 

Jason Dere commented on HIVE-20801:
---

Is anything going on with this Jira? I am +1 on this one, especially 
considering that on Apache Hive there is still the ability to have 
non-transactional managed tables.

> ACID: Allow DbTxnManager to ignore non-ACID table locking
> -
>
> Key: HIVE-20801
> URL: https://issues.apache.org/jira/browse/HIVE-20801
> Project: Hive
>  Issue Type: Bug
>  Components: Locking, Transactions
>Affects Versions: 4.0.0
>Reporter: Gopal Vijayaraghavan
>Assignee: Gopal V
>Priority: Major
>  Labels: Branch3Candidate, TODOC
> Attachments: HIVE-20801.1.patch, HIVE-20801.2.patch, 
> HIVE-20801.2.patch, HIVE-20801.3.patch, HIVE-20801.3.patch
>
>
> Enabling ACIDv1 on a cluster produces a central locking bottleneck for all 
> table types, which is not always the intention.
> The Hive locking for non-acid tables are advisory (i.e a client can 
> write/read without locking), which means that the implementation does not 
> offer strong consistency despite the lock manager consuming resources 
> centrally.
> Disabling this lock acquisition would improve the performance of non-ACID 
> tables co-existing with a globally configured DbTxnManager implementation.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (HIVE-22551) BytesColumnVector initBuffer should clean vector and length consistently

2019-11-27 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-22551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16984036#comment-16984036
 ] 

Jason Dere commented on HIVE-22551:
---

+1

> BytesColumnVector initBuffer should clean vector and length consistently 
> -
>
> Key: HIVE-22551
> URL: https://issues.apache.org/jira/browse/HIVE-22551
> Project: Hive
>  Issue Type: Bug
>Reporter: László Bodor
>Assignee: László Bodor
>Priority: Major
> Attachments: HIVE-22551.01.patch, HIVE-22551.01.patch
>
>
> VectorExtractRow relies on the fact that vector[i] and length[i] are 
> consistent within the BytesColumnVector, otherwise it throws exception:
> https://github.com/apache/hive/blob/edc53cc0d95e983c371a224943dd866210f0c65c/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorExtractRow.java#L275
> There is a scenario when only vector[i] has been cleaned while reusing the 
> column vector, and then this kind of exception can be thrown:
> the reproduction was made with 
> [LlapDump|https://github.com/apache/hive/blob/master/llap-ext-client/src/java/org/apache/hadoop/hive/llap/LlapDump.java]
>  with String columns (longer than 16 chars)
> {code}
> 19/10/17 15:55:49 ERROR llap.LlapArrowRowRecordReader: Failed to fetch Arrow 
> batch
> java.lang.RuntimeException: STRING entry: batchIndex 45
> at 
> org.apache.hadoop.hive.ql.exec.vector.VectorExtractRow.BytesReadError(VectorExtractRow.java:488)
> at 
> org.apache.hadoop.hive.ql.exec.vector.VectorExtractRow.extractRowColumn(VectorExtractRow.java:294)
> at 
> org.apache.hadoop.hive.ql.exec.vector.VectorExtractRow.extractRowColumn(VectorExtractRow.java:193)
> at 
> org.apache.hadoop.hive.ql.exec.vector.VectorExtractRow.extractRow(VectorExtractRow.java:483)
> at 
> org.apache.hadoop.hive.ql.io.arrow.Deserializer.deserialize(Deserializer.java:125)
> at 
> org.apache.hadoop.hive.ql.io.arrow.ArrowColumnarBatchSerDe.deserialize(ArrowColumnarBatchSerDe.java:284)
> at 
> org.apache.hadoop.hive.llap.LlapArrowRowRecordReader.next(LlapArrowRowRecordReader.java:75)
> at 
> org.apache.hadoop.hive.llap.LlapArrowRowRecordReader.next(LlapArrowRowRecordReader.java:41)
> at datareader.LlapDump.main(LlapDump.java:124)
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HIVE-22463) Support Decimal64 column multiplication with decimal64 Column/Scalar

2019-11-27 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-22463:
--
Fix Version/s: 4.0.0
   Resolution: Fixed
   Status: Resolved  (was: Patch Available)

Committed to master

> Support Decimal64 column multiplication with decimal64 Column/Scalar
> 
>
> Key: HIVE-22463
> URL: https://issues.apache.org/jira/browse/HIVE-22463
> Project: Hive
>  Issue Type: Bug
>Reporter: Ramesh Kumar Thangarajan
>Assignee: Ramesh Kumar Thangarajan
>Priority: Major
>  Labels: pull-request-available
> Fix For: 4.0.0
>
> Attachments: HIVE-22463.1.patch, HIVE-22463.10.patch, 
> HIVE-22463.11.patch, HIVE-22463.12.patch, HIVE-22463.13.patch, 
> HIVE-22463.2.patch, HIVE-22463.3.patch, HIVE-22463.5.patch, 
> HIVE-22463.6.patch, HIVE-22463.7.patch, HIVE-22463.8.patch, HIVE-22463.9.patch
>
>  Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> Support Decimal64 column multiplication with decimal64 Column/Scalar



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (HIVE-22530) Connection pool timeout in TxnHandler.java is hardcoded to 30 secs

2019-11-22 Thread Jason Dere (Jira)


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

Jason Dere resolved HIVE-22530.
---
Resolution: Invalid

Argh, looking at old version of Hive .. the hardcoded timeout was removed in 
HIVE-17317

> Connection pool timeout in TxnHandler.java is hardcoded to 30 secs
> --
>
> Key: HIVE-22530
> URL: https://issues.apache.org/jira/browse/HIVE-22530
> Project: Hive
>  Issue Type: Bug
>  Components: Locking
>Reporter: Jason Dere
>Priority: Major
>
> If the time to acquire locks gets long enough, we can end up running into the 
> time limit for acquiring DB connections in TxnHandler:
> {noformat}
> 2019-07-23 11:49:54,285 ERROR [HiveServer2-Background-Pool: Thread-3881156]: 
> operation.Operation (SQLOperation.java:run(258)) - Error running hive query:
> org.apache.hive.service.cli.HiveSQLException: Error while processing 
> statement: FAILED: Error in acquiring locks: Error communicating with the 
> metastore
> Caused by: org.apache.hadoop.hive.ql.lockmgr.LockException: Error 
> communicating with the metastore
> Caused by: MetaException(message:Unable to update transaction database 
> org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool 
> error Timeout waiting for idle object
> {noformat}
> This appears to be hard-coded to 30 seconds here: 
> https://github.com/apache/hive/blob/master/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java#L2359
> It may sense to either make this configurable or eliminate the timeout 
> altogether.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (HIVE-22275) OperationManager.queryIdOperation does not properly clean up multiple queryIds

2019-11-01 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-22275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16964954#comment-16964954
 ] 

Jason Dere commented on HIVE-22275:
---

Should just be HiveServer2, I don't think the LLAP daemons maintain a mapping 
of queryIDs/Operations.

> OperationManager.queryIdOperation does not properly clean up multiple queryIds
> --
>
> Key: HIVE-22275
> URL: https://issues.apache.org/jira/browse/HIVE-22275
> Project: Hive
>  Issue Type: Bug
>  Components: HiveServer2
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Fix For: 4.0.0
>
> Attachments: HIVE-22275.1.patch, HIVE-22275.2.patch
>
>
> In the case that multiple statements are run by a single Session before being 
> cleaned up, it appears that OperationManager.queryIdOperation is not cleaned 
> up properly.
> See the log statements below - with the exception of the first "Removed 
> queryId:" log line, the queryId listed during cleanup is the same, when each 
> of these handles should have their own queryId. Looks like only the last 
> queryId executed is being cleaned up.
> As a result, HS2 can run out of memory as OperationManager.queryIdOperation 
> grows and never cleans these queryIds/Operations up.
> {noformat}
> 2019-09-13T08:37:36,785 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=dfed4c18-a284-4640-9f4a-1a20527105f9]
> 2019-09-13T08:37:38,432 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Removed queryId: hive_20190913083736_c49cf3cc-cfe8-48a1-bd22-8b924dfb0396 
> corresponding to operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=dfed4c18-a284-4640-9f4a-1a20527105f9] with tag: null
> 2019-09-13T08:37:38,469 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=24d0030c-0e49-45fb-a918-2276f0941cfb]
> 2019-09-13T08:37:52,662 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=b983802c-1dec-4fa0-8680-d05ab555321b]
> 2019-09-13T08:37:56,239 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=75dbc531-2964-47b2-84d7-85b59f88999c]
> 2019-09-13T08:38:02,551 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=72c79076-9d67-4894-a526-c233fa5450b2]
> 2019-09-13T08:38:10,558 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=17b30a62-612d-4b70-9ba7-4287d2d9229b]
> 2019-09-13T08:38:16,930 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=ea97e99d-cc77-470b-b49a-b869c73a4615]
> 2019-09-13T08:38:20,440 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=a277b789-ebb8-4925-878f-6728d3e8c5fb]
> 2019-09-13T08:38:26,303 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=9a023ab8-aa80-45db-af88-94790cc83033]
> 2019-09-13T08:38:30,791 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=b697c801-7da0-4544-bcfa-442eb1d3bd77]
> 2019-09-13T08:39:10,187 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=bda93c8f-0822-4592-a61c-4701720a1a5c]
> 2019-09-13T08:39:15,471 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: 

[jira] [Updated] (HIVE-22391) NPE while checking Hive query results cache

2019-10-23 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-22391:
--
Fix Version/s: 4.0.0
   Resolution: Fixed
   Status: Resolved  (was: Patch Available)

Committed to master

> NPE while checking Hive query results cache
> ---
>
> Key: HIVE-22391
> URL: https://issues.apache.org/jira/browse/HIVE-22391
> Project: Hive
>  Issue Type: Bug
>  Components: Query Planning
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Fix For: 4.0.0
>
> Attachments: HIVE-22391.1.patch
>
>
> NPE when results cache was enabled:
> {noformat}
> 2019-10-21T14:51:55,718 ERROR [b7d7bea8-eef0-4ea4-ae12-951cb5dc96e3 
> HiveServer2-Handler-Pool: Thread-210]: ql.Driver (:()) - FAILED: 
> NullPointerException null
> java.lang.NullPointerException
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.checkResultsCache(SemanticAnalyzer.java:15061)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:12320)
> at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:360)
> at 
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:289)
> at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:664)
> at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1869)
> at 
> org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1816)
> at 
> org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1811)
> at 
> org.apache.hadoop.hive.ql.reexec.ReExecDriver.compileAndRespond(ReExecDriver.java:126)
> at 
> org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:197)
> at 
> org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:262)
> at 
> org.apache.hive.service.cli.operation.Operation.run(Operation.java:247)
> at 
> org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:575)
> at 
> org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:561)
> at 
> org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:315)
> at 
> org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:566)
> at 
> org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1557)
> at 
> org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1542)
> at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
> at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
> at 
> org.apache.hadoop.hive.metastore.security.HadoopThriftAuthBridge$Server$TUGIAssumingProcessor.process(HadoopThriftAuthBridge.java:647)
> at 
> org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HIVE-22391) NPE while checking Hive query results cache

2019-10-22 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-22391:
--
Status: Patch Available  (was: Open)

[~gopalv] can you review? Simple error handling fix within 
QueryResultsCache.initialize()

> NPE while checking Hive query results cache
> ---
>
> Key: HIVE-22391
> URL: https://issues.apache.org/jira/browse/HIVE-22391
> Project: Hive
>  Issue Type: Bug
>  Components: Query Planning
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-22391.1.patch
>
>
> NPE when results cache was enabled:
> {noformat}
> 2019-10-21T14:51:55,718 ERROR [b7d7bea8-eef0-4ea4-ae12-951cb5dc96e3 
> HiveServer2-Handler-Pool: Thread-210]: ql.Driver (:()) - FAILED: 
> NullPointerException null
> java.lang.NullPointerException
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.checkResultsCache(SemanticAnalyzer.java:15061)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:12320)
> at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:360)
> at 
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:289)
> at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:664)
> at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1869)
> at 
> org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1816)
> at 
> org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1811)
> at 
> org.apache.hadoop.hive.ql.reexec.ReExecDriver.compileAndRespond(ReExecDriver.java:126)
> at 
> org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:197)
> at 
> org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:262)
> at 
> org.apache.hive.service.cli.operation.Operation.run(Operation.java:247)
> at 
> org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:575)
> at 
> org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:561)
> at 
> org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:315)
> at 
> org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:566)
> at 
> org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1557)
> at 
> org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1542)
> at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
> at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
> at 
> org.apache.hadoop.hive.metastore.security.HadoopThriftAuthBridge$Server$TUGIAssumingProcessor.process(HadoopThriftAuthBridge.java:647)
> at 
> org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HIVE-22391) NPE while checking Hive query results cache

2019-10-22 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-22391:
--
Attachment: HIVE-22391.1.patch

> NPE while checking Hive query results cache
> ---
>
> Key: HIVE-22391
> URL: https://issues.apache.org/jira/browse/HIVE-22391
> Project: Hive
>  Issue Type: Bug
>  Components: Query Planning
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-22391.1.patch
>
>
> NPE when results cache was enabled:
> {noformat}
> 2019-10-21T14:51:55,718 ERROR [b7d7bea8-eef0-4ea4-ae12-951cb5dc96e3 
> HiveServer2-Handler-Pool: Thread-210]: ql.Driver (:()) - FAILED: 
> NullPointerException null
> java.lang.NullPointerException
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.checkResultsCache(SemanticAnalyzer.java:15061)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:12320)
> at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:360)
> at 
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:289)
> at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:664)
> at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1869)
> at 
> org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1816)
> at 
> org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1811)
> at 
> org.apache.hadoop.hive.ql.reexec.ReExecDriver.compileAndRespond(ReExecDriver.java:126)
> at 
> org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:197)
> at 
> org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:262)
> at 
> org.apache.hive.service.cli.operation.Operation.run(Operation.java:247)
> at 
> org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:575)
> at 
> org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:561)
> at 
> org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:315)
> at 
> org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:566)
> at 
> org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1557)
> at 
> org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1542)
> at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
> at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
> at 
> org.apache.hadoop.hive.metastore.security.HadoopThriftAuthBridge$Server$TUGIAssumingProcessor.process(HadoopThriftAuthBridge.java:647)
> at 
> org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (HIVE-22391) NPE while checking Hive query results cache

2019-10-22 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-22391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16957270#comment-16957270
 ] 

Jason Dere commented on HIVE-22391:
---

What happened was HS2 and the QueryResultsCache had previously hit the 
following error during HS2 initialization:
{noformat}
2019-10-21T14:50:34,602 WARN  [main]: server.HiveServer2 
(HiveServer2.java:startHiveServer2(1100)) - Error starting HiveServer2 on 
attempt 1, will retry in 6ms
java.lang.RuntimeException: Error initializing the query results cache
at 
org.apache.hive.service.server.HiveServer2.init(HiveServer2.java:266) 
~[hive-service-3.1.0.3.1.0.86-1.jar:3.1.0.3.1.0.86-1]
at 
org.apache.hive.service.server.HiveServer2.startHiveServer2(HiveServer2.java:1072)
 [hive-service-3.1.0.3.1.0.86-1.jar:3.1.0.3.1.0.86-1]
at 
org.apache.hive.service.server.HiveServer2.access$1700(HiveServer2.java:135) 
[hive-service-3.1.0.3.1.0.86-1.jar:3.1.0.3.1.0.86-1]
at 
org.apache.hive.service.server.HiveServer2$StartOptionExecutor.execute(HiveServer2.java:1341)
 [hive-service-3.1.0.3.1.0.86-1.jar:3.1.0.3.1.0.86-1]
at 
org.apache.hive.service.server.HiveServer2.main(HiveServer2.java:1185) 
[hive-service-3.1.0.3.1.0.86-1.jar:3.1.0.3.1.0.86-1]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
~[?:1.8.0_191]
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
~[?:1.8.0_191]
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[?:1.8.0_191]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_191]
at org.apache.hadoop.util.RunJar.run(RunJar.java:318) 
[hadoop-common-3.1.1.3.1.0.86-1.jar:?]
at org.apache.hadoop.util.RunJar.main(RunJar.java:232) 
[hadoop-common-3.1.1.3.1.0.86-1.jar:?]
Caused by: java.lang.RuntimeException: The dir: /tmp/hive/_resultscache_ on 
HDFS should be writable. Current permissions are: rwxr-xr-x
at 
org.apache.hadoop.hive.ql.exec.Utilities.ensurePathIsWritable(Utilities.java:4512)
 ~[hive-exec-3.1.0.3.1.0.86-1.jar:3.1.0.3.1.0.86-1]
at 
org.apache.hadoop.hive.ql.cache.results.QueryResultsCache.(QueryResultsCache.java:365)
 ~[hive-exec-3.1.0.3.1.0.86-1.jar:3.1.0.3.1.0.86-1]
at 
org.apache.hadoop.hive.ql.cache.results.QueryResultsCache.initialize(QueryResultsCache.java:395)
 ~[hive-exec-3.1.0.3.1.0.86-1.jar:3.1.0.3.1.0.86-1]
at 
org.apache.hive.service.server.HiveServer2.init(HiveServer2.java:264) 
~[hive-service-3.1.0.3.1.0.86-1.jar:3.1.0.3.1.0.86-1]
... 10 more
{noformat}

HS2 should have failed startup with this error, but it looks like HS2 
re-attempts initialization more than once (without restarting). 
QueryResultsCache.inited should have been resetted back to false (so that 
QueryResultsCache.initialize() would hit this same error again), but it looks 
like the exception handling was only catching IOException, and so 
RuntimeException was not handled within QueryResultsCache.initialize(). The 
error handling here should be fixed.

> NPE while checking Hive query results cache
> ---
>
> Key: HIVE-22391
> URL: https://issues.apache.org/jira/browse/HIVE-22391
> Project: Hive
>  Issue Type: Bug
>  Components: Query Planning
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
>
> NPE when results cache was enabled:
> {noformat}
> 2019-10-21T14:51:55,718 ERROR [b7d7bea8-eef0-4ea4-ae12-951cb5dc96e3 
> HiveServer2-Handler-Pool: Thread-210]: ql.Driver (:()) - FAILED: 
> NullPointerException null
> java.lang.NullPointerException
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.checkResultsCache(SemanticAnalyzer.java:15061)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:12320)
> at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:360)
> at 
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:289)
> at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:664)
> at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1869)
> at 
> org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1816)
> at 
> org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1811)
> at 
> org.apache.hadoop.hive.ql.reexec.ReExecDriver.compileAndRespond(ReExecDriver.java:126)
> at 
> org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:197)
> at 
> org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:262)
> at 
> org.apache.hive.service.cli.operation.Operation.run(Operation.java:247)
> at 
> 

[jira] [Assigned] (HIVE-22391) NPE while checking Hive query results cache

2019-10-22 Thread Jason Dere (Jira)


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

Jason Dere reassigned HIVE-22391:
-


> NPE while checking Hive query results cache
> ---
>
> Key: HIVE-22391
> URL: https://issues.apache.org/jira/browse/HIVE-22391
> Project: Hive
>  Issue Type: Bug
>  Components: Query Planning
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
>
> NPE when results cache was enabled:
> {noformat}
> 2019-10-21T14:51:55,718 ERROR [b7d7bea8-eef0-4ea4-ae12-951cb5dc96e3 
> HiveServer2-Handler-Pool: Thread-210]: ql.Driver (:()) - FAILED: 
> NullPointerException null
> java.lang.NullPointerException
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.checkResultsCache(SemanticAnalyzer.java:15061)
> at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:12320)
> at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:360)
> at 
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:289)
> at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:664)
> at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1869)
> at 
> org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1816)
> at 
> org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1811)
> at 
> org.apache.hadoop.hive.ql.reexec.ReExecDriver.compileAndRespond(ReExecDriver.java:126)
> at 
> org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:197)
> at 
> org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:262)
> at 
> org.apache.hive.service.cli.operation.Operation.run(Operation.java:247)
> at 
> org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:575)
> at 
> org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:561)
> at 
> org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:315)
> at 
> org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:566)
> at 
> org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1557)
> at 
> org.apache.hive.service.rpc.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1542)
> at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
> at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
> at 
> org.apache.hadoop.hive.metastore.security.HadoopThriftAuthBridge$Server$TUGIAssumingProcessor.process(HadoopThriftAuthBridge.java:647)
> at 
> org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HIVE-22275) OperationManager.queryIdOperation does not properly clean up multiple queryIds

2019-10-04 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-22275:
--
Fix Version/s: 4.0.0
   Resolution: Fixed
   Status: Resolved  (was: Patch Available)

Committed to master

> OperationManager.queryIdOperation does not properly clean up multiple queryIds
> --
>
> Key: HIVE-22275
> URL: https://issues.apache.org/jira/browse/HIVE-22275
> Project: Hive
>  Issue Type: Bug
>  Components: HiveServer2
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Fix For: 4.0.0
>
> Attachments: HIVE-22275.1.patch, HIVE-22275.2.patch
>
>
> In the case that multiple statements are run by a single Session before being 
> cleaned up, it appears that OperationManager.queryIdOperation is not cleaned 
> up properly.
> See the log statements below - with the exception of the first "Removed 
> queryId:" log line, the queryId listed during cleanup is the same, when each 
> of these handles should have their own queryId. Looks like only the last 
> queryId executed is being cleaned up.
> As a result, HS2 can run out of memory as OperationManager.queryIdOperation 
> grows and never cleans these queryIds/Operations up.
> {noformat}
> 2019-09-13T08:37:36,785 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=dfed4c18-a284-4640-9f4a-1a20527105f9]
> 2019-09-13T08:37:38,432 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Removed queryId: hive_20190913083736_c49cf3cc-cfe8-48a1-bd22-8b924dfb0396 
> corresponding to operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=dfed4c18-a284-4640-9f4a-1a20527105f9] with tag: null
> 2019-09-13T08:37:38,469 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=24d0030c-0e49-45fb-a918-2276f0941cfb]
> 2019-09-13T08:37:52,662 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=b983802c-1dec-4fa0-8680-d05ab555321b]
> 2019-09-13T08:37:56,239 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=75dbc531-2964-47b2-84d7-85b59f88999c]
> 2019-09-13T08:38:02,551 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=72c79076-9d67-4894-a526-c233fa5450b2]
> 2019-09-13T08:38:10,558 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=17b30a62-612d-4b70-9ba7-4287d2d9229b]
> 2019-09-13T08:38:16,930 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=ea97e99d-cc77-470b-b49a-b869c73a4615]
> 2019-09-13T08:38:20,440 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=a277b789-ebb8-4925-878f-6728d3e8c5fb]
> 2019-09-13T08:38:26,303 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=9a023ab8-aa80-45db-af88-94790cc83033]
> 2019-09-13T08:38:30,791 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=b697c801-7da0-4544-bcfa-442eb1d3bd77]
> 2019-09-13T08:39:10,187 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=bda93c8f-0822-4592-a61c-4701720a1a5c]
> 2019-09-13T08:39:15,471 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) 

[jira] [Updated] (HIVE-22275) OperationManager.queryIdOperation does not properly clean up multiple queryIds

2019-10-01 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-22275:
--
Attachment: HIVE-22275.2.patch

> OperationManager.queryIdOperation does not properly clean up multiple queryIds
> --
>
> Key: HIVE-22275
> URL: https://issues.apache.org/jira/browse/HIVE-22275
> Project: Hive
>  Issue Type: Bug
>  Components: HiveServer2
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-22275.1.patch, HIVE-22275.2.patch
>
>
> In the case that multiple statements are run by a single Session before being 
> cleaned up, it appears that OperationManager.queryIdOperation is not cleaned 
> up properly.
> See the log statements below - with the exception of the first "Removed 
> queryId:" log line, the queryId listed during cleanup is the same, when each 
> of these handles should have their own queryId. Looks like only the last 
> queryId executed is being cleaned up.
> As a result, HS2 can run out of memory as OperationManager.queryIdOperation 
> grows and never cleans these queryIds/Operations up.
> {noformat}
> 2019-09-13T08:37:36,785 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=dfed4c18-a284-4640-9f4a-1a20527105f9]
> 2019-09-13T08:37:38,432 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Removed queryId: hive_20190913083736_c49cf3cc-cfe8-48a1-bd22-8b924dfb0396 
> corresponding to operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=dfed4c18-a284-4640-9f4a-1a20527105f9] with tag: null
> 2019-09-13T08:37:38,469 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=24d0030c-0e49-45fb-a918-2276f0941cfb]
> 2019-09-13T08:37:52,662 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=b983802c-1dec-4fa0-8680-d05ab555321b]
> 2019-09-13T08:37:56,239 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=75dbc531-2964-47b2-84d7-85b59f88999c]
> 2019-09-13T08:38:02,551 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=72c79076-9d67-4894-a526-c233fa5450b2]
> 2019-09-13T08:38:10,558 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=17b30a62-612d-4b70-9ba7-4287d2d9229b]
> 2019-09-13T08:38:16,930 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=ea97e99d-cc77-470b-b49a-b869c73a4615]
> 2019-09-13T08:38:20,440 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=a277b789-ebb8-4925-878f-6728d3e8c5fb]
> 2019-09-13T08:38:26,303 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=9a023ab8-aa80-45db-af88-94790cc83033]
> 2019-09-13T08:38:30,791 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=b697c801-7da0-4544-bcfa-442eb1d3bd77]
> 2019-09-13T08:39:10,187 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=bda93c8f-0822-4592-a61c-4701720a1a5c]
> 2019-09-13T08:39:15,471 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Removed queryId: hive_20190913083910_c4809ca8-d8db-423c-8b6d-fbe3eee89971 
> corresponding to operation: 

[jira] [Updated] (HIVE-22275) OperationManager.queryIdOperation does not properly clean up multiple queryIds

2019-09-30 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-22275:
--
Status: Patch Available  (was: Open)

Looks like OperationManager.getQueryId() is retrieving the queryId of the last 
query that was run by the Session. We can get the queryId directly from the 
operation that was passed in. Also updated TestSessionCleanup to test the fix.

[~thejas] can you review?

> OperationManager.queryIdOperation does not properly clean up multiple queryIds
> --
>
> Key: HIVE-22275
> URL: https://issues.apache.org/jira/browse/HIVE-22275
> Project: Hive
>  Issue Type: Bug
>  Components: HiveServer2
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-22275.1.patch
>
>
> In the case that multiple statements are run by a single Session before being 
> cleaned up, it appears that OperationManager.queryIdOperation is not cleaned 
> up properly.
> See the log statements below - with the exception of the first "Removed 
> queryId:" log line, the queryId listed during cleanup is the same, when each 
> of these handles should have their own queryId. Looks like only the last 
> queryId executed is being cleaned up.
> As a result, HS2 can run out of memory as OperationManager.queryIdOperation 
> grows and never cleans these queryIds/Operations up.
> {noformat}
> 2019-09-13T08:37:36,785 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=dfed4c18-a284-4640-9f4a-1a20527105f9]
> 2019-09-13T08:37:38,432 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Removed queryId: hive_20190913083736_c49cf3cc-cfe8-48a1-bd22-8b924dfb0396 
> corresponding to operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=dfed4c18-a284-4640-9f4a-1a20527105f9] with tag: null
> 2019-09-13T08:37:38,469 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=24d0030c-0e49-45fb-a918-2276f0941cfb]
> 2019-09-13T08:37:52,662 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=b983802c-1dec-4fa0-8680-d05ab555321b]
> 2019-09-13T08:37:56,239 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=75dbc531-2964-47b2-84d7-85b59f88999c]
> 2019-09-13T08:38:02,551 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=72c79076-9d67-4894-a526-c233fa5450b2]
> 2019-09-13T08:38:10,558 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=17b30a62-612d-4b70-9ba7-4287d2d9229b]
> 2019-09-13T08:38:16,930 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=ea97e99d-cc77-470b-b49a-b869c73a4615]
> 2019-09-13T08:38:20,440 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=a277b789-ebb8-4925-878f-6728d3e8c5fb]
> 2019-09-13T08:38:26,303 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=9a023ab8-aa80-45db-af88-94790cc83033]
> 2019-09-13T08:38:30,791 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=b697c801-7da0-4544-bcfa-442eb1d3bd77]
> 2019-09-13T08:39:10,187 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=bda93c8f-0822-4592-a61c-4701720a1a5c]
> 

[jira] [Updated] (HIVE-22275) OperationManager.queryIdOperation does not properly clean up multiple queryIds

2019-09-30 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-22275:
--
Attachment: HIVE-22275.1.patch

> OperationManager.queryIdOperation does not properly clean up multiple queryIds
> --
>
> Key: HIVE-22275
> URL: https://issues.apache.org/jira/browse/HIVE-22275
> Project: Hive
>  Issue Type: Bug
>  Components: HiveServer2
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-22275.1.patch
>
>
> In the case that multiple statements are run by a single Session before being 
> cleaned up, it appears that OperationManager.queryIdOperation is not cleaned 
> up properly.
> See the log statements below - with the exception of the first "Removed 
> queryId:" log line, the queryId listed during cleanup is the same, when each 
> of these handles should have their own queryId. Looks like only the last 
> queryId executed is being cleaned up.
> As a result, HS2 can run out of memory as OperationManager.queryIdOperation 
> grows and never cleans these queryIds/Operations up.
> {noformat}
> 2019-09-13T08:37:36,785 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=dfed4c18-a284-4640-9f4a-1a20527105f9]
> 2019-09-13T08:37:38,432 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Removed queryId: hive_20190913083736_c49cf3cc-cfe8-48a1-bd22-8b924dfb0396 
> corresponding to operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=dfed4c18-a284-4640-9f4a-1a20527105f9] with tag: null
> 2019-09-13T08:37:38,469 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=24d0030c-0e49-45fb-a918-2276f0941cfb]
> 2019-09-13T08:37:52,662 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=b983802c-1dec-4fa0-8680-d05ab555321b]
> 2019-09-13T08:37:56,239 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=75dbc531-2964-47b2-84d7-85b59f88999c]
> 2019-09-13T08:38:02,551 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=72c79076-9d67-4894-a526-c233fa5450b2]
> 2019-09-13T08:38:10,558 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=17b30a62-612d-4b70-9ba7-4287d2d9229b]
> 2019-09-13T08:38:16,930 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=ea97e99d-cc77-470b-b49a-b869c73a4615]
> 2019-09-13T08:38:20,440 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=a277b789-ebb8-4925-878f-6728d3e8c5fb]
> 2019-09-13T08:38:26,303 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=9a023ab8-aa80-45db-af88-94790cc83033]
> 2019-09-13T08:38:30,791 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=b697c801-7da0-4544-bcfa-442eb1d3bd77]
> 2019-09-13T08:39:10,187 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=bda93c8f-0822-4592-a61c-4701720a1a5c]
> 2019-09-13T08:39:15,471 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Removed queryId: hive_20190913083910_c4809ca8-d8db-423c-8b6d-fbe3eee89971 
> corresponding to operation: OperationHandle 

[jira] [Assigned] (HIVE-22275) OperationManager.queryIdOperation does not properly clean up multiple queryIds

2019-09-30 Thread Jason Dere (Jira)


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

Jason Dere reassigned HIVE-22275:
-


> OperationManager.queryIdOperation does not properly clean up multiple queryIds
> --
>
> Key: HIVE-22275
> URL: https://issues.apache.org/jira/browse/HIVE-22275
> Project: Hive
>  Issue Type: Bug
>  Components: HiveServer2
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
>
> In the case that multiple statements are run by a single Session before being 
> cleaned up, it appears that OperationManager.queryIdOperation is not cleaned 
> up properly.
> See the log statements below - with the exception of the first "Removed 
> queryId:" log line, the queryId listed during cleanup is the same, when each 
> of these handles should have their own queryId. Looks like only the last 
> queryId executed is being cleaned up.
> As a result, HS2 can run out of memory as OperationManager.queryIdOperation 
> grows and never cleans these queryIds/Operations up.
> {noformat}
> 2019-09-13T08:37:36,785 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=dfed4c18-a284-4640-9f4a-1a20527105f9]
> 2019-09-13T08:37:38,432 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Removed queryId: hive_20190913083736_c49cf3cc-cfe8-48a1-bd22-8b924dfb0396 
> corresponding to operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=dfed4c18-a284-4640-9f4a-1a20527105f9] with tag: null
> 2019-09-13T08:37:38,469 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=24d0030c-0e49-45fb-a918-2276f0941cfb]
> 2019-09-13T08:37:52,662 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=b983802c-1dec-4fa0-8680-d05ab555321b]
> 2019-09-13T08:37:56,239 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=75dbc531-2964-47b2-84d7-85b59f88999c]
> 2019-09-13T08:38:02,551 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=72c79076-9d67-4894-a526-c233fa5450b2]
> 2019-09-13T08:38:10,558 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=17b30a62-612d-4b70-9ba7-4287d2d9229b]
> 2019-09-13T08:38:16,930 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=ea97e99d-cc77-470b-b49a-b869c73a4615]
> 2019-09-13T08:38:20,440 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=a277b789-ebb8-4925-878f-6728d3e8c5fb]
> 2019-09-13T08:38:26,303 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=9a023ab8-aa80-45db-af88-94790cc83033]
> 2019-09-13T08:38:30,791 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=b697c801-7da0-4544-bcfa-442eb1d3bd77]
> 2019-09-13T08:39:10,187 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> getHandleIdentifier()=bda93c8f-0822-4592-a61c-4701720a1a5c]
> 2019-09-13T08:39:15,471 INFO  [8eaa1601-f045-4ad5-9c2e-1e5944b75f6a 
> HiveServer2-Handler-Pool: Thread-202]: operation.OperationManager (:()) - 
> Removed queryId: hive_20190913083910_c4809ca8-d8db-423c-8b6d-fbe3eee89971 
> corresponding to operation: OperationHandle [opType=EXECUTE_STATEMENT, 
> 

[jira] [Commented] (HIVE-22221) Llap external client - Need to reduce LlapBaseInputFormat#getSplits() footprint

2019-09-24 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16937410#comment-16937410
 ] 

Jason Dere commented on HIVE-1:
---

+1

> Llap external client - Need to reduce LlapBaseInputFormat#getSplits() 
> footprint  
> -
>
> Key: HIVE-1
> URL: https://issues.apache.org/jira/browse/HIVE-1
> Project: Hive
>  Issue Type: Bug
>  Components: llap, UDF
>Reporter: Shubham Chaurasia
>Assignee: Shubham Chaurasia
>Priority: Major
>  Labels: pull-request-available
> Attachments: HIVE-1.1.patch, HIVE-1.2.patch, 
> HIVE-1.3.patch, HIVE-1.4.patch, HIVE-1.5.patch
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> While querying through llap external client, LlapBaseInputFormat#getSplits() 
> invokes get_splits() (GenericUDTFGetSplits) udtf under the hoods.
> GenericUDTFGetSplits returns LlapInputSplit in which planBytes[] occupies 
> around 90% of the split size.
> Depending on data size/partitions and plan,  LlapInputSplit can grow upto 1mb 
> with planBytes[] being common to all the splits and occupying more than 850 
> kb. Also, it sometimes causes OOM on HS2 depending on HS2 heap size.
> This can be resolved by separating out common parts from actual splits and 
> reassembling them at client side. 
> We can also provide an option where client can say it does not want to 
> reassemble them and can take the control of reassembling in it's hands.
> Splits can be broken like:
> 1) schema split
> 2) plan split
> 3) actual split 1
> 4) actual split 2and so on.
> This greatly reduces the memory(in my case from 5GB(~5000 splits) to around 
> 15MB) on server side  and hence the data transfer. And this eliminates OOM on 
> HS2 side.
> cc [~jdere] [~sankarh] [~thejas]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Assigned] (HIVE-1010) Implement INFORMATION_SCHEMA in Hive

2019-08-21 Thread Jason Dere (Jira)


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

Jason Dere reassigned HIVE-1010:


Assignee: Gunther Hagleitner  (was: Piotr Findeisen)

> Implement INFORMATION_SCHEMA in Hive
> 
>
> Key: HIVE-1010
> URL: https://issues.apache.org/jira/browse/HIVE-1010
> Project: Hive
>  Issue Type: New Feature
>  Components: Metastore, Query Processor, Server Infrastructure
>Reporter: Jeff Hammerbacher
>Assignee: Gunther Hagleitner
>Priority: Major
>  Labels: TODOC3.0
> Fix For: 3.0.0
>
> Attachments: HIVE-1010.10.patch, HIVE-1010.11.patch, 
> HIVE-1010.12.patch, HIVE-1010.13.patch, HIVE-1010.14.patch, 
> HIVE-1010.15.patch, HIVE-1010.16.patch, HIVE-1010.7.patch, HIVE-1010.8.patch, 
> HIVE-1010.9.patch
>
>
> INFORMATION_SCHEMA is part of the SQL92 standard and would be useful to 
> implement using our metastore.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Updated] (HIVE-22120) Fix wrong results/ArrayOutOfBound exception in left outer map joins on specific boundary conditions

2019-08-19 Thread Jason Dere (Jira)


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

Jason Dere updated HIVE-22120:
--
Fix Version/s: 4.0.0
   Resolution: Fixed
   Status: Resolved  (was: Patch Available)

Committed to master

> Fix wrong results/ArrayOutOfBound exception in left outer map joins on 
> specific boundary conditions
> ---
>
> Key: HIVE-22120
> URL: https://issues.apache.org/jira/browse/HIVE-22120
> Project: Hive
>  Issue Type: Bug
>  Components: Hive, llap, Vectorization
>Affects Versions: 4.0.0
>Reporter: Ramesh Kumar Thangarajan
>Assignee: Ramesh Kumar Thangarajan
>Priority: Major
> Fix For: 4.0.0
>
> Attachments: HIVE-22120.1.patch, HIVE-22120.2.patch, 
> HIVE-22120.3.patch
>
>
> Vectorized version of left outer map join produces wrong results or 
> encounters ArrayOutOfBound exception.
> The boundary conditions are:
>  * The complete batch of the big table should have the join key repeated for 
> all the join columns.
>  * The complete batch of the big table should have not have a matched key 
> value in the small table
>  * The repeated value should not be a null value
>  * Some rows should be filtered out as part of the on clause filter.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Commented] (HIVE-22120) Fix wrong results/ArrayOutOfBound exception in left outer map joins on specific boundary conditions

2019-08-19 Thread Jason Dere (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-22120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16910690#comment-16910690
 ] 

Jason Dere commented on HIVE-22120:
---

+1

> Fix wrong results/ArrayOutOfBound exception in left outer map joins on 
> specific boundary conditions
> ---
>
> Key: HIVE-22120
> URL: https://issues.apache.org/jira/browse/HIVE-22120
> Project: Hive
>  Issue Type: Bug
>  Components: Hive, llap, Vectorization
>Affects Versions: 4.0.0
>Reporter: Ramesh Kumar Thangarajan
>Assignee: Ramesh Kumar Thangarajan
>Priority: Major
> Attachments: HIVE-22120.1.patch, HIVE-22120.2.patch, 
> HIVE-22120.3.patch
>
>
> Vectorized version of left outer map join produces wrong results or 
> encounters ArrayOutOfBound exception.
> The boundary conditions are:
>  * The complete batch of the big table should have the join key repeated for 
> all the join columns.
>  * The complete batch of the big table should have not have a matched key 
> value in the small table
>  * The repeated value should not be a null value
>  * Some rows should be filtered out as part of the on clause filter.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)


[jira] [Commented] (HIVE-22113) Prevent LLAP shutdown on AMReporter related RuntimeException

2019-08-14 Thread Jason Dere (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-22113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16907640#comment-16907640
 ] 

Jason Dere commented on HIVE-22113:
---

+1 pending tests

> Prevent LLAP shutdown on AMReporter related RuntimeException
> 
>
> Key: HIVE-22113
> URL: https://issues.apache.org/jira/browse/HIVE-22113
> Project: Hive
>  Issue Type: Bug
>  Components: llap
>Affects Versions: 3.1.1
>Reporter: Oliver Draese
>Assignee: Oliver Draese
>Priority: Major
>  Labels: llap
> Attachments: HIVE-22113.patch
>
>
> If a task attempt cannot be removed from AMReporter (i.e. task attempt was 
> not found), the AMReporter throws a RuntimeException. This exception is not 
> caught and trickles up, causing an LLAP shutdown:
> {{2019-08-08T23:34:39,748[Wait-Queue-Scheduler-0()]:[Wait-Queue-Scheduler-0,5,main]}}{{java.lang.RuntimeException:_1563528877295_18872_3728_01_03_0't}}{{
> 
> at$AMNodeInfo.removeTaskAttempt(AMReporter.java:524)~[hive-llap-server-3.1.0.3.1.0.103-1.jar:3.1.0.3.1.0.103-1]}}{{
> 
> at(AMReporter.java:243)~[hive-llap-server-3.1.0.3.1.0.103-1.jar:3.1.0.3.1.0.103-1]}}{{
> 
> at(TaskRunnerCallable.java:384)~[hive-llap-server-3.1.0.3.1.0.103-1.jar:3.1.0.3.1.0.103-1]}}{{
> 
> at(TaskExecutorService.java:739)~[hive-llap-server-3.1.0.3.1.0.103-1.jar:3.1.0.3.1.0.103-1]}}{{
> 
> at$1100(TaskExecutorService.java:91)~[hive-llap-server-3.1.0.3.1.0.103-1.jar:3.1.0.3.1.0.103-1]}}{{
> 
> at$WaitQueueWorker.run(TaskExecutorService.java:396)~[hive-llap-server-3.1.0.3.1.0.103-1.jar:3.1.0.3.1.0.103-1]}}{{
> 
> at$RunnableAdapter.call(Executors.java:511)~[?:1.8.0_161]}}{{
> 
> at$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:108)[hive-exec-3.1.0.3.1.0.103-1.jar:3.1.0-SNAPSHOT]}}{{
> 
> at(InterruptibleTask.java:41)[hive-exec-3.1.0.3.1.0.103-1.jar:3.1.0-SNAPSHOT]}}{{
> 
> at(TrustedListenableFutureTask.java:77)[hive-exec-3.1.0.3.1.0.103-1.jar:3.1.0-SNAPSHOT]}}{{
> 
> at(ThreadPoolExecutor.java:1149)[?:1.8.0_161]}}{{
> 
> at$Worker.run(ThreadPoolExecutor.java:624)[?:1.8.0_161]}}{{
> at(Thread.java:748)[?:1.8.0_161]}}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Updated] (HIVE-22080) Prevent implicit conversion from String/char/varchar to double/decimal

2019-08-07 Thread Jason Dere (JIRA)


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

Jason Dere updated HIVE-22080:
--
Resolution: Fixed
Status: Resolved  (was: Patch Available)

Committed to master

> Prevent implicit conversion from String/char/varchar to double/decimal
> --
>
> Key: HIVE-22080
> URL: https://issues.apache.org/jira/browse/HIVE-22080
> Project: Hive
>  Issue Type: Bug
>  Components: Hive
>Affects Versions: 4.0.0
>Reporter: Ramesh Kumar Thangarajan
>Assignee: Ramesh Kumar Thangarajan
>Priority: Minor
>  Labels: pull-request-available
> Fix For: 4.0.0
>
> Attachments: HIVE-22080.1.patch, HIVE-22080.2.patch
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Implicit conversion from String family types to any non-string family types 
> are invalid. User can force the conversion by turning off the setting 
> hive.metastore.disallow.incompatible.col.type.changes. If not turned off, 
> such a conversion should throw error.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (HIVE-22080) Prevent implicit conversion from String/char/varchar to double/decimal

2019-08-06 Thread Jason Dere (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-22080?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16901579#comment-16901579
 ] 

Jason Dere commented on HIVE-22080:
---

Just wanted to call out, the previous behavior had special cases where string 
=> double/decimal conversion was allowed while the other numeric types were 
disallowed, with hive.metastore.disallow.incompatible.col.type.changes=true. 
This just makes the conversion behavior consistent (disallowed) for all numeric 
types.
Users can always set 
hive.metastore.disallow.incompatible.col.type.changes=false if they want to be 
able to change the column type from string to numeric type.

> Prevent implicit conversion from String/char/varchar to double/decimal
> --
>
> Key: HIVE-22080
> URL: https://issues.apache.org/jira/browse/HIVE-22080
> Project: Hive
>  Issue Type: Bug
>  Components: Hive
>Affects Versions: 4.0.0
>Reporter: Ramesh Kumar Thangarajan
>Assignee: Ramesh Kumar Thangarajan
>Priority: Minor
>  Labels: pull-request-available
> Fix For: 4.0.0
>
> Attachments: HIVE-22080.1.patch, HIVE-22080.2.patch
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Implicit conversion from String family types to any non-string family types 
> are invalid. User can force the conversion by turning off the setting 
> hive.metastore.disallow.incompatible.col.type.changes. If not turned off, 
> such a conversion should throw error.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (HIVE-22080) Prevent implicit conversion from String/char/varchar to double/decimal

2019-08-06 Thread Jason Dere (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-22080?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16901575#comment-16901575
 ] 

Jason Dere commented on HIVE-22080:
---

+1

> Prevent implicit conversion from String/char/varchar to double/decimal
> --
>
> Key: HIVE-22080
> URL: https://issues.apache.org/jira/browse/HIVE-22080
> Project: Hive
>  Issue Type: Bug
>  Components: Hive
>Affects Versions: 4.0.0
>Reporter: Ramesh Kumar Thangarajan
>Assignee: Ramesh Kumar Thangarajan
>Priority: Minor
>  Labels: pull-request-available
> Fix For: 4.0.0
>
> Attachments: HIVE-22080.1.patch, HIVE-22080.2.patch
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Implicit conversion from String family types to any non-string family types 
> are invalid. User can force the conversion by turning off the setting 
> hive.metastore.disallow.incompatible.col.type.changes. If not turned off, 
> such a conversion should throw error.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Updated] (HIVE-22040) Drop partition throws exception with 'Failed to delete parent: File does not exist' when the partition's parent path does not exists

2019-08-06 Thread Jason Dere (JIRA)


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

Jason Dere updated HIVE-22040:
--
   Resolution: Fixed
Fix Version/s: 4.0.0
   Status: Resolved  (was: Patch Available)

Committed to hive master, thanks for the patch [~xiepengjie]

> Drop partition throws exception with 'Failed to delete parent: File does not 
> exist' when the partition's parent path does not exists
> 
>
> Key: HIVE-22040
> URL: https://issues.apache.org/jira/browse/HIVE-22040
> Project: Hive
>  Issue Type: Improvement
>  Components: Standalone Metastore
>Affects Versions: 3.0.0
>Reporter: xiepengjie
>Assignee: xiepengjie
>Priority: Major
> Fix For: 4.0.0
>
> Attachments: HIVE-22040.01.patch, HIVE-22040.02.patch, 
> HIVE-22040.03.patch, HIVE-22040.patch
>
>
> I create a manage table with multi partition columns, when i try to drop 
> partition throws exception with 'Failed to delete parent: File does not 
> exist' when the partition's parent path does not exist. The partition's 
> metadata in mysql has been deleted, but the exception is still thrown. it 
> will fail if  connecting hiveserver2 with jdbc by java, this problem also 
> exists in master branch, I  think it is very unfriendly and we should fix it.
> Example:
> – First, create manage table with nulti partition columns, and add partitions:
> {code:java}
> drop table if exists t1;
> create table t1 (c1 int) partitioned by (year string, month string, day 
> string);
> alter table t1 add partition(year='2019', month='07', day='01');{code}
> – Second, delete the path of partition 'month=07':
> {code:java}
> hadoop fs -rm -r 
> /user/hadoop/xiepengjietest.db/drop_partition/year=2019/month=07{code}
> --  Third, when i try to drop partition, the metastore throws exception with 
> 'Failed to delete parent: File does not exist' .
> {code:java}
> alter table t1 drop partition(year='2019', month='07', day='01');
> {code}
> exception like this:
> {code:java}
> Error: Error while processing statement: FAILED: Execution Error, return code 
> 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Failed to delete parent: File 
> does not exist: 
> /user/hadoop/xiepengjietest.db/drop_partition/year=2019/month=07
> at 
> org.apache.hadoop.hdfs.server.namenode.FSDirStatAndListingOp.getContentSummaryInt(FSDirStatAndListingOp.java:493)
> at 
> org.apache.hadoop.hdfs.server.namenode.FSDirStatAndListingOp.getContentSummary(FSDirStatAndListingOp.java:140)
> at 
> org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getContentSummary(FSNamesystem.java:3995)
> at 
> org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.getContentSummary(NameNodeRpcServer.java:1202)
> at 
> org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.getContentSummary(ClientNamenodeProtocolServerSideTranslatorPB.java:883)
> at 
> org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java)
> at 
> org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:616)
> at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:982)
> at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2115)
> at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2111)
> 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:1867)
> at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2111) 
> (state=08S01,code=1)
>  {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Updated] (HIVE-22001) AcidUtils.getAcidState() can fail if Cleaner is removing files at the same time

2019-08-06 Thread Jason Dere (JIRA)


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

Jason Dere updated HIVE-22001:
--
   Resolution: Fixed
Fix Version/s: 4.0.0
   Status: Resolved  (was: Patch Available)

Committed to master, thanks for review [~ashutoshc]

> AcidUtils.getAcidState() can fail if Cleaner is removing files at the same 
> time
> ---
>
> Key: HIVE-22001
> URL: https://issues.apache.org/jira/browse/HIVE-22001
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Fix For: 4.0.0
>
> Attachments: HIVE-22001.1.patch
>
>
> Had one user hit the following error during getSplits
> {noformat}
> 2019-07-06T14:33:03,067 ERROR [4640181a-3eb7-4b3e-9a40-d7a8de9a570c 
> HiveServer2-HttpHandler-Pool: Thread-415519]: SessionState 
> (SessionState.java:printError(1247)) - Vertex failed, vertexName=Map 1, 
> vertexId=vertex_1560947172646_2452_6199_00, diagnostics=[Vertex 
> vertex_1560947172646_2452_6199_00 [Map 1] killed/failed due 
> to:ROOT_INPUT_INIT_FAILURE, Vertex Input: hive_table initializer failed, 
> vertex=vertex_1560947172646_2452_6199_00 [Map 1], java.lang.RuntimeException: 
> ORC split generation failed with exception: java.io.FileNotFoundException: 
> File hdfs://path/to/hive_table/oiddatemmdd=20190706/delta_0987070_0987070 
> does not exist.
> at 
> org.apache.hadoop.hive.ql.io.orc.OrcInputFormat.generateSplitsInfo(OrcInputFormat.java:1870)
> at 
> org.apache.hadoop.hive.ql.io.orc.OrcInputFormat.getSplits(OrcInputFormat.java:1958)
> at 
> org.apache.hadoop.hive.ql.io.HiveInputFormat.addSplitsForGroup(HiveInputFormat.java:524)
> at 
> org.apache.hadoop.hive.ql.io.HiveInputFormat.getSplits(HiveInputFormat.java:779)
> at 
> org.apache.hadoop.hive.ql.exec.tez.HiveSplitGenerator.initialize(HiveSplitGenerator.java:243)
> at 
> org.apache.tez.dag.app.dag.RootInputInitializerManager$InputInitializerCallable$1.run(RootInputInitializerManager.java:278)
> at 
> org.apache.tez.dag.app.dag.RootInputInitializerManager$InputInitializerCallable$1.run(RootInputInitializerManager.java:269)
> 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:1730)
> at 
> org.apache.tez.dag.app.dag.RootInputInitializerManager$InputInitializerCallable.call(RootInputInitializerManager.java:269)
> at 
> org.apache.tez.dag.app.dag.RootInputInitializerManager$InputInitializerCallable.call(RootInputInitializerManager.java:253)
> at 
> com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:108)
> at 
> com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:41)
> at 
> com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:77)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: java.util.concurrent.ExecutionException: 
> java.io.FileNotFoundException: File 
> hdfs://path/to/hive_table/oiddatemmdd=20190706/delta_0987070_0987070 does 
> not exist.
> at java.util.concurrent.FutureTask.report(FutureTask.java:122)
> at java.util.concurrent.FutureTask.get(FutureTask.java:192)
> at 
> org.apache.hadoop.hive.ql.io.orc.OrcInputFormat.generateSplitsInfo(OrcInputFormat.java:1809)
> ... 17 more
> Caused by: java.io.FileNotFoundException: File 
> hdfs://path/to/hive_table/oiddatemmdd=20190706/delta_0987070_0987070 does 
> not exist.
> at 
> org.apache.hadoop.hdfs.DistributedFileSystem.listStatusInternal(DistributedFileSystem.java:1059)
> at 
> org.apache.hadoop.hdfs.DistributedFileSystem.access$1000(DistributedFileSystem.java:131)
> at 
> org.apache.hadoop.hdfs.DistributedFileSystem$24.doCall(DistributedFileSystem.java:1119)
> at 
> org.apache.hadoop.hdfs.DistributedFileSystem$24.doCall(DistributedFileSystem.java:1116)
> at 
> org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81)
> at 
> org.apache.hadoop.hdfs.DistributedFileSystem.listStatus(DistributedFileSystem.java:1126)
> at org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:1868)
> at org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:1953)
> at 
> 

[jira] [Commented] (HIVE-22046) Differentiate among column stats computed by different engines

2019-08-05 Thread Jason Dere (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-22046?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16900376#comment-16900376
 ] 

Jason Dere commented on HIVE-22046:
---

+1

> Differentiate among column stats computed by different engines
> --
>
> Key: HIVE-22046
> URL: https://issues.apache.org/jira/browse/HIVE-22046
> Project: Hive
>  Issue Type: Improvement
>  Components: Metastore
>Reporter: Jesus Camacho Rodriguez
>Assignee: Jesus Camacho Rodriguez
>Priority: Major
>  Labels: pull-request-available
> Attachments: HIVE-22046.01.patch, HIVE-22046.02.patch, 
> HIVE-22046.03.patch, HIVE-22046.04.patch, HIVE-22046.05.patch, 
> HIVE-22046.06.patch, HIVE-22046.07.patch, HIVE-22046.08.patch, 
> HIVE-22046.patch
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> The goal is to avoid computation of column stats by engines to step on each 
> other, e.g., Hive and Impala. In longer term, we may introduce a common 
> representation for the column statistics stored by different engines.
> For this issue, we will add a new column 'engine' to TAB_COL_STATS HMS table 
> (unpartitioned tables) and to PART_COL_STATS HMS table (partitioned tables). 
> This will prevent conflicts at the column level stats.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (HIVE-22001) AcidUtils.getAcidState() can fail if Cleaner is removing files at the same time

2019-08-05 Thread Jason Dere (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-22001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16900313#comment-16900313
 ] 

Jason Dere commented on HIVE-22001:
---

[~vgumashta] [~ashutoshc] can you review?

> AcidUtils.getAcidState() can fail if Cleaner is removing files at the same 
> time
> ---
>
> Key: HIVE-22001
> URL: https://issues.apache.org/jira/browse/HIVE-22001
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Reporter: Jason Dere
>Assignee: Jason Dere
>Priority: Major
> Attachments: HIVE-22001.1.patch
>
>
> Had one user hit the following error during getSplits
> {noformat}
> 2019-07-06T14:33:03,067 ERROR [4640181a-3eb7-4b3e-9a40-d7a8de9a570c 
> HiveServer2-HttpHandler-Pool: Thread-415519]: SessionState 
> (SessionState.java:printError(1247)) - Vertex failed, vertexName=Map 1, 
> vertexId=vertex_1560947172646_2452_6199_00, diagnostics=[Vertex 
> vertex_1560947172646_2452_6199_00 [Map 1] killed/failed due 
> to:ROOT_INPUT_INIT_FAILURE, Vertex Input: hive_table initializer failed, 
> vertex=vertex_1560947172646_2452_6199_00 [Map 1], java.lang.RuntimeException: 
> ORC split generation failed with exception: java.io.FileNotFoundException: 
> File hdfs://path/to/hive_table/oiddatemmdd=20190706/delta_0987070_0987070 
> does not exist.
> at 
> org.apache.hadoop.hive.ql.io.orc.OrcInputFormat.generateSplitsInfo(OrcInputFormat.java:1870)
> at 
> org.apache.hadoop.hive.ql.io.orc.OrcInputFormat.getSplits(OrcInputFormat.java:1958)
> at 
> org.apache.hadoop.hive.ql.io.HiveInputFormat.addSplitsForGroup(HiveInputFormat.java:524)
> at 
> org.apache.hadoop.hive.ql.io.HiveInputFormat.getSplits(HiveInputFormat.java:779)
> at 
> org.apache.hadoop.hive.ql.exec.tez.HiveSplitGenerator.initialize(HiveSplitGenerator.java:243)
> at 
> org.apache.tez.dag.app.dag.RootInputInitializerManager$InputInitializerCallable$1.run(RootInputInitializerManager.java:278)
> at 
> org.apache.tez.dag.app.dag.RootInputInitializerManager$InputInitializerCallable$1.run(RootInputInitializerManager.java:269)
> 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:1730)
> at 
> org.apache.tez.dag.app.dag.RootInputInitializerManager$InputInitializerCallable.call(RootInputInitializerManager.java:269)
> at 
> org.apache.tez.dag.app.dag.RootInputInitializerManager$InputInitializerCallable.call(RootInputInitializerManager.java:253)
> at 
> com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:108)
> at 
> com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:41)
> at 
> com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:77)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: java.util.concurrent.ExecutionException: 
> java.io.FileNotFoundException: File 
> hdfs://path/to/hive_table/oiddatemmdd=20190706/delta_0987070_0987070 does 
> not exist.
> at java.util.concurrent.FutureTask.report(FutureTask.java:122)
> at java.util.concurrent.FutureTask.get(FutureTask.java:192)
> at 
> org.apache.hadoop.hive.ql.io.orc.OrcInputFormat.generateSplitsInfo(OrcInputFormat.java:1809)
> ... 17 more
> Caused by: java.io.FileNotFoundException: File 
> hdfs://path/to/hive_table/oiddatemmdd=20190706/delta_0987070_0987070 does 
> not exist.
> at 
> org.apache.hadoop.hdfs.DistributedFileSystem.listStatusInternal(DistributedFileSystem.java:1059)
> at 
> org.apache.hadoop.hdfs.DistributedFileSystem.access$1000(DistributedFileSystem.java:131)
> at 
> org.apache.hadoop.hdfs.DistributedFileSystem$24.doCall(DistributedFileSystem.java:1119)
> at 
> org.apache.hadoop.hdfs.DistributedFileSystem$24.doCall(DistributedFileSystem.java:1116)
> at 
> org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81)
> at 
> org.apache.hadoop.hdfs.DistributedFileSystem.listStatus(DistributedFileSystem.java:1126)
> at org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:1868)
> at org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:1953)
> at 
> org.apache.hadoop.hive.ql.io.AcidUtils$MetaDataFile.chooseFile(AcidUtils.java:1903)
> at 
> 

  1   2   3   4   5   6   7   8   9   10   >