anuragmantri commented on code in PR #18238:
URL: https://github.com/apache/iceberg/pull/18238#discussion_r4170440476
##########
parquet/src/main/java/org/apache/iceberg/parquet/Parquet.java:
##########
@@ -1552,7 +1556,6 @@ public <D> CloseableIterable<D> build() {
optionsBuilder.withDecryption(fileDecryptionProperties);
}
- optionsBuilder.withUseHadoopVectoredIo(true);
Review Comment:
I'm OK with this. Compared with 1.11 and 1.12, nothing changes for anyone
who hasn't set the key. Parquet-java 1.16+ already defaults
`parquet.hadoop.vectored.io.enabled` to true, and `applyVectoredIoDefault`
keeps that default for 1.14/1.15. Turning it off is safe for correctness.
For users upgrading from older releases, `HadoopFileIO` with `false` in the
Hadoop conf gets its 1.10 behavior back, which 1.11 broke. 1.9 `HadoopFileIO`
users who never set the key will see vectored IO on, but that comes from the
parquet-java 1.16 default shipped in 1.10, not from this PR.
However, for `S3FileIO`, GCS and ADLS, the input file isn't
`HadoopConfigurable`, and Spark never calls `set()` with this key. Users of
those FileIOs on 1.10 or earlier never used vectored IO, so if they upgrade, it
will turn on with no way to turn it off, is there?
##########
parquet/src/test/java/org/apache/iceberg/parquet/TestParquetReadProperties.java:
##########
@@ -0,0 +1,129 @@
+/*
+ * 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.parquet;
+
+import static org.apache.iceberg.types.Types.NestedField.required;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.Path;
+import org.apache.iceberg.PartitionSpec;
+import org.apache.iceberg.Schema;
+import org.apache.iceberg.data.GenericRecord;
+import org.apache.iceberg.data.Record;
+import org.apache.iceberg.data.parquet.GenericParquetWriter;
+import org.apache.iceberg.data.parquet.InternalReader;
+import org.apache.iceberg.hadoop.HadoopOutputFile;
+import org.apache.iceberg.inmemory.InMemoryOutputFile;
+import org.apache.iceberg.io.CloseableIterable;
+import org.apache.iceberg.io.DataWriter;
+import org.apache.iceberg.io.InputFile;
+import org.apache.iceberg.io.OutputFile;
+import org.apache.iceberg.relocated.com.google.common.collect.ImmutableList;
+import org.apache.iceberg.relocated.com.google.common.collect.ImmutableMap;
+import org.apache.iceberg.types.Types;
+import org.junit.jupiter.api.io.TempDir;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.EnumSource;
+
+class TestParquetReadProperties {
Review Comment:
I think it's worth adding a test for an explicit
`parquet.hadoop.vectored.io.enabled=false`. It would catch someone re-adding
the hardcoded `true`, which is the regression in #16600.
#16614 had one that counted `readVectored` calls on a `RangeReadable`
stream, which might be reusable 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: [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]