[jira] [Commented] (HIVE-14779) make DbTxnManager.HeartbeaterThread a daemon

2016-09-19 Thread Alan Gates (JIRA)

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

Alan Gates commented on HIVE-14779:
---

+1, see comments above.

> make DbTxnManager.HeartbeaterThread a daemon
> 
>
> Key: HIVE-14779
> URL: https://issues.apache.org/jira/browse/HIVE-14779
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Affects Versions: 1.3.0, 2.1.0
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Minor
> Attachments: HIVE-14779.patch
>
>
> setDaemon(true);
> make heartbeaterThreadPoolSize static 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14779) make DbTxnManager.HeartbeaterThread a daemon

2016-09-19 Thread Alan Gates (JIRA)

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

Alan Gates commented on HIVE-14779:
---

Ok, so I agree this doesn't make the situation any worse, and in fact makes it 
better since it will avoid the situation where everything dies but the 
heartbeat thread and that thread keeps the VM alive and keeps heartbeating.  At 
some point in the future I do think we should solve the issue where a hanging 
CLI client could hang the system.

> make DbTxnManager.HeartbeaterThread a daemon
> 
>
> Key: HIVE-14779
> URL: https://issues.apache.org/jira/browse/HIVE-14779
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Affects Versions: 1.3.0, 2.1.0
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Minor
> Attachments: HIVE-14779.patch
>
>
> setDaemon(true);
> make heartbeaterThreadPoolSize static 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14779) make DbTxnManager.HeartbeaterThread a daemon

2016-09-16 Thread Eugene Koifman (JIRA)

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

Eugene Koifman commented on HIVE-14779:
---

If the client is something like CLI, then if VM crashes - all threads go away.
If the client thread just hangs forever, there is no way to know that the 
client died - as long as hearbeat is done in a separate thread (wherever it is) 
it will go on.

For HS2, the Sessions are cleaned up automatically when client goes away.  
There are several variables that can be configured to define what "goes away" 
mean.  Depending on how the client connects, it may be immediate (TCP 
connection broken) or based on inactivity period for HTTP based connections.



> make DbTxnManager.HeartbeaterThread a daemon
> 
>
> Key: HIVE-14779
> URL: https://issues.apache.org/jira/browse/HIVE-14779
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Affects Versions: 1.3.0, 2.1.0
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Minor
> Attachments: HIVE-14779.patch
>
>
> setDaemon(true);
> make heartbeaterThreadPoolSize static 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14779) make DbTxnManager.HeartbeaterThread a daemon

2016-09-16 Thread Alan Gates (JIRA)

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

Alan Gates commented on HIVE-14779:
---

What if the client never calls SessionState.close because the thread dies or 
hangs?

> make DbTxnManager.HeartbeaterThread a daemon
> 
>
> Key: HIVE-14779
> URL: https://issues.apache.org/jira/browse/HIVE-14779
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Affects Versions: 1.3.0, 2.1.0
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Minor
> Attachments: HIVE-14779.patch
>
>
> setDaemon(true);
> make heartbeaterThreadPoolSize static 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14779) make DbTxnManager.HeartbeaterThread a daemon

2016-09-16 Thread Eugene Koifman (JIRA)

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

Eugene Koifman commented on HIVE-14779:
---

SessionState.close() -> HiveTxnManager.closeTxnManager() -> stopHeartbeat()

Are you worried that making these threads daemon threads changes current 
behavior?




> make DbTxnManager.HeartbeaterThread a daemon
> 
>
> Key: HIVE-14779
> URL: https://issues.apache.org/jira/browse/HIVE-14779
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Affects Versions: 1.3.0, 2.1.0
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Minor
> Attachments: HIVE-14779.patch
>
>
> setDaemon(true);
> make heartbeaterThreadPoolSize static 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14779) make DbTxnManager.HeartbeaterThread a daemon

2016-09-16 Thread Alan Gates (JIRA)

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

