com.clickzetta.platform.bulkload.BulkLoadConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clickzetta-java Show documentation
Show all versions of clickzetta-java Show documentation
The java SDK for clickzetta's Lakehouse
package com.clickzetta.platform.bulkload;
import cz.proto.ingestion.v2.IngestionV2;
public class BulkLoadConfig {
private static final long MAX_NUM_ROWS_PER_FILE = 64 << 20;
private static final long MAX_FILE_SIZE_IN_BYTES_PER_FILE = 256 << 20;
private final IngestionV2.BulkLoadStreamWriterConfig config;
public BulkLoadConfig(IngestionV2.BulkLoadStreamWriterConfig config) {
this.config = config;
}
public StagingConfig getStagingConfig() {
return ProtoUtils.fromProtoV2(config.getStagingPath());
}
public FileFormatType getFileFormat() {
return ProtoUtils.fromProto(config.getFileFormat());
}
public long getMaxNumRowsPerFile() {
return config.getMaxNumRowsPerFile() > 0 ?
config.getMaxNumRowsPerFile() : MAX_NUM_ROWS_PER_FILE;
}
public long getMaxFileSizeInBytesPerFile() {
return config.getMaxSizeInBytesPerFile() > 0 ?
config.getMaxSizeInBytesPerFile() : MAX_FILE_SIZE_IN_BYTES_PER_FILE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy