You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2021/11/05 20:58:14 UTC

[GitHub] [hudi] vinothchandar commented on a change in pull request #3889: [HUDI-2443] Hudi KVComparator for all HFile writer usages

vinothchandar commented on a change in pull request #3889:
URL: https://github.com/apache/hudi/pull/3889#discussion_r743971409



##########
File path: hudi-common/src/main/java/org/apache/hudi/common/util/HoodieKVComparator.java
##########
@@ -0,0 +1,29 @@
+/*
+ * 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.hudi.common.util;

Review comment:
       `util` is not a great name IMO. lets have this in `common.io.storage` 

##########
File path: hudi-common/src/main/java/org/apache/hudi/common/table/log/block/HoodieHFileDataBlock.java
##########
@@ -103,7 +104,7 @@ public HoodieLogBlockType getBlockType() {
     FSDataOutputStream ostream = new FSDataOutputStream(baos, null);
 
     HFile.Writer writer = HFile.getWriterFactory(conf, cacheConfig)
-        .withOutputStream(ostream).withFileContext(context).create();
+        .withOutputStream(ostream).withFileContext(context).withComparator(new HoodieKVComparator()).create();

Review comment:
       Lets make sure bootstrap index writing does not use this code path. again problematic 

##########
File path: hudi-common/src/main/java/org/apache/hudi/common/bootstrap/index/HFileBootstrapIndex.java
##########
@@ -577,10 +578,4 @@ public String getName() {
     }
   }
 
-  /**
-   * This class is explicitly used as Key Comparator to workaround hard coded
-   * legacy format class names inside HBase. Otherwise we will face issues with shading.
-   */
-  public static class HoodieKVComparator extends KeyValue.KVComparator {

Review comment:
       we cannot remove this, since bootstrap index already uses this. lets retain this here. 




-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org