Skip to content

Commit 95fda80

Browse files
committed
Refactor code
1 parent 4784fba commit 95fda80

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

hudi-common/src/main/java/org/apache/hudi/BaseHoodieTableFileIndex.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@
6060
import lombok.Getter;
6161
import lombok.Value;
6262
import lombok.extern.slf4j.Slf4j;
63-
import org.jetbrains.annotations.NotNull;
6463

6564
import java.io.IOException;
6665
import java.io.Serializable;
@@ -281,8 +280,9 @@ private Map<PartitionPath, List<FileSlice>> loadFileSlicesForPartitions(List<Par
281280

282281
HoodieTimer timer = HoodieTimer.start();
283282
List<StoragePathInfo> allFiles = listPartitionPathFiles(partitions, activeTimeline);
284-
log.info("On {} with query instant as {}, it took {}ms to list all files in Hudi partitions",
285-
metaClient.getTableConfig().getTableName(), queryInstant.map(instant -> instant).orElse("N/A"), timer.endTimer());
283+
log.info("On {} with query instant as {}, it took {}ms to list all files {} Hudi partitions",
284+
metaClient.getTableConfig().getTableName(), queryInstant.map(instant -> instant).orElse("N/A"),
285+
timer.endTimer(), partitions.size());
286286

287287
if (useROPathFilterForListing && !shouldIncludePendingCommits) {
288288
// Group files by partition path, then by file group ID
@@ -307,7 +307,7 @@ private Map<PartitionPath, List<FileSlice>> loadFileSlicesForPartitions(List<Par
307307
return filterFiles(partitions, activeTimeline, allFiles, queryInstant);
308308
}
309309

310-
private @NotNull Map<PartitionPath, @NotNull List<FileSlice>> filterFiles(List<PartitionPath> partitions,
310+
private Map<PartitionPath, List<FileSlice>> filterFiles(List<PartitionPath> partitions,
311311
HoodieTimeline activeTimeline,
312312
List<StoragePathInfo> allFiles,
313313
Option<String> queryInstant) {

hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/DataSourceOptions.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ object DataSourceReadOptions {
231231
ConfigProperty.key("hoodie.datasource.read.file.index.list.file.statuses.using.ro.path.filter")
232232
.defaultValue(false)
233233
.markAdvanced()
234-
.sinceVersion("0.14.1")
234+
.sinceVersion("1.2.0")
235235
.withDocumentation("Controls whether file listing is done using the HoodieROTablePathFilter. " +
236236
" This is mainly necessary if the dataset has multiple versions of the same file in the same partition. " +
237237
" and could lead to Out of Memory on the driver if the dataset is large.")

hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/SparkHoodieTableFileIndex.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ import org.apache.hudi.HoodieConversionUtils.toJavaOption
2323
import org.apache.hudi.SparkHoodieTableFileIndex.{deduceQueryType, extractEqualityPredicatesLiteralValues, generateFieldMap, haveProperPartitionValues, shouldListLazily, shouldUsePartitionPathPrefixAnalysis, shouldValidatePartitionColumns}
2424
import org.apache.hudi.client.common.HoodieSparkEngineContext
2525
import org.apache.hudi.common.config.{HoodieCommonConfig, TypedProperties}
26-
import org.apache.hudi.common.fs.FSUtils
27-
import org.apache.hudi.common.model.{FileSlice, HoodieTableQueryType, HoodieTableType}
26+
import org.apache.hudi.common.model.{FileSlice, HoodieTableQueryType}
2827
import org.apache.hudi.common.model.HoodieRecord.HOODIE_META_COLUMNS_WITH_OPERATION
2928
import org.apache.hudi.common.schema.HoodieSchema
3029
import org.apache.hudi.common.table.{HoodieTableMetaClient, TableSchemaResolver}

0 commit comments

Comments
 (0)