parquet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject parquet-mr git commit: PARQUET-329: Restore ThriftReadSupport#THRIFT_COLUMN_FILTER_KEY
Date Sat, 11 Jul 2015 23:27:00 GMT
Repository: parquet-mr
Updated Branches:
  refs/heads/master 043fcde30 -> 4c7d75230


PARQUET-329: Restore ThriftReadSupport#THRIFT_COLUMN_FILTER_KEY

ThriftReadSupport#THRIFT_COLUMN_FILTER_KEY was removed (incompatible change)

Author: asingh <asingh@cloudera.com>

Closes #239 from SinghAsDev/PARQUET-329 and squashes the following commits:

1e44a70 [asingh] Remove o.a.p.hadoop.thrift from semver excludes
4a1e572 [asingh] PARQUET-329: Restore ThriftReadSupport#THRIFT_COLUMN_FILTER_KEY


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

Branch: refs/heads/master
Commit: 4c7d7523088373be3c7ff203ea895d5a6d84083e
Parents: 043fcde
Author: asingh <asingh@cloudera.com>
Authored: Sat Jul 11 16:26:51 2015 -0700
Committer: Ryan Blue <blue@apache.org>
Committed: Sat Jul 11 16:26:51 2015 -0700

----------------------------------------------------------------------
 .../parquet/hadoop/thrift/ThriftReadSupport.java      | 14 +++++++-------
 .../deprecated/DeprecatedFieldProjectionFilter.java   |  2 +-
 .../thrift/projection/deprecated/PathGlobPattern.java |  2 +-
 .../TestParquetToThriftReadWriteAndProjection.java    |  2 +-
 pom.xml                                               |  1 -
 5 files changed, 10 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/4c7d7523/parquet-thrift/src/main/java/org/apache/parquet/hadoop/thrift/ThriftReadSupport.java
----------------------------------------------------------------------
diff --git a/parquet-thrift/src/main/java/org/apache/parquet/hadoop/thrift/ThriftReadSupport.java
b/parquet-thrift/src/main/java/org/apache/parquet/hadoop/thrift/ThriftReadSupport.java
index cb9bf66..a859128 100644
--- a/parquet-thrift/src/main/java/org/apache/parquet/hadoop/thrift/ThriftReadSupport.java
+++ b/parquet-thrift/src/main/java/org/apache/parquet/hadoop/thrift/ThriftReadSupport.java
@@ -52,7 +52,7 @@ public class ThriftReadSupport<T> extends ReadSupport<T> {
    * Accepts a ";" delimited list of globs in the syntax implemented by {@link DeprecatedFieldProjectionFilter}
    */
   @Deprecated
-  public static final String DEPRECATED_THRIFT_COLUMN_FILTER_KEY = "parquet.thrift.column.filter";
+  public static final String THRIFT_COLUMN_FILTER_KEY = "parquet.thrift.column.filter";
 
   /**
    * Accepts a ";" delimited list of glob paths, in the syntax implemented by {@link StrictFieldProjectionFilter}
@@ -99,7 +99,7 @@ public class ThriftReadSupport<T> extends ReadSupport<T> {
 
   @Deprecated
   public static void setProjectionPushdown(JobConf jobConf, String projectionString) {
-    jobConf.set(DEPRECATED_THRIFT_COLUMN_FILTER_KEY, projectionString);
+    jobConf.set(THRIFT_COLUMN_FILTER_KEY, projectionString);
   }
 
   public static void setStrictFieldProjectionFilter(Configuration conf, String semicolonDelimitedGlobs)
{
@@ -107,7 +107,7 @@ public class ThriftReadSupport<T> extends ReadSupport<T> {
   }
 
   public static FieldProjectionFilter getFieldProjectionFilter(Configuration conf) {
-    String deprecated = conf.get(DEPRECATED_THRIFT_COLUMN_FILTER_KEY);
+    String deprecated = conf.get(THRIFT_COLUMN_FILTER_KEY);
     String strict = conf.get(STRICT_THRIFT_COLUMN_FILTER_KEY);
 
     if (Strings.isNullOrEmpty(deprecated) && Strings.isNullOrEmpty(strict)) {
@@ -117,18 +117,18 @@ public class ThriftReadSupport<T> extends ReadSupport<T>
{
     if(!Strings.isNullOrEmpty(deprecated) && !Strings.isNullOrEmpty(strict)) {
       throw new ThriftProjectionException(
           "You cannot provide both "
-              + DEPRECATED_THRIFT_COLUMN_FILTER_KEY
+              + THRIFT_COLUMN_FILTER_KEY
               + " and "
               + STRICT_THRIFT_COLUMN_FILTER_KEY
               +"! "
-              + DEPRECATED_THRIFT_COLUMN_FILTER_KEY
+              + THRIFT_COLUMN_FILTER_KEY
               + " is deprecated."
       );
     }
 
     if (!Strings.isNullOrEmpty(deprecated)) {
       LOG.warn(String.format("Using %s is deprecated. Please see the docs for %s!",
-          DEPRECATED_THRIFT_COLUMN_FILTER_KEY, STRICT_THRIFT_COLUMN_FILTER_KEY));
+          THRIFT_COLUMN_FILTER_KEY, STRICT_THRIFT_COLUMN_FILTER_KEY));
       return new DeprecatedFieldProjectionFilter(deprecated);
     }
 
@@ -162,7 +162,7 @@ public class ThriftReadSupport<T> extends ReadSupport<T> {
       throw new ThriftProjectionException(
           String.format("You cannot provide both a partial schema and field projection filter."
                   + "Only one of (%s, %s, %s) should be set.",
-              PARQUET_READ_SCHEMA, STRICT_THRIFT_COLUMN_FILTER_KEY, DEPRECATED_THRIFT_COLUMN_FILTER_KEY));
+              PARQUET_READ_SCHEMA, STRICT_THRIFT_COLUMN_FILTER_KEY, THRIFT_COLUMN_FILTER_KEY));
     }
 
     //set requestedProjections only when it's specified

http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/4c7d7523/parquet-thrift/src/main/java/org/apache/parquet/thrift/projection/deprecated/DeprecatedFieldProjectionFilter.java
----------------------------------------------------------------------
diff --git a/parquet-thrift/src/main/java/org/apache/parquet/thrift/projection/deprecated/DeprecatedFieldProjectionFilter.java
b/parquet-thrift/src/main/java/org/apache/parquet/thrift/projection/deprecated/DeprecatedFieldProjectionFilter.java
index 78eef09..f84f957 100644
--- a/parquet-thrift/src/main/java/org/apache/parquet/thrift/projection/deprecated/DeprecatedFieldProjectionFilter.java
+++ b/parquet-thrift/src/main/java/org/apache/parquet/thrift/projection/deprecated/DeprecatedFieldProjectionFilter.java
@@ -28,7 +28,7 @@ import org.apache.parquet.thrift.projection.ThriftProjectionException;
 
 /**
  * Filter thrift attributes using glob syntax.
- * This is used for parsing values assigned to ThriftReadSupport.DEPRECATED_THRIFT_COLUMN_FILTER_KEY
+ * This is used for parsing values assigned to ThriftReadSupport.THRIFT_COLUMN_FILTER_KEY
  * @author Tianshuo Deng
  */
 @Deprecated

http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/4c7d7523/parquet-thrift/src/main/java/org/apache/parquet/thrift/projection/deprecated/PathGlobPattern.java
----------------------------------------------------------------------
diff --git a/parquet-thrift/src/main/java/org/apache/parquet/thrift/projection/deprecated/PathGlobPattern.java
b/parquet-thrift/src/main/java/org/apache/parquet/thrift/projection/deprecated/PathGlobPattern.java
index 0893ab4..e576e97 100644
--- a/parquet-thrift/src/main/java/org/apache/parquet/thrift/projection/deprecated/PathGlobPattern.java
+++ b/parquet-thrift/src/main/java/org/apache/parquet/thrift/projection/deprecated/PathGlobPattern.java
@@ -27,7 +27,7 @@ import java.util.regex.PatternSyntaxException;
  * Enhanced version of GlobPattern class that is defined in hadoop with extra capability
of matching
  * full path separated by '/', and double star matching
  *
- * This is used for parsing values assigned to ThriftReadSupport.DEPRECATED_THRIFT_COLUMN_FILTER_KEY
+ * This is used for parsing values assigned to ThriftReadSupport.THRIFT_COLUMN_FILTER_KEY
  *
  * @author Tianshuo Deng
  */

http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/4c7d7523/parquet-thrift/src/test/java/org/apache/parquet/hadoop/thrift/TestParquetToThriftReadWriteAndProjection.java
----------------------------------------------------------------------
diff --git a/parquet-thrift/src/test/java/org/apache/parquet/hadoop/thrift/TestParquetToThriftReadWriteAndProjection.java
b/parquet-thrift/src/test/java/org/apache/parquet/hadoop/thrift/TestParquetToThriftReadWriteAndProjection.java
index aa0b81d..4869460 100644
--- a/parquet-thrift/src/test/java/org/apache/parquet/hadoop/thrift/TestParquetToThriftReadWriteAndProjection.java
+++ b/parquet-thrift/src/test/java/org/apache/parquet/hadoop/thrift/TestParquetToThriftReadWriteAndProjection.java
@@ -337,7 +337,7 @@ public class TestParquetToThriftReadWriteAndProjection {
 
   private void shouldDoProjectionWithThriftColumnFilter(String filterDesc, TBase toWrite,
TBase toRead, Class<? extends TBase<?, ?>> thriftClass) throws Exception {
     Configuration conf = new Configuration();
-    conf.set(ThriftReadSupport.DEPRECATED_THRIFT_COLUMN_FILTER_KEY, filterDesc);
+    conf.set(ThriftReadSupport.THRIFT_COLUMN_FILTER_KEY, filterDesc);
     shouldDoProjection(conf, toWrite, toRead, thriftClass);
   }
 

http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/4c7d7523/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 271d40f..088f9d2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -219,7 +219,6 @@
                    <dumpDetails>true</dumpDetails>
                    <previousVersion>${previous.version}</previousVersion>
                    <excludes>
-                     <exclude>org/apache/parquet/hadoop/thrift/**</exclude>
                      <exclude>org/apache/parquet/thrift/projection/**</exclude>
                      <exclude>org/apache/parquet/thrift/ThriftSchemaConverter</exclude>
                      <exclude>org/apache/parquet/filter2/**</exclude>


Mime
View raw message