parquet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ziva...@apache.org
Subject parquet-mr git commit: PARQUET-386: Printing out the statistics of metadata in parquet-tools
Date Wed, 10 Jan 2018 14:00:05 GMT
Repository: parquet-mr
Updated Branches:
  refs/heads/master 3783ca447 -> 4d996d1ba


PARQUET-386: Printing out the statistics of metadata in parquet-tools

Author: Gabor Szadovszky <gabor.szadovszky@cloudera.com>

Closes #442 from gszadovszky/PARQUET-386 and squashes the following commits:

db8c4b9 [Gabor Szadovszky] PARQUET-386: Printing out the statistics of metadata in parquet-tools


Project: http://git-wip-us.apache.org/repos/asf/parquet-mr/repo
Commit: http://git-wip-us.apache.org/repos/asf/parquet-mr/commit/4d996d1b
Tree: http://git-wip-us.apache.org/repos/asf/parquet-mr/tree/4d996d1b
Diff: http://git-wip-us.apache.org/repos/asf/parquet-mr/diff/4d996d1b

Branch: refs/heads/master
Commit: 4d996d1bac1bb1886cd9c473ba00e53e3c19cf3e
Parents: 3783ca4
Author: Gabor Szadovszky <gabor.szadovszky@cloudera.com>
Authored: Wed Jan 10 14:59:24 2018 +0100
Committer: Zoltan Ivanfi <zi@cloudera.com>
Committed: Wed Jan 10 14:59:24 2018 +0100

----------------------------------------------------------------------
 .../java/org/apache/parquet/tools/util/MetadataUtils.java     | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/4d996d1b/parquet-tools/src/main/java/org/apache/parquet/tools/util/MetadataUtils.java
----------------------------------------------------------------------
diff --git a/parquet-tools/src/main/java/org/apache/parquet/tools/util/MetadataUtils.java
b/parquet-tools/src/main/java/org/apache/parquet/tools/util/MetadataUtils.java
index b7fb0e6..870b8c1 100644
--- a/parquet-tools/src/main/java/org/apache/parquet/tools/util/MetadataUtils.java
+++ b/parquet-tools/src/main/java/org/apache/parquet/tools/util/MetadataUtils.java
@@ -27,6 +27,7 @@ import com.google.common.base.Joiner;
 import com.google.common.base.Strings;
 
 import org.apache.parquet.column.ColumnDescriptor;
+import org.apache.parquet.column.statistics.Statistics;
 import org.apache.parquet.hadoop.metadata.BlockMetaData;
 import org.apache.parquet.hadoop.metadata.ColumnChunkMetaData;
 import org.apache.parquet.hadoop.metadata.FileMetaData;
@@ -147,6 +148,12 @@ public class MetadataUtils {
     out.format(" SZ:%d/%d/%.2f", tsize, usize, ratio);
     out.format(" VC:%d", count);
     if (!encodings.isEmpty()) out.format(" ENC:%s", encodings);
+    Statistics<?> stats = meta.getStatistics();
+    if (stats != null) {
+      out.format(" ST:[%s]", stats);
+    } else {
+      out.format(" ST:[none]");
+    }
     out.println();
   }
 


Mime
View raw message