List of usage examples for java.io DataInput readLong
long readLong() throws IOException;
From source file:parquet.hadoop.ParquetInputSplit.java
private BlockMetaData readBlock(DataInput in) throws IOException { final BlockMetaData block = new BlockMetaData(); int size = in.readInt(); for (int i = 0; i < size; i++) { block.addColumn(readColumn(in)); }//from w w w . j a v a 2s . co m block.setRowCount(in.readLong()); block.setTotalByteSize(in.readLong()); if (!in.readBoolean()) { block.setPath(in.readUTF().intern()); } return block; }
From source file:parquet.hadoop.ParquetInputSplit.java
private ColumnChunkMetaData readColumn(DataInput in) throws IOException { CompressionCodecName codec = CompressionCodecName.values()[in.readInt()]; String[] columnPath = new String[in.readInt()]; for (int i = 0; i < columnPath.length; i++) { columnPath[i] = in.readUTF().intern(); }//from w ww .j av a 2s.com PrimitiveTypeName type = PrimitiveTypeName.values()[in.readInt()]; int encodingsSize = in.readInt(); Set<Encoding> encodings = new HashSet<Encoding>(encodingsSize); for (int i = 0; i < encodingsSize; i++) { encodings.add(Encoding.values()[in.readInt()]); } ColumnChunkMetaData column = ColumnChunkMetaData.get(ColumnPath.get(columnPath), type, codec, encodings, in.readLong(), in.readLong(), in.readLong(), in.readLong(), in.readLong()); return column; }