当前位置: 首页>>代码示例>>Java>>正文


Java ByteBufferAllocator类代码示例

本文整理汇总了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);
}
 
开发者ID:apache,项目名称:parquet-mr,代码行数:20,代码来源:ParquetReadOptions.java

示例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;
}
 
开发者ID:apache,项目名称:parquet-mr,代码行数:17,代码来源:ParquetProperties.java

示例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;
}
 
开发者ID:apache,项目名称:parquet-mr,代码行数:17,代码来源:HadoopReadOptions.java

示例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));
  }
}
 
开发者ID:axbaretto,项目名称:drill,代码行数:11,代码来源:ParquetColumnChunkPageWriteStore.java

示例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());
}
 
开发者ID:axbaretto,项目名称:drill,代码行数:11,代码来源:ParquetColumnChunkPageWriteStore.java

示例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;
}
 
开发者ID:apache,项目名称:parquet-mr,代码行数:10,代码来源:DictionaryValuesWriter.java

示例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);
}
 
开发者ID:apache,项目名称:parquet-mr,代码行数:9,代码来源:DeltaLengthByteArrayValuesWriter.java

示例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);
}
 
开发者ID:apache,项目名称:parquet-mr,代码行数:14,代码来源:RunLengthBitPackingHybridEncoder.java

示例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;
}
 
开发者ID:apache,项目名称:parquet-mr,代码行数:14,代码来源:DirectCodecFactory.java

示例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();
}
 
开发者ID:apache,项目名称:parquet-mr,代码行数:9,代码来源:ColumnChunkPageWriteStore.java

示例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);
}
 
开发者ID:apache,项目名称:parquet-mr,代码行数:8,代码来源:DictionaryValuesWriter.java

示例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;
}
 
开发者ID:apache,项目名称:parquet-mr,代码行数:8,代码来源:DictionaryValuesWriter.java

示例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);
}
 
开发者ID:apache,项目名称:parquet-mr,代码行数:8,代码来源:DictionaryValuesWriter.java

示例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);
}
 
开发者ID:apache,项目名称:parquet-mr,代码行数:8,代码来源:DictionaryValuesWriter.java

示例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);
}
 
开发者ID:apache,项目名称:parquet-mr,代码行数:8,代码来源:DictionaryValuesWriter.java


注:本文中的org.apache.parquet.bytes.ByteBufferAllocator类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。