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


Java Encoding类代码示例

本文整理汇总了Java中org.apache.parquet.format.Encoding的典型用法代码示例。如果您正苦于以下问题:Java Encoding类的具体用法?Java Encoding怎么用?Java Encoding使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Encoding类属于org.apache.parquet.format包,在下文中一共展示了Encoding类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: fromFormatEncodings

import org.apache.parquet.format.Encoding; //导入依赖的package包/类
Set<org.apache.parquet.column.Encoding> fromFormatEncodings(List<Encoding> encodings) {
  Set<org.apache.parquet.column.Encoding> converted = new HashSet<org.apache.parquet.column.Encoding>();

  for (Encoding encoding : encodings) {
    converted.add(getEncoding(encoding));
  }

  // make converted unmodifiable, drop reference to modifiable copy
  converted = Collections.unmodifiableSet(converted);

  // atomically update the cache
  Set<org.apache.parquet.column.Encoding> cached = cachedEncodingSets.putIfAbsent(converted, converted);

  if (cached == null) {
    // cached == null signifies that converted was *not* in the cache previously
    // so we can return converted instead of throwing it away, it has now
    // been cached
    cached = converted;
  }

  return cached;
}
 
开发者ID:apache,项目名称:parquet-mr,代码行数:23,代码来源:ParquetMetadataConverter.java

示例2: writeDataPageHeader

import org.apache.parquet.format.Encoding; //导入依赖的package包/类
@Deprecated
public void writeDataPageHeader(
    int uncompressedSize,
    int compressedSize,
    int valueCount,
    org.apache.parquet.column.Encoding rlEncoding,
    org.apache.parquet.column.Encoding dlEncoding,
    org.apache.parquet.column.Encoding valuesEncoding,
    OutputStream to) throws IOException {
  writePageHeader(newDataPageHeader(uncompressedSize,
                                    compressedSize,
                                    valueCount,
                                    new org.apache.parquet.column.statistics.BooleanStatistics(),
                                    rlEncoding,
                                    dlEncoding,
                                    valuesEncoding), to);
}
 
开发者ID:apache,项目名称:parquet-mr,代码行数:18,代码来源:ParquetMetadataConverter.java

示例3: newDataPageHeader

import org.apache.parquet.format.Encoding; //导入依赖的package包/类
private PageHeader newDataPageHeader(
    int uncompressedSize, int compressedSize,
    int valueCount,
    org.apache.parquet.column.statistics.Statistics statistics,
    org.apache.parquet.column.Encoding rlEncoding,
    org.apache.parquet.column.Encoding dlEncoding,
    org.apache.parquet.column.Encoding valuesEncoding) {
  PageHeader pageHeader = new PageHeader(PageType.DATA_PAGE, uncompressedSize, compressedSize);
  // TODO: pageHeader.crc = ...;
  pageHeader.setData_page_header(new DataPageHeader(
      valueCount,
      getEncoding(valuesEncoding),
      getEncoding(dlEncoding),
      getEncoding(rlEncoding)));
  if (!statistics.isEmpty()) {
    pageHeader.getData_page_header().setStatistics(toParquetStatistics(statistics));
  }
  return pageHeader;
}
 
开发者ID:apache,项目名称:parquet-mr,代码行数:20,代码来源:ParquetMetadataConverter.java

示例4: newDataPageV2Header

import org.apache.parquet.format.Encoding; //导入依赖的package包/类
private PageHeader newDataPageV2Header(
    int uncompressedSize, int compressedSize,
    int valueCount, int nullCount, int rowCount,
    org.apache.parquet.column.statistics.Statistics<?> statistics,
    org.apache.parquet.column.Encoding dataEncoding,
    int rlByteLength, int dlByteLength) {
  // TODO: pageHeader.crc = ...;
  DataPageHeaderV2 dataPageHeaderV2 = new DataPageHeaderV2(
      valueCount, nullCount, rowCount,
      getEncoding(dataEncoding),
      dlByteLength, rlByteLength);
  if (!statistics.isEmpty()) {
    dataPageHeaderV2.setStatistics(
        toParquetStatistics(statistics));
  }
  PageHeader pageHeader = new PageHeader(PageType.DATA_PAGE_V2, uncompressedSize, compressedSize);
  pageHeader.setData_page_header_v2(dataPageHeaderV2);
  return pageHeader;
}
 
开发者ID:apache,项目名称:parquet-mr,代码行数:20,代码来源:ParquetMetadataConverter.java

示例5: VarLengthColumn

import org.apache.parquet.format.Encoding; //导入依赖的package包/类
VarLengthColumn(DeprecatedParquetVectorizedReader parentReader, int allocateSize, ColumnDescriptor descriptor,
                ColumnChunkMetaData columnChunkMetaData, boolean fixedLength, V v,
                SchemaElement schemaElement) throws ExecutionSetupException {
  super(parentReader, allocateSize, descriptor, columnChunkMetaData, fixedLength, v, schemaElement);
    if (columnChunkMetaData.getEncodings().contains(Encoding.PLAIN_DICTIONARY)) {
      usingDictionary = true;
    }
    else {
      usingDictionary = false;
    }
}
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:12,代码来源:VarLengthColumn.java

示例6: VarLengthValuesColumn

import org.apache.parquet.format.Encoding; //导入依赖的package包/类
VarLengthValuesColumn(DeprecatedParquetVectorizedReader parentReader, int allocateSize, ColumnDescriptor descriptor,
                      ColumnChunkMetaData columnChunkMetaData, boolean fixedLength, V v,
                      SchemaElement schemaElement) throws ExecutionSetupException {
  super(parentReader, allocateSize, descriptor, columnChunkMetaData, fixedLength, v, schemaElement);
  variableWidthVector = (VariableWidthVector) valueVec;
  if (columnChunkMetaData.getEncodings().contains(Encoding.PLAIN_DICTIONARY)) {
    usingDictionary = true;
  }
  else {
    usingDictionary = false;
  }
}
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:13,代码来源:VarLengthValuesColumn.java

示例7: VarLengthColumn

import org.apache.parquet.format.Encoding; //导入依赖的package包/类
VarLengthColumn(ParquetRecordReader parentReader, int allocateSize, ColumnDescriptor descriptor,
                ColumnChunkMetaData columnChunkMetaData, boolean fixedLength, V v,
                SchemaElement schemaElement) throws ExecutionSetupException {
  super(parentReader, allocateSize, descriptor, columnChunkMetaData, fixedLength, v, schemaElement);
    if (columnChunkMetaData.getEncodings().contains(Encoding.PLAIN_DICTIONARY)) {
      usingDictionary = true;
    }
    else {
      usingDictionary = false;
    }
}
 
开发者ID:axbaretto,项目名称:drill,代码行数:12,代码来源:VarLengthColumn.java

示例8: VarLengthValuesColumn

import org.apache.parquet.format.Encoding; //导入依赖的package包/类
VarLengthValuesColumn(ParquetRecordReader parentReader, int allocateSize, ColumnDescriptor descriptor,
                      ColumnChunkMetaData columnChunkMetaData, boolean fixedLength, V v,
                      SchemaElement schemaElement) throws ExecutionSetupException {
  super(parentReader, allocateSize, descriptor, columnChunkMetaData, fixedLength, v, schemaElement);
  variableWidthVector = (VariableWidthVector) valueVec;
  if (columnChunkMetaData.getEncodings().contains(Encoding.PLAIN_DICTIONARY)) {
    usingDictionary = true;
  }
  else {
    usingDictionary = false;
  }
}
 
开发者ID:axbaretto,项目名称:drill,代码行数:13,代码来源:VarLengthValuesColumn.java

示例9: toFormatEncodings

import org.apache.parquet.format.Encoding; //导入依赖的package包/类
private List<Encoding> toFormatEncodings(Set<org.apache.parquet.column.Encoding> encodings) {
  List<Encoding> converted = new ArrayList<Encoding>(encodings.size());
  for (org.apache.parquet.column.Encoding encoding : encodings) {
    converted.add(getEncoding(encoding));
  }
  return converted;
}
 
开发者ID:apache,项目名称:parquet-mr,代码行数:8,代码来源:ParquetMetadataConverter.java

示例10: writeDataPageV2Header

import org.apache.parquet.format.Encoding; //导入依赖的package包/类
public void writeDataPageV2Header(
    int uncompressedSize, int compressedSize,
    int valueCount, int nullCount, int rowCount,
    org.apache.parquet.column.statistics.Statistics statistics,
    org.apache.parquet.column.Encoding dataEncoding,
    int rlByteLength, int dlByteLength,
    OutputStream to) throws IOException {
  writePageHeader(
      newDataPageV2Header(
          uncompressedSize, compressedSize,
          valueCount, nullCount, rowCount,
          statistics,
          dataEncoding,
          rlByteLength, dlByteLength), to);
}
 
开发者ID:apache,项目名称:parquet-mr,代码行数:16,代码来源:ParquetMetadataConverter.java

示例11: writeDictionaryPageHeader

import org.apache.parquet.format.Encoding; //导入依赖的package包/类
public void writeDictionaryPageHeader(
    int uncompressedSize, int compressedSize, int valueCount,
    org.apache.parquet.column.Encoding valuesEncoding, OutputStream to) throws IOException {
  PageHeader pageHeader = new PageHeader(PageType.DICTIONARY_PAGE, uncompressedSize, compressedSize);
  pageHeader.setDictionary_page_header(new DictionaryPageHeader(valueCount, getEncoding(valuesEncoding)));
  writePageHeader(pageHeader, to);
}
 
开发者ID:apache,项目名称:parquet-mr,代码行数:8,代码来源:ParquetMetadataConverter.java

示例12: getEncoding

import org.apache.parquet.format.Encoding; //导入依赖的package包/类
public org.apache.parquet.column.Encoding getEncoding(Encoding encoding) {
  return org.apache.parquet.column.Encoding.valueOf(encoding.name());
}
 
开发者ID:apache,项目名称:parquet-mr,代码行数:4,代码来源:ParquetMetadataConverter.java


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