aturoczy commented on code in PR #4855:
URL: https://github.com/apache/hive/pull/4855#discussion_r1386281115


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergOutputCommitter.java:
##########
@@ -413,6 +415,7 @@ private void commitTable(FileIO io, ExecutorService 
executor, OutputTable output
 
     Table table = null;
     String branchName = null;
+    boolean isCompaction = false;

Review Comment:
   I'm bit problematic with the variable names. 
   IsComapction in my mind does not express rightly the variable and the domain 
model.
   I would suggest:
   
   - isCompactionEnabled
   - compactionEnabled
   - comapctionStatus (Enum in this case maybe better)
   - isCompactionActive
   - allowCompaction 
   
   I think those variable + getter setter would much more express the 
importance of this variable. cc: @ayushtkn @dengzhhu653 Please disagree if this 
is not the hive style. 



##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/compaction/IcebergMajorQueryCompactor.java:
##########
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iceberg.mr.hive.compaction;
+
+import java.io.IOException;
+import org.apache.hadoop.hive.conf.HiveConf;
+import org.apache.hadoop.hive.ql.DriverUtils;
+import org.apache.hadoop.hive.ql.metadata.HiveException;
+import org.apache.hadoop.hive.ql.session.SessionState;
+import org.apache.hadoop.hive.ql.txn.compactor.CompactorContext;
+import org.apache.hadoop.hive.ql.txn.compactor.QueryCompactor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class IcebergMajorQueryCompactor extends QueryCompactor  {
+
+  private static final Logger LOG = 
LoggerFactory.getLogger(IcebergMajorQueryCompactor.class.getName());
+
+  @Override
+  public boolean run(CompactorContext context) throws IOException, 
HiveException, InterruptedException {
+
+    String compactTableName = context.getTable().getTableName();
+    LOG.debug("Executing compaction query for table {}", compactTableName);

Review Comment:
   _Initiating compaction for the 'TableName' table._
   
   I guess it bit expressive. (Also not sure, it is for table or on table :) ) 



-- 
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]

Reply via email to