deniskuzZ commented on code in PR #3746:
URL: https://github.com/apache/hive/pull/3746#discussion_r1032238963
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactionQueryBuilder.java:
##########
@@ -203,19 +214,23 @@ CompactionQueryBuilder setIsDeleteDelta(boolean
deleteDelta) {
* @param resultTableName the name of the table we are running the operation
on
* @throws IllegalArgumentException if compactionType is null
*/
- CompactionQueryBuilder(CompactionType compactionType, Operation operation,
+ CompactionQueryBuilder(CompactionType compactionType, Operation operation,
boolean crud,
String resultTableName) {
if (compactionType == null) {
throw new
IllegalArgumentException("CompactionQueryBuilder.CompactionType cannot be
null");
}
+ this.compactionType = compactionType;
this.operation = operation;
this.resultTableName = resultTableName;
- major = compactionType == CompactionType.MAJOR_CRUD
- || compactionType == CompactionType.MAJOR_INSERT_ONLY;
- crud =
- compactionType == CompactionType.MAJOR_CRUD || compactionType ==
CompactionType.MINOR_CRUD;
- minor = !major;
+ this.crud = crud;
insertOnly = !crud;
+ major = CompactionType.MAJOR.equals(compactionType);
+ minor = CompactionType.MINOR.equals(compactionType);
+ rebalance = CompactionType.REBALANCE.equals(compactionType);
+
+ if(rebalance && !crud) {
+ throw new IllegalArgumentException("Rebalance compaction is supported
only on ACID tables!");
Review Comment:
only on full ACID tables, insert-only table is ACID as well
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]