Alan Gates commented on HIVE-14779:
---

I'm sorry, I'm still confused.  What I want to make sure is that when a 
particular client dies, the heartbeat stops.  Once you switch the heartbeat to 
a daemon thread I'm not sure how that happens.  Can you explain how that will 
work?

> make DbTxnManager.HeartbeaterThread a daemon
> 
>
> Key: HIVE-14779
> URL: https://issues.apache.org/jira/browse/HIVE-14779
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Affects Versions: 1.3.0, 2.1.0
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Minor
> Attachments: HIVE-14779.patch
>
>
> setDaemon(true);
> make heartbeaterThreadPoolSize static 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14779) make DbTxnManager.HeartbeaterThread a daemon

2016-09-16 Thread Hive QA (JIRA)

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

Hive QA commented on HIVE-14779:




Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12828877/HIVE-14779.patch

{color:red}ERROR:{color} -1 due to no test(s) being added or modified.

{color:red}ERROR:{color} -1 due to 7 failed/errored test(s), 10561 tests 
executed
*Failed tests:*
{noformat}
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[acid_mapjoin]
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[ctas]
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[vector_join_part_col_char]
org.apache.hadoop.hive.cli.TestMiniLlapCliDriver.testCliDriver[acid_bucket_pruning]
org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver[explainuser_3]
org.apache.hadoop.hive.metastore.TestMetaStoreMetrics.testMetaDataCounts
org.apache.hive.jdbc.TestJdbcWithMiniHS2.testAddJarConstructorUnCaching
{noformat}

Test results: 
https://builds.apache.org/job/PreCommit-HIVE-MASTER-Build/1213/testReport
Console output: 
https://builds.apache.org/job/PreCommit-HIVE-MASTER-Build/1213/console
Test logs: 
http://ec2-204-236-174-241.us-west-1.compute.amazonaws.com/logs/PreCommit-HIVE-MASTER-Build-1213/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
Tests exited with: TestsFailedException: 7 tests failed
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12828877 - PreCommit-HIVE-MASTER-Build

> make DbTxnManager.HeartbeaterThread a daemon
> 
>
> Key: HIVE-14779
> URL: https://issues.apache.org/jira/browse/HIVE-14779
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Affects Versions: 1.3.0, 2.1.0
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Minor
> Attachments: HIVE-14779.patch
>
>
> setDaemon(true);
> make heartbeaterThreadPoolSize static 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14779) make DbTxnManager.HeartbeaterThread a daemon

2016-09-16 Thread Eugene Koifman (JIRA)

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

Eugene Koifman commented on HIVE-14779:
---

If the threads in this pool are the only ones left, I assume it's OK to let the 
VM exit.  In practice I'd only expect this to happen in test scenarios.

> make DbTxnManager.HeartbeaterThread a daemon
> 
>
> Key: HIVE-14779
> URL: https://issues.apache.org/jira/browse/HIVE-14779
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Affects Versions: 1.3.0, 2.1.0
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Minor
> Attachments: HIVE-14779.patch
>
>
> setDaemon(true);
> make heartbeaterThreadPoolSize static 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-14779) make DbTxnManager.HeartbeaterThread a daemon

2016-09-16 Thread Alan Gates (JIRA)

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

Alan Gates commented on HIVE-14779:
---

What's the thinking here?  We want to make sure this thread dies if the client 
dies.

> make DbTxnManager.HeartbeaterThread a daemon
> 
>
> Key: HIVE-14779
> URL: https://issues.apache.org/jira/browse/HIVE-14779
> Project: Hive
>  Issue Type: Bug
>  Components: Transactions
>Affects Versions: 1.3.0, 2.1.0
>Reporter: Eugene Koifman
>Assignee: Eugene Koifman
>Priority: Minor
> Attachments: HIVE-14779.patch
>
>
> setDaemon(true);
> make heartbeaterThreadPoolSize static 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)