-
Notifications
You must be signed in to change notification settings - Fork 4.8k
HIVE-24586: Rename compaction 'attempted' status #1831
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| ShowCompactResponse rsp = txnHandler.showCompact(new ShowCompactRequest()); | ||
| List<ShowCompactResponseElement> compacts = rsp.getCompacts(); | ||
| Assert.assertEquals(1, compacts.size()); | ||
| Assert.assertEquals("did not initiate", compacts.get(0).getState()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just noticed that in Initiator.scheduleCompactionIfRequired the exception is not passed to CompactionInfo, so it won't get saved. Could you also fix that, and here you could check if it was saved correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch, will do!
|
You should also modify the COMPACTIONS view in sys db (hive-schema-4.0.0.hive.sql) |
|
LGTM +1 |
| COMPACTOR_HISTORY_RETENTION_ATTEMPTED("hive.compactor.history.retention.attempted", 2, | ||
| new RangeValidator(0, 100), "Determines how many attempted compaction records will be " + | ||
| "retained in compaction history for a given table/partition."), | ||
| @Deprecated COMPACTOR_HISTORY_RETENTION_DID_NOT_INITIATE("hive.compactor.history.retention.attempted", 2, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we use configuration deprecation to change the name of the config as well? Otherwise we will carry this baggage forever.
| import java.util.concurrent.TimeUnit; | ||
| import java.util.concurrent.atomic.AtomicBoolean; | ||
|
|
||
| import static org.apache.hadoop.hive.ql.txn.compactor.CompactorTestUtilities.CompactorThreadType; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why static import?
pvary
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 pending tests
pvary
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @klcopp! +1 LGTM
What changes were proposed in this pull request?
Rename compaction 'attempted' status to 'did not initiate'
Why are the changes needed?
See HIVE-24587.
Does this PR introduce any user-facing change?
Show compactions and sys.COMPACTIONS tables will list "attempted" status as "did not initiate" now.
How was this patch tested?
Unit test for case of initiator failure.