long uncompressedFileSize = 0;
long compressedFileSize = 0;
// Skip from block to block since we only need the header
while (recordReader.nextBlock()) {
// Get the sizes from the key buffer and aggregate
KeyBuffer keyBuffer = recordReader.getKeyBuffer();
if (uncompressedColumnSizes == null) {
uncompressedColumnSizes = new long[keyBuffer.getColumnNumber()];
}
if (compressedColumnSizes == null) {
compressedColumnSizes = new long[keyBuffer.getColumnNumber()];
}
for (int i = 0; i < keyBuffer.getColumnNumber(); i++) {
uncompressedColumnSizes[i] += keyBuffer.getEachColumnUncompressedValueLen()[i];
compressedColumnSizes[i] += keyBuffer.getEachColumnValueLen()[i];
}
rowNo += keyBuffer.getNumberRows();
}
if (columnSizes && uncompressedColumnSizes != null && compressedColumnSizes != null) {
// Print out the sizes, if pretty is set, print it out in a human friendly format,
// otherwise print it out as if it were a row