本文整理汇总了Java中parquet.column.ColumnReader.consume方法的典型用法代码示例。如果您正苦于以下问题:Java ColumnReader.consume方法的具体用法?Java ColumnReader.consume怎么用?Java ColumnReader.consume使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类parquet.column.ColumnReader
的用法示例。
在下文中一共展示了ColumnReader.consume方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: dump
import parquet.column.ColumnReader; //导入方法依赖的package包/类
public static void dump(PrettyPrintWriter out, ColumnReadStoreImpl crstore, ColumnDescriptor column, long page, long total, long offset) throws IOException {
int dmax = column.getMaxDefinitionLevel();
ColumnReader creader = crstore.getColumnReader(column);
out.format("*** row group %d of %d, values %d to %d ***%n", page, total, offset, offset + creader.getTotalValueCount() - 1);
for (long i = 0, e = creader.getTotalValueCount(); i < e; ++i) {
int rlvl = creader.getCurrentDefinitionLevel();
int dlvl = creader.getCurrentDefinitionLevel();
out.format("value %d: R:%d D:%d V:", offset+i, rlvl, dlvl);
if (dlvl == dmax) {
switch (column.getType()) {
case BINARY: out.format("%s", binaryToString(creader.getBinary())); break;
case BOOLEAN: out.format("%s", creader.getBoolean()); break;
case DOUBLE: out.format("%s", creader.getDouble()); break;
case FLOAT: out.format("%s", creader.getFloat()); break;
case INT32: out.format("%s", creader.getInteger()); break;
case INT64: out.format("%s", creader.getLong()); break;
case INT96: out.format("%s", binaryToBigInteger(creader.getBinary())); break;
case FIXED_LEN_BYTE_ARRAY: out.format("%s", binaryToString(creader.getBinary())); break;
}
} else {
out.format("<null>");
}
out.println();
creader.consume();
}
}