yihua commented on code in PR #11163:
URL: https://github.com/apache/hudi/pull/11163#discussion_r1595002711


##########
hudi-common/src/main/java/org/apache/hudi/io/storage/HoodieOrcConfig.java:
##########
@@ -29,21 +30,21 @@ public class HoodieOrcConfig {
   private final int stripeSize;
   private final int blockSize;
   private final long maxFileSize;
-  private final Configuration hadoopConf;
+  private final StorageConfiguration<?> conf;

Review Comment:
   ```suggestion
     private final StorageConfiguration<?> storageConf;
   ```



##########
hudi-common/src/main/java/org/apache/hudi/parquet/io/OutputStreamBackedOutputFile.java:
##########
@@ -33,9 +34,9 @@ public class OutputStreamBackedOutputFile implements 
OutputFile {
 
   private static final long DEFAULT_BLOCK_SIZE = 1024L * 1024L;
 
-  private final FSDataOutputStream outputStream;
+  private final SeekableDataOutputStream outputStream;

Review Comment:
   Looks like this class is using Parquet library, which can be moved to 
`hudi-hadoop-common` module.



##########
hudi-hadoop-common/src/main/java/org/apache/hudi/hadoop/fs/HadoopSeekableDataOutputStream.java:
##########
@@ -0,0 +1,49 @@
+/*
+ * 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.hadoop.fs;
+
+import org.apache.hudi.io.SeekableDataOutputStream;
+
+import org.apache.hadoop.fs.FSDataOutputStream;
+
+import java.io.IOException;
+
+public class HadoopSeekableDataOutputStream extends SeekableDataOutputStream {

Review Comment:
   Javadocs



##########
hudi-hadoop-common/src/test/java/org/apache/hudi/io/storage/TestHoodieBaseParquetWriter.java:
##########
@@ -83,7 +84,7 @@ public void setCurrentDataSize(long currentDataSize) {
   public void testCanWrite() throws IOException {
     BloomFilter filter = BloomFilterFactory.createBloomFilter(1000, 0.0001, 
10000,
         BloomFilterTypeCode.DYNAMIC_V0.name());
-    Configuration hadoopConf = new Configuration();
+    StorageConfiguration conf = new HadoopStorageConfiguration();

Review Comment:
   ```suggestion
       StorageConfiguration conf = getDefaultStorageConf();
   ```



##########
hudi-common/src/main/java/org/apache/hudi/io/storage/HoodieParquetConfig.java:
##########
@@ -31,18 +32,18 @@ public class HoodieParquetConfig<T> {
   private final int blockSize;
   private final int pageSize;
   private final long maxFileSize;
-  private final Configuration hadoopConf;
+  private final StorageConfiguration<?> conf;

Review Comment:
   ```suggestion
     private final StorageConfiguration<?> storageConf;
   ```



##########
hudi-common/src/test/java/org/apache/hudi/common/testutils/reader/HoodieFileSliceTestUtils.java:
##########
@@ -244,7 +251,7 @@ public static HoodieBaseFile createBaseFile(
       Schema schema,
       String baseInstantTime
   ) throws IOException {
-    Configuration hadoopConf = new Configuration();
+    StorageConfiguration conf = HoodieStorageUtils.getNewStorageConf();

Review Comment:
   To be fixed after rebasing.



##########
hudi-hadoop-common/src/main/java/org/apache/hudi/io/storage/HoodieHFileUtils.java:
##########
@@ -40,6 +43,39 @@
  * Util class for HFile reading and writing in Hudi
  */
 public class HoodieHFileUtils {
+
+  static class SeekableByteArrayInputStream extends ByteBufferBackedInputStream

Review Comment:
   Should this be in an independent file without being nested in 
`HoodieHFileUtils`?



##########
hudi-hadoop-common/src/main/java/org/apache/hudi/io/storage/HoodieNativeAvroHFileReader.java:
##########


Review Comment:
   This class should stay in `hudi-common` since it uses our own HFile reader 
and does not rely on any Hadoop dependency.



##########
hudi-hadoop-common/src/test/java/org/apache/hudi/io/storage/TestHoodieOrcReaderWriter.java:
##########
@@ -57,7 +58,7 @@ protected StoragePath getFilePath() {
   protected HoodieAvroOrcWriter createWriter(
       Schema avroSchema, boolean populateMetaFields) throws Exception {
     BloomFilter filter = BloomFilterFactory.createBloomFilter(1000, 0.00001, 
-1, BloomFilterTypeCode.SIMPLE.name());
-    Configuration conf = new Configuration();
+    StorageConfiguration conf = new HadoopStorageConfiguration();

Review Comment:
   ```suggestion
       StorageConfiguration conf = getDefaultStorageConf();
   ```



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

Reply via email to