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


Java ColumnDescriptor.getMaxRepetitionLevel方法代码示例

本文整理汇总了Java中parquet.column.ColumnDescriptor.getMaxRepetitionLevel方法的典型用法代码示例。如果您正苦于以下问题:Java ColumnDescriptor.getMaxRepetitionLevel方法的具体用法?Java ColumnDescriptor.getMaxRepetitionLevel怎么用?Java ColumnDescriptor.getMaxRepetitionLevel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在parquet.column.ColumnDescriptor的用法示例。


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

示例1: showDetails

import parquet.column.ColumnDescriptor; //导入方法依赖的package包/类
private static void showDetails(PrettyPrintWriter out, PrimitiveType type, int depth, MessageType container, List<String> cpath) {
  String name = Strings.repeat(".", depth) + type.getName();
  OriginalType otype = type.getOriginalType();
  Repetition rep = type.getRepetition();
  PrimitiveTypeName ptype = type.getPrimitiveTypeName();

  out.format("%s: %s %s", name, rep, ptype);
  if (otype != null) out.format(" O:%s", otype);

  if (container != null) {
    cpath.add(type.getName());
    String[] paths = cpath.toArray(new String[cpath.size()]);
    cpath.remove(cpath.size() - 1);

    ColumnDescriptor desc = container.getColumnDescription(paths);

    int defl = desc.getMaxDefinitionLevel();
    int repl = desc.getMaxRepetitionLevel();
    out.format(" R:%d D:%d", repl, defl);
  }
  out.println();
}
 
开发者ID:wesleypeck,项目名称:parquet-tools,代码行数:23,代码来源:MetadataUtils.java

示例2: getDataMode

import parquet.column.ColumnDescriptor; //导入方法依赖的package包/类
private TypeProtos.DataMode getDataMode(ColumnDescriptor column) {
  if (column.getMaxRepetitionLevel() > 0 ) {
    return DataMode.REPEATED;
  } else if (column.getMaxDefinitionLevel() == 0) {
    return TypeProtos.DataMode.REQUIRED;
  } else {
    return TypeProtos.DataMode.OPTIONAL;
  }
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:10,代码来源:ParquetRecordReader.java

示例3: isComplex

import parquet.column.ColumnDescriptor; //导入方法依赖的package包/类
private static boolean isComplex(ParquetMetadata footer) {
  MessageType schema = footer.getFileMetaData().getSchema();

  for (Type type : schema.getFields()) {
    if (!type.isPrimitive()) {
      return true;
    }
  }
  for (ColumnDescriptor col : schema.getColumns()) {
    if (col.getMaxRepetitionLevel() > 0) {
      return true;
    }
  }
  return false;
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:16,代码来源:ParquetScanBatchCreator.java

示例4: dump

import parquet.column.ColumnDescriptor; //导入方法依赖的package包/类
public static void dump(PrettyPrintWriter out, PageReadStore store, ColumnDescriptor column) throws IOException {
    PageReader reader = store.getPageReader(column);

    long vc = reader.getTotalValueCount();
    int rmax = column.getMaxRepetitionLevel();
    int dmax = column.getMaxDefinitionLevel();
    out.format("%s TV=%d RL=%d DL=%d", Joiner.on('.').skipNulls().join(column.getPath()), vc, rmax, dmax);

    DictionaryPage dict = reader.readDictionaryPage();
    if (dict != null) {
        out.format(" DS:%d", dict.getDictionarySize());
        out.format(" DE:%s", dict.getEncoding());
    }

    out.println();
    out.rule('-');

    Page page = reader.readPage();
    for (long count = 0; page != null; count++) {
        out.format("page %d:", count);
        out.format(" DLE:%s", page.getDlEncoding());
        out.format(" RLE:%s", page.getRlEncoding());
        out.format(" VLE:%s", page.getValueEncoding());
        out.format(" SZ:%d", page.getUncompressedSize());
        out.format(" VC:%d", page.getValueCount());
        out.println();
        page = reader.readPage();
    }
}
 
开发者ID:wesleypeck,项目名称:parquet-tools,代码行数:30,代码来源:DumpCommand.java


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