1
0

[HUDI-1731] Rename UpsertPartitioner in hudi-java-client (#2734)

Co-authored-by: lei.zhu <lei.zhu@envisioncn.com>
This commit is contained in:
leo-Iamok
2021-03-31 11:06:04 +08:00
committed by GitHub
parent 3cab928b50
commit 8bc65b9318
2 changed files with 7 additions and 7 deletions

View File

@@ -228,8 +228,8 @@ public abstract class BaseJavaCommitActionExecutor<T extends HoodieRecordPayload
@SuppressWarnings("unchecked")
protected Iterator<List<WriteStatus>> handleUpsertPartition(String instantTime, Integer partition, Iterator recordItr,
Partitioner partitioner) {
UpsertPartitioner upsertPartitioner = (UpsertPartitioner) partitioner;
BucketInfo binfo = upsertPartitioner.getBucketInfo(partition);
JavaUpsertPartitioner javaUpsertPartitioner = (JavaUpsertPartitioner) partitioner;
BucketInfo binfo = javaUpsertPartitioner.getBucketInfo(partition);
BucketType btype = binfo.bucketType;
try {
if (btype.equals(BucketType.INSERT)) {
@@ -314,7 +314,7 @@ public abstract class BaseJavaCommitActionExecutor<T extends HoodieRecordPayload
if (profile == null) {
throw new HoodieUpsertException("Need workload profile to construct the upsert partitioner.");
}
return new UpsertPartitioner(profile, context, table, config);
return new JavaUpsertPartitioner(profile, context, table, config);
}
/**

View File

@@ -51,9 +51,9 @@ import java.util.stream.Collectors;
/**
* Packs incoming records to be upserted, into buckets.
*/
public class UpsertPartitioner<T extends HoodieRecordPayload<T>> implements Partitioner {
public class JavaUpsertPartitioner<T extends HoodieRecordPayload<T>> implements Partitioner {
private static final Logger LOG = LogManager.getLogger(UpsertPartitioner.class);
private static final Logger LOG = LogManager.getLogger(JavaUpsertPartitioner.class);
/**
* List of all small files to be corrected.
@@ -84,8 +84,8 @@ public class UpsertPartitioner<T extends HoodieRecordPayload<T>> implements Part
protected final HoodieWriteConfig config;
public UpsertPartitioner(WorkloadProfile profile, HoodieEngineContext context, HoodieTable table,
HoodieWriteConfig config) {
public JavaUpsertPartitioner(WorkloadProfile profile, HoodieEngineContext context, HoodieTable table,
HoodieWriteConfig config) {
updateLocationToBucket = new HashMap<>();
partitionPathToInsertBucketInfos = new HashMap<>();
bucketInfoMap = new HashMap<>();