Repository: parquet-format
Updated Branches:
  refs/heads/master 9fef1d834 -> a64a33134


PARQUET-1201: Implement page indexes

Added helper methods to read/write ColumnIndex and OffsetIndex objects.

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

Closes #81 from gszadovszky/PARQUET-1201 and squashes the following commits:

573dada [Gabor Szadovszky] PARQUET-1201: Implement page indexes


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

Branch: refs/heads/master
Commit: a64a331347263e3df055c9fec66e73b27c459d63
Parents: 9fef1d8
Author: Gabor Szadovszky <gabor.szadovs...@cloudera.com>
Authored: Tue Feb 13 17:08:44 2018 +0100
Committer: Zoltan Ivanfi <z...@cloudera.com>
Committed: Tue Feb 13 17:08:44 2018 +0100

----------------------------------------------------------------------
 src/main/java/org/apache/parquet/format/Util.java | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/parquet-format/blob/a64a3313/src/main/java/org/apache/parquet/format/Util.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/parquet/format/Util.java 
b/src/main/java/org/apache/parquet/format/Util.java
index 09cae2b..55d61ff 100644
--- a/src/main/java/org/apache/parquet/format/Util.java
+++ b/src/main/java/org/apache/parquet/format/Util.java
@@ -57,6 +57,22 @@ import 
org.apache.parquet.format.event.TypedConsumer.StringConsumer;
  */
 public class Util {
 
+  public static void writeColumnIndex(ColumnIndex columnIndex, OutputStream 
to) throws IOException {
+    write(columnIndex, to);
+  }
+
+  public static ColumnIndex readColumnIndex(InputStream from) throws 
IOException {
+    return read(from, new ColumnIndex());
+  }
+
+  public static void writeOffsetIndex(OffsetIndex offsetIndex, OutputStream 
to) throws IOException {
+    write(offsetIndex, to);
+  }
+
+  public static OffsetIndex readOffsetIndex(InputStream from) throws 
IOException {
+    return read(from, new OffsetIndex());
+  }
+
   public static void writePageHeader(PageHeader pageHeader, OutputStream to) 
throws IOException {
     write(pageHeader, to);
   }

Reply via email to