You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "tanishq-chugh (via GitHub)" <gi...@apache.org> on 2025/10/15 10:09:43 UTC
[PR] HIVE-29270: Remove HMS compactor workers deprecated functionality [hive]
tanishq-chugh opened a new pull request, #6132:
URL: https://github.com/apache/hive/pull/6132
<!--
Thanks for sending a pull request! Here are some tips for you:
1. If this is your first time, please read our contributor guidelines: https://cwiki.apache.org/confluence/display/Hive/HowToContribute
2. Ensure that you have created an issue on the Hive project JIRA: https://issues.apache.org/jira/projects/HIVE/summary
3. Ensure you have added or run the appropriate tests for your PR:
4. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP]HIVE-XXXXX: Your PR title ...'.
5. Be sure to keep the PR description updated to reflect all changes.
6. Please write your PR title to summarize what this PR proposes.
7. If possible, provide a concise example to reproduce the issue for a faster review.
-->
### What changes were proposed in this pull request?
<!--
Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue.
If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
2. If you fix some SQL features, you can provide some references of other DBMSes.
3. If there is design documentation, please add the link.
4. If there is a discussion in the mailing list, please add the link.
-->
### Why are the changes needed?
<!--
Please clarify why the changes are needed. For instance,
1. If you propose a new API, clarify the use case for a new API.
2. If you fix a bug, you can clarify why it is a bug.
-->
### Does this PR introduce _any_ user-facing change?
<!--
Note that it means *any* user-facing change including all aspects such as the documentation fix.
If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description, screenshot and/or a reproducable example to show the behavior difference if possible.
If possible, please also clarify if this is a user-facing change compared to the released Hive versions or within the unreleased branches such as master.
If no, write 'No'.
-->
### How was this patch tested?
<!--
If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
If tests were not added, please describe why they were not added and/or why it was difficult to add.
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29270: Remove HMS compactor workers deprecated functionality [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6132:
URL: https://github.com/apache/hive/pull/6132#discussion_r2440191780
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Initiator.java:
##########
@@ -81,6 +80,7 @@ public void run() {
startedAt = System.currentTimeMillis();
prevStart = handle.getLastUpdateTime();
+ recoverFailedCompactions();
Review Comment:
could you please add new line after
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29270: Remove HMS compactor workers deprecated functionality [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6132:
URL: https://github.com/apache/hive/pull/6132#issuecomment-3412444994
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6132) **Quality Gate passed**
Issues
 [3 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6132&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6132&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6132&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6132&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6132&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6132)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29270: Remove HMS compactor workers deprecated functionality [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6132:
URL: https://github.com/apache/hive/pull/6132#discussion_r2440059991
##########
ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestInitiator.java:
##########
@@ -90,17 +90,8 @@ public void recoverFailedLocalWorkers() throws Exception {
ShowCompactResponse rsp = txnHandler.showCompact(new ShowCompactRequest());
List<ShowCompactResponseElement> compacts = rsp.getCompacts();
Assert.assertEquals(2, compacts.size());
- boolean sawInitiated = false;
- for (ShowCompactResponseElement c : compacts) {
- if (c.getState().equals("working")) {
- Assert.assertEquals("nosuchhost-193892", c.getWorkerid());
- } else if (c.getState().equals("initiated")) {
- sawInitiated = true;
- } else {
- Assert.fail("Unexpected state");
- }
- }
- Assert.assertTrue(sawInitiated);
+ Assert.assertEquals("working", compacts.get(0).getState());
Review Comment:
````
newTable("default", "rflw1", false);
CompactionRequest rqst = new CompactionRequest("default", "rflw1", CompactionType.MINOR);
txnHandler.compact(rqst);
newTable("default", "rflw2", false);
rqst = new CompactionRequest("default", "rflw2", CompactionType.MINOR);
txnHandler.compact(rqst);
txnHandler.findNextToCompact(aFindNextCompactRequest(ServerUtils.hostname() + "-193892", "4.0.0"));
txnHandler.findNextToCompact(aFindNextCompactRequest("nosuchhost-193892", "4.0.0"));
ShowCompactResponse rsp = txnHandler.showCompact(new ShowCompactRequest());
rsp.getCompacts().forEach(ce ->
Assert.assertEquals("working", ce.getState()));
conf.setTimeVar(HiveConf.ConfVars.HIVE_COMPACTOR_WORKER_TIMEOUT, 1L, TimeUnit.MILLISECONDS);
startInitiator();
rsp = txnHandler.showCompact(new ShowCompactRequest());
rsp.getCompacts().forEach(ce ->
Assert.assertEquals("initiated", ce.getState()));
````
maybe squash both tests in 1 remove and local
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29270: Remove HMS compactor workers deprecated functionality [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6132:
URL: https://github.com/apache/hive/pull/6132#issuecomment-3418004120
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6132) **Quality Gate passed**
Issues
 [5 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6132&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6132&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6132&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6132&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6132&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6132)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29270: Remove HMS compactor workers deprecated functionality [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6132:
URL: https://github.com/apache/hive/pull/6132#issuecomment-3419423608
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6132) **Quality Gate passed**
Issues
 [5 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6132&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6132&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6132&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6132&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6132&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6132)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29270: Remove HMS compactor workers deprecated functionality [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6132:
URL: https://github.com/apache/hive/pull/6132#discussion_r2440059991
##########
ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestInitiator.java:
##########
@@ -90,17 +90,8 @@ public void recoverFailedLocalWorkers() throws Exception {
ShowCompactResponse rsp = txnHandler.showCompact(new ShowCompactRequest());
List<ShowCompactResponseElement> compacts = rsp.getCompacts();
Assert.assertEquals(2, compacts.size());
- boolean sawInitiated = false;
- for (ShowCompactResponseElement c : compacts) {
- if (c.getState().equals("working")) {
- Assert.assertEquals("nosuchhost-193892", c.getWorkerid());
- } else if (c.getState().equals("initiated")) {
- sawInitiated = true;
- } else {
- Assert.fail("Unexpected state");
- }
- }
- Assert.assertTrue(sawInitiated);
+ Assert.assertEquals("working", compacts.get(0).getState());
Review Comment:
````
public void recoverFailedRemoteWorkers() throws Exception {
newTable("default", "rflw1", false);
CompactionRequest rqst = new CompactionRequest("default", "rflw1", CompactionType.MINOR);
txnHandler.compact(rqst);
newTable("default", "rflw2", false);
rqst = new CompactionRequest("default", "rflw2", CompactionType.MINOR);
txnHandler.compact(rqst);
txnHandler.findNextToCompact(aFindNextCompactRequest(ServerUtils.hostname() + "-193892", "4.0.0"));
txnHandler.findNextToCompact(aFindNextCompactRequest("nosuchhost-193892", "4.0.0"));
ShowCompactResponse rsp = txnHandler.showCompact(new ShowCompactRequest());
rsp.getCompacts().forEach(ce ->
Assert.assertEquals("working", ce.getState()));
conf.setTimeVar(HiveConf.ConfVars.HIVE_COMPACTOR_WORKER_TIMEOUT, 1L, TimeUnit.MILLISECONDS);
startInitiator();
rsp = txnHandler.showCompact(new ShowCompactRequest());
rsp.getCompacts().forEach(ce ->
Assert.assertEquals("initiated", ce.getState()));
}
````
maybe squash both tests in 1 remove and local
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29270: Remove HMS compactor workers deprecated functionality [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6132:
URL: https://github.com/apache/hive/pull/6132#discussion_r2440103050
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Initiator.java:
##########
@@ -64,7 +64,7 @@ public void run() {
try (ExecutorService compactionExecutor = CompactorUtil.createExecutorWithThreadFactory(
conf.getIntVar(HiveConf.ConfVars.HIVE_COMPACTOR_REQUEST_QUEUE),
COMPACTOR_INTIATOR_THREAD_NAME_FORMAT)) {
- recoverFailedCompactions(false);
+ recoverFailedCompactions();
Review Comment:
do in before every iteration, no need to call in multiple places
````
try (TxnStore.MutexAPI.LockHandle handle = mutex.acquireLock(TxnStore.MUTEX_KEY.Initiator.name())) {
startedAt = System.currentTimeMillis();
prevStart = handle.getLastUpdateTime();
recoverFailedCompactions()
````
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Initiator.java:
##########
@@ -64,7 +64,7 @@ public void run() {
try (ExecutorService compactionExecutor = CompactorUtil.createExecutorWithThreadFactory(
conf.getIntVar(HiveConf.ConfVars.HIVE_COMPACTOR_REQUEST_QUEUE),
COMPACTOR_INTIATOR_THREAD_NAME_FORMAT)) {
- recoverFailedCompactions(false);
+ recoverFailedCompactions();
Review Comment:
do in before every iteration, no need to call in multiple places
````
try (TxnStore.MutexAPI.LockHandle handle = mutex.acquireLock(TxnStore.MUTEX_KEY.Initiator.name())) {
startedAt = System.currentTimeMillis();
prevStart = handle.getLastUpdateTime();
recoverFailedCompactions()
````
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29270: Remove HMS compactor workers deprecated functionality [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on PR #6132:
URL: https://github.com/apache/hive/pull/6132#issuecomment-3414363362
@tanishq-chugh besides HMS local workers support, please drop the supplemental functionality such as revokeFromLocalWorkers
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29270: Remove HMS compactor workers deprecated functionality [hive]
Posted by "tanishq-chugh (via GitHub)" <gi...@apache.org>.
tanishq-chugh commented on code in PR #6132:
URL: https://github.com/apache/hive/pull/6132#discussion_r2440201011
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Initiator.java:
##########
@@ -81,6 +80,7 @@ public void run() {
startedAt = System.currentTimeMillis();
prevStart = handle.getLastUpdateTime();
+ recoverFailedCompactions();
Review Comment:
Yes, added in commit [ed91be6](https://github.com/apache/hive/pull/6132/commits/ed91be619322d60d29b636f0c0114b7887cddc82)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29270: Remove HMS compactor workers deprecated functionality [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6132:
URL: https://github.com/apache/hive/pull/6132#issuecomment-3406010653
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6132) **Quality Gate passed**
Issues
 [3 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6132&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6132&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6132&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6132&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6132&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6132)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29270: Remove HMS compactor workers deprecated functionality [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6132:
URL: https://github.com/apache/hive/pull/6132#issuecomment-3409915609
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6132) **Quality Gate passed**
Issues
 [82 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6132&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6132&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6132&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6132&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6132&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6132)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29270: Remove HMS compactor workers deprecated functionality [hive]
Posted by "tanishq-chugh (via GitHub)" <gi...@apache.org>.
tanishq-chugh commented on PR #6132:
URL: https://github.com/apache/hive/pull/6132#issuecomment-3415555578
Addressed dropping revokeFromLocalWorkers supplementary functionality in commit - [5350c3d](https://github.com/apache/hive/pull/6132/commits/5350c3d47525cf3ba5da2b6850a6e6fc398d7f1a)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29270: Remove HMS compactor workers deprecated functionality [hive]
Posted by "tanishq-chugh (via GitHub)" <gi...@apache.org>.
tanishq-chugh commented on code in PR #6132:
URL: https://github.com/apache/hive/pull/6132#discussion_r2440180668
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Initiator.java:
##########
@@ -64,7 +64,7 @@ public void run() {
try (ExecutorService compactionExecutor = CompactorUtil.createExecutorWithThreadFactory(
conf.getIntVar(HiveConf.ConfVars.HIVE_COMPACTOR_REQUEST_QUEUE),
COMPACTOR_INTIATOR_THREAD_NAME_FORMAT)) {
- recoverFailedCompactions(false);
+ recoverFailedCompactions();
Review Comment:
Made this change in commit [ff3925d](https://github.com/apache/hive/pull/6132/commits/ff3925ddd777d5353e4bec048105e01e886cacb4)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29270: Remove HMS compactor workers deprecated functionality [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6132:
URL: https://github.com/apache/hive/pull/6132#issuecomment-3419259394
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6132) **Quality Gate passed**
Issues
 [5 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6132&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6132&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6132&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6132&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6132&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6132)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29270: Remove HMS compactor workers deprecated functionality [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6132:
URL: https://github.com/apache/hive/pull/6132#discussion_r2440007440
##########
ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestInitiator.java:
##########
@@ -90,17 +90,8 @@ public void recoverFailedLocalWorkers() throws Exception {
ShowCompactResponse rsp = txnHandler.showCompact(new ShowCompactRequest());
List<ShowCompactResponseElement> compacts = rsp.getCompacts();
Assert.assertEquals(2, compacts.size());
- boolean sawInitiated = false;
- for (ShowCompactResponseElement c : compacts) {
- if (c.getState().equals("working")) {
- Assert.assertEquals("nosuchhost-193892", c.getWorkerid());
- } else if (c.getState().equals("initiated")) {
- sawInitiated = true;
- } else {
- Assert.fail("Unexpected state");
- }
- }
- Assert.assertTrue(sawInitiated);
+ Assert.assertEquals("working", compacts.get(0).getState());
Review Comment:
what does it test? i would expect you set a small HIVE_COMPACTOR_WORKER_TIMEOUT and validate that working state changed to initiated
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29270: Remove HMS compactor workers deprecated functionality [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6132:
URL: https://github.com/apache/hive/pull/6132#discussion_r2440007440
##########
ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestInitiator.java:
##########
@@ -90,17 +90,8 @@ public void recoverFailedLocalWorkers() throws Exception {
ShowCompactResponse rsp = txnHandler.showCompact(new ShowCompactRequest());
List<ShowCompactResponseElement> compacts = rsp.getCompacts();
Assert.assertEquals(2, compacts.size());
- boolean sawInitiated = false;
- for (ShowCompactResponseElement c : compacts) {
- if (c.getState().equals("working")) {
- Assert.assertEquals("nosuchhost-193892", c.getWorkerid());
- } else if (c.getState().equals("initiated")) {
- sawInitiated = true;
- } else {
- Assert.fail("Unexpected state");
- }
- }
- Assert.assertTrue(sawInitiated);
+ Assert.assertEquals("working", compacts.get(0).getState());
Review Comment:
what does it test?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29270: Remove HMS compactor workers deprecated functionality [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6132:
URL: https://github.com/apache/hive/pull/6132#issuecomment-3416232087
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6132) **Quality Gate passed**
Issues
 [5 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6132&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6132&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6132&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6132&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6132&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6132)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29270: Remove HMS compactor workers deprecated functionality [hive]
Posted by "tanishq-chugh (via GitHub)" <gi...@apache.org>.
tanishq-chugh commented on code in PR #6132:
URL: https://github.com/apache/hive/pull/6132#discussion_r2440179545
##########
ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestInitiator.java:
##########
@@ -90,17 +90,8 @@ public void recoverFailedLocalWorkers() throws Exception {
ShowCompactResponse rsp = txnHandler.showCompact(new ShowCompactRequest());
List<ShowCompactResponseElement> compacts = rsp.getCompacts();
Assert.assertEquals(2, compacts.size());
- boolean sawInitiated = false;
- for (ShowCompactResponseElement c : compacts) {
- if (c.getState().equals("working")) {
- Assert.assertEquals("nosuchhost-193892", c.getWorkerid());
- } else if (c.getState().equals("initiated")) {
- sawInitiated = true;
- } else {
- Assert.fail("Unexpected state");
- }
- }
- Assert.assertTrue(sawInitiated);
+ Assert.assertEquals("working", compacts.get(0).getState());
Review Comment:
Yes, that actually makes more sense. Made the change in commit [6af0995](https://github.com/apache/hive/pull/6132/commits/6af099536c8490e2765a7c4e7bdc9ed21a1a8dd5)
Thanks for catching this!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29270: Remove HMS compactor workers deprecated functionality [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6132:
URL: https://github.com/apache/hive/pull/6132#discussion_r2440191780
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Initiator.java:
##########
@@ -81,6 +80,7 @@ public void run() {
startedAt = System.currentTimeMillis();
prevStart = handle.getLastUpdateTime();
+ recoverFailedCompactions();
Review Comment:
could you please add new line after and keep the comment: `// Check for timed out remote workers.`
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Initiator.java:
##########
@@ -81,6 +80,7 @@ public void run() {
startedAt = System.currentTimeMillis();
prevStart = handle.getLastUpdateTime();
+ recoverFailedCompactions();
Review Comment:
could you please add new line after and keep the comment: `// Check for timed out workers.`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29270: Remove HMS compactor workers deprecated functionality [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ merged PR #6132:
URL: https://github.com/apache/hive/pull/6132
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29270: Remove HMS compactor workers deprecated functionality [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6132:
URL: https://github.com/apache/hive/pull/6132#issuecomment-3415076277
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6132) **Quality Gate passed**
Issues
 [5 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6132&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6132&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6132&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6132&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6132&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6132)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29270: Remove HMS compactor workers deprecated functionality [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6132:
URL: https://github.com/apache/hive/pull/6132#discussion_r2440059991
##########
ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestInitiator.java:
##########
@@ -90,17 +90,8 @@ public void recoverFailedLocalWorkers() throws Exception {
ShowCompactResponse rsp = txnHandler.showCompact(new ShowCompactRequest());
List<ShowCompactResponseElement> compacts = rsp.getCompacts();
Assert.assertEquals(2, compacts.size());
- boolean sawInitiated = false;
- for (ShowCompactResponseElement c : compacts) {
- if (c.getState().equals("working")) {
- Assert.assertEquals("nosuchhost-193892", c.getWorkerid());
- } else if (c.getState().equals("initiated")) {
- sawInitiated = true;
- } else {
- Assert.fail("Unexpected state");
- }
- }
- Assert.assertTrue(sawInitiated);
+ Assert.assertEquals("working", compacts.get(0).getState());
Review Comment:
````
newTable("default", "rflw1", false);
CompactionRequest rqst = new CompactionRequest("default", "rflw1", CompactionType.MINOR);
txnHandler.compact(rqst);
newTable("default", "rflw2", false);
rqst = new CompactionRequest("default", "rflw2", CompactionType.MINOR);
txnHandler.compact(rqst);
txnHandler.findNextToCompact(aFindNextCompactRequest(ServerUtils.hostname() + "-193892", "4.0.0"));
txnHandler.findNextToCompact(aFindNextCompactRequest("nosuchhost-193892", "4.0.0"));
ShowCompactResponse rsp = txnHandler.showCompact(new ShowCompactRequest());
rsp.getCompacts().forEach(ce ->
Assert.assertEquals("working", ce.getState()));
conf.setTimeVar(HiveConf.ConfVars.HIVE_COMPACTOR_WORKER_TIMEOUT, 1L, TimeUnit.MILLISECONDS);
startInitiator();
rsp = txnHandler.showCompact(new ShowCompactRequest());
rsp.getCompacts().forEach(ce ->
Assert.assertEquals("initiated", ce.getState()));
````
maybe squash both tests in 1 remove and local
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29270: Remove HMS compactor workers deprecated functionality [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6132:
URL: https://github.com/apache/hive/pull/6132#issuecomment-3417824610
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6132) **Quality Gate passed**
Issues
 [5 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6132&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6132&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6132&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6132&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6132&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6132)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org
Re: [PR] HIVE-29270: Remove HMS compactor workers deprecated functionality [hive]
Posted by "tanishq-chugh (via GitHub)" <gi...@apache.org>.
tanishq-chugh commented on code in PR #6132:
URL: https://github.com/apache/hive/pull/6132#discussion_r2440201011
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Initiator.java:
##########
@@ -81,6 +80,7 @@ public void run() {
startedAt = System.currentTimeMillis();
prevStart = handle.getLastUpdateTime();
+ recoverFailedCompactions();
Review Comment:
Yes, added in commit [8e7d43d](https://github.com/apache/hive/pull/6132/commits/8e7d43d24fa2c6ce5c51f038959530308439ce19)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org