當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。