feature(hudi-query): 增加未完成压缩时间线和压缩计划内容查询
未完成压缩时间线经常使用,用于压缩列表查询
This commit is contained in:
@@ -0,0 +1,110 @@
|
||||
package com.lanyuanxiaoyao.service.configuration.entity.hudi;
|
||||
|
||||
import org.eclipse.collections.api.list.ImmutableList;
|
||||
import org.eclipse.collections.api.map.ImmutableMap;
|
||||
|
||||
/**
|
||||
* Hudi 压缩计划
|
||||
*
|
||||
* @author lanyuanxiaoyao
|
||||
* @date 2023-05-11
|
||||
*/
|
||||
public final class HudiCompactionPlan {
|
||||
private ImmutableList<Operation> operations;
|
||||
private ImmutableMap<String, String> extraMetadata;
|
||||
private Integer version;
|
||||
|
||||
public HudiCompactionPlan() {
|
||||
}
|
||||
|
||||
public HudiCompactionPlan(ImmutableList<Operation> operations, ImmutableMap<String, String> extraMetadata, Integer version) {
|
||||
this.operations = operations;
|
||||
this.extraMetadata = extraMetadata;
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public ImmutableList<Operation> getOperations() {
|
||||
return operations;
|
||||
}
|
||||
|
||||
public ImmutableMap<String, String> getExtraMetadata() {
|
||||
return extraMetadata;
|
||||
}
|
||||
|
||||
public Integer getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "HudiCompactionPlan{" +
|
||||
"operations=" + operations +
|
||||
", extraMetadata=" + extraMetadata +
|
||||
", version=" + version +
|
||||
'}';
|
||||
}
|
||||
|
||||
public static final class Operation {
|
||||
private String baseInstantTime;
|
||||
private ImmutableList<String> deltaFilePaths;
|
||||
private String dataFilePath;
|
||||
private String fileId;
|
||||
private String partitionPath;
|
||||
private ImmutableMap<String, Double> metrics;
|
||||
private String bootstrapFilePath;
|
||||
|
||||
public Operation() {
|
||||
}
|
||||
|
||||
public Operation(String baseInstantTime, ImmutableList<String> deltaFilePaths, String dataFilePath, String fileId, String partitionPath, ImmutableMap<String, Double> metrics, String bootstrapFilePath) {
|
||||
this.baseInstantTime = baseInstantTime;
|
||||
this.deltaFilePaths = deltaFilePaths;
|
||||
this.dataFilePath = dataFilePath;
|
||||
this.fileId = fileId;
|
||||
this.partitionPath = partitionPath;
|
||||
this.metrics = metrics;
|
||||
this.bootstrapFilePath = bootstrapFilePath;
|
||||
}
|
||||
|
||||
public String getBaseInstantTime() {
|
||||
return baseInstantTime;
|
||||
}
|
||||
|
||||
public ImmutableList<String> getDeltaFilePaths() {
|
||||
return deltaFilePaths;
|
||||
}
|
||||
|
||||
public String getDataFilePath() {
|
||||
return dataFilePath;
|
||||
}
|
||||
|
||||
public String getFileId() {
|
||||
return fileId;
|
||||
}
|
||||
|
||||
public String getPartitionPath() {
|
||||
return partitionPath;
|
||||
}
|
||||
|
||||
public ImmutableMap<String, Double> getMetrics() {
|
||||
return metrics;
|
||||
}
|
||||
|
||||
public String getBootstrapFilePath() {
|
||||
return bootstrapFilePath;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Operation{" +
|
||||
"baseInstantTime='" + baseInstantTime + '\'' +
|
||||
", deltaFilePaths=" + deltaFilePaths +
|
||||
", dataFilePath='" + dataFilePath + '\'' +
|
||||
", fileId='" + fileId + '\'' +
|
||||
", partitionPath='" + partitionPath + '\'' +
|
||||
", metrics=" + metrics +
|
||||
", bootstrapFilePath='" + bootstrapFilePath + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user