本文整理汇总了Java中org.apache.parquet.bytes.ByteBufferAllocator类的典型用法代码示例。如果您正苦于以下问题:Java ByteBufferAllocator类的具体用法?Java ByteBufferAllocator怎么用?Java ByteBufferAllocator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ByteBufferAllocator类属于org.apache.parquet.bytes包,在下文中一共展示了ByteBufferAllocator类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ParquetReadOptions
import org.apache.parquet.bytes.ByteBufferAllocator; //导入依赖的package包/类
ParquetReadOptions(boolean useSignedStringMinMax,
boolean useStatsFilter,
boolean useDictionaryFilter,
boolean useRecordFilter,
FilterCompat.Filter recordFilter,
ParquetMetadataConverter.MetadataFilter metadataFilter,
CompressionCodecFactory codecFactory,
ByteBufferAllocator allocator,
Map<String, String> properties) {
this.useSignedStringMinMax = useSignedStringMinMax;
this.useStatsFilter = useStatsFilter;
this.useDictionaryFilter = useDictionaryFilter;
this.useRecordFilter = useRecordFilter;
this.recordFilter = recordFilter;
this.metadataFilter = metadataFilter;
this.codecFactory = codecFactory;
this.allocator = allocator;
this.properties = Collections.unmodifiableMap(properties);
}
示例2: ParquetProperties
import org.apache.parquet.bytes.ByteBufferAllocator; //导入依赖的package包/类
private ParquetProperties(WriterVersion writerVersion, int pageSize, int dictPageSize, boolean enableDict, int minRowCountForPageSizeCheck,
int maxRowCountForPageSizeCheck, boolean estimateNextSizeCheck, ByteBufferAllocator allocator,
ValuesWriterFactory writerFactory) {
this.pageSizeThreshold = pageSize;
this.initialSlabSize = CapacityByteArrayOutputStream
.initialSlabSizeHeuristic(MIN_SLAB_SIZE, pageSizeThreshold, 10);
this.dictionaryPageSizeThreshold = dictPageSize;
this.writerVersion = writerVersion;
this.enableDictionary = enableDict;
this.minRowCountForPageSizeCheck = minRowCountForPageSizeCheck;
this.maxRowCountForPageSizeCheck = maxRowCountForPageSizeCheck;
this.estimateNextSizeCheck = estimateNextSizeCheck;
this.allocator = allocator;
this.valuesWriterFactory = writerFactory;
}
示例3: HadoopReadOptions
import org.apache.parquet.bytes.ByteBufferAllocator; //导入依赖的package包/类
private HadoopReadOptions(boolean useSignedStringMinMax,
boolean useStatsFilter,
boolean useDictionaryFilter,
boolean useRecordFilter,
FilterCompat.Filter recordFilter,
MetadataFilter metadataFilter,
CompressionCodecFactory codecFactory,
ByteBufferAllocator allocator,
Map<String, String> properties,
Configuration conf) {
super(
useSignedStringMinMax, useStatsFilter, useDictionaryFilter, useRecordFilter, recordFilter,
metadataFilter, codecFactory, allocator, properties
);
this.conf = conf;
}
示例4: ParquetColumnChunkPageWriteStore
import org.apache.parquet.bytes.ByteBufferAllocator; //导入依赖的package包/类
public ParquetColumnChunkPageWriteStore(BytesCompressor compressor,
MessageType schema,
int initialSlabSize,
int maxCapacityHint,
ByteBufferAllocator allocator) {
this.schema = schema;
for (ColumnDescriptor path : schema.getColumns()) {
writers.put(path, new ColumnChunkPageWriter(path, compressor, initialSlabSize, maxCapacityHint, allocator));
}
}
示例5: ColumnChunkPageWriter
import org.apache.parquet.bytes.ByteBufferAllocator; //导入依赖的package包/类
private ColumnChunkPageWriter(ColumnDescriptor path,
BytesCompressor compressor,
int initialSlabSize,
int maxCapacityHint,
ByteBufferAllocator allocator) {
this.path = path;
this.compressor = compressor;
this.buf = new CapacityByteArrayOutputStream(initialSlabSize, maxCapacityHint, allocator);
this.totalStatistics = getStatsBasedOnType(this.path.getType());
}
示例6: DictionaryValuesWriter
import org.apache.parquet.bytes.ByteBufferAllocator; //导入依赖的package包/类
/**
* @param maxDictionaryByteSize
*/
protected DictionaryValuesWriter(int maxDictionaryByteSize, Encoding encodingForDataPage, Encoding encodingForDictionaryPage, ByteBufferAllocator allocator) {
this.allocator = allocator;
this.maxDictionaryByteSize = maxDictionaryByteSize;
this.encodingForDataPage = encodingForDataPage;
this.encodingForDictionaryPage = encodingForDictionaryPage;
}
示例7: DeltaLengthByteArrayValuesWriter
import org.apache.parquet.bytes.ByteBufferAllocator; //导入依赖的package包/类
public DeltaLengthByteArrayValuesWriter(int initialSize, int pageSize, ByteBufferAllocator allocator) {
arrayOut = new CapacityByteArrayOutputStream(initialSize, pageSize, allocator);
out = new LittleEndianDataOutputStream(arrayOut);
lengthWriter = new DeltaBinaryPackingValuesWriterForInteger(
DeltaBinaryPackingValuesWriter.DEFAULT_NUM_BLOCK_VALUES,
DeltaBinaryPackingValuesWriter.DEFAULT_NUM_MINIBLOCKS,
initialSize, pageSize, allocator);
}
示例8: RunLengthBitPackingHybridEncoder
import org.apache.parquet.bytes.ByteBufferAllocator; //导入依赖的package包/类
public RunLengthBitPackingHybridEncoder(int bitWidth, int initialCapacity, int pageSize, ByteBufferAllocator allocator) {
LOG.debug("Encoding: RunLengthBitPackingHybridEncoder with "
+ "bithWidth: {} initialCapacity {}", bitWidth, initialCapacity);
Preconditions.checkArgument(bitWidth >= 0 && bitWidth <= 32, "bitWidth must be >= 0 and <= 32");
this.bitWidth = bitWidth;
this.baos = new CapacityByteArrayOutputStream(initialCapacity, pageSize, allocator);
this.packBuffer = new byte[bitWidth];
this.bufferedValues = new int[8];
this.packer = Packer.LITTLE_ENDIAN.newBytePacker(bitWidth);
reset(false);
}
示例9: DirectCodecFactory
import org.apache.parquet.bytes.ByteBufferAllocator; //导入依赖的package包/类
/**
* See docs on CodecFactory#createDirectCodecFactory which is how this class is
* exposed publicly and is just a pass-through factory method for this constructor
* to hide the rest of this class from public access.
*/
DirectCodecFactory(Configuration config, ByteBufferAllocator allocator, int pageSize) {
super(config, pageSize);
Preconditions.checkNotNull(allocator, "allocator");
Preconditions.checkState(allocator.isDirect(),
"A %s requires a direct buffer allocator be provided.",
getClass().getSimpleName());
this.allocator = allocator;
}
示例10: ColumnChunkPageWriter
import org.apache.parquet.bytes.ByteBufferAllocator; //导入依赖的package包/类
private ColumnChunkPageWriter(ColumnDescriptor path,
BytesCompressor compressor,
ByteBufferAllocator allocator) {
this.path = path;
this.compressor = compressor;
this.allocator = allocator;
this.buf = new ConcatenatingByteArrayCollector();
}
示例11: PlainBinaryDictionaryValuesWriter
import org.apache.parquet.bytes.ByteBufferAllocator; //导入依赖的package包/类
/**
* @param maxDictionaryByteSize
*/
public PlainBinaryDictionaryValuesWriter(int maxDictionaryByteSize, Encoding encodingForDataPage, Encoding encodingForDictionaryPage, ByteBufferAllocator allocator) {
super(maxDictionaryByteSize, encodingForDataPage, encodingForDictionaryPage, allocator);
binaryDictionaryContent.defaultReturnValue(-1);
}
示例12: PlainFixedLenArrayDictionaryValuesWriter
import org.apache.parquet.bytes.ByteBufferAllocator; //导入依赖的package包/类
/**
* @param maxDictionaryByteSize
*/
public PlainFixedLenArrayDictionaryValuesWriter(int maxDictionaryByteSize, int length, Encoding encodingForDataPage, Encoding encodingForDictionaryPage, ByteBufferAllocator allocator) {
super(maxDictionaryByteSize, encodingForDataPage, encodingForDictionaryPage, allocator);
this.length = length;
}
示例13: PlainLongDictionaryValuesWriter
import org.apache.parquet.bytes.ByteBufferAllocator; //导入依赖的package包/类
/**
* @param maxDictionaryByteSize
*/
public PlainLongDictionaryValuesWriter(int maxDictionaryByteSize, Encoding encodingForDataPage, Encoding encodingForDictionaryPage, ByteBufferAllocator allocator) {
super(maxDictionaryByteSize, encodingForDataPage, encodingForDictionaryPage, allocator);
longDictionaryContent.defaultReturnValue(-1);
}
示例14: PlainDoubleDictionaryValuesWriter
import org.apache.parquet.bytes.ByteBufferAllocator; //导入依赖的package包/类
/**
* @param maxDictionaryByteSize
*/
public PlainDoubleDictionaryValuesWriter(int maxDictionaryByteSize, Encoding encodingForDataPage, Encoding encodingForDictionaryPage, ByteBufferAllocator allocator) {
super(maxDictionaryByteSize, encodingForDataPage, encodingForDictionaryPage, allocator);
doubleDictionaryContent.defaultReturnValue(-1);
}
示例15: PlainIntegerDictionaryValuesWriter
import org.apache.parquet.bytes.ByteBufferAllocator; //导入依赖的package包/类
/**
* @param maxDictionaryByteSize
*/
public PlainIntegerDictionaryValuesWriter(int maxDictionaryByteSize, Encoding encodingForDataPage, Encoding encodingForDictionaryPage, ByteBufferAllocator allocator) {
super(maxDictionaryByteSize, encodingForDataPage, encodingForDictionaryPage, allocator);
intDictionaryContent.defaultReturnValue(-1);
}