hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shiv...@apache.org
Subject incubator-hawq git commit: HAWQ-1533. Fix compiler warnings when building PXF code
Date Fri, 06 Oct 2017 20:40:41 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 0fca19d0a -> 9fd36e3e3


HAWQ-1533. Fix compiler warnings when building PXF code


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/9fd36e3e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/9fd36e3e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/9fd36e3e

Branch: refs/heads/master
Commit: 9fd36e3e344884ebbb2ded14cfcabf6c05577266
Parents: 0fca19d
Author: lavjain <ljain@pivotal.io>
Authored: Fri Oct 6 13:40:36 2017 -0700
Committer: shivzone <shivram.mani@gmail.com>
Committed: Fri Oct 6 13:40:36 2017 -0700

----------------------------------------------------------------------
 pxf/build.gradle                                                 | 4 ++--
 .../java/org/apache/hawq/pxf/api/examples/DemoFragmenter.java    | 2 +-
 .../main/java/org/apache/hawq/pxf/api/examples/DemoResolver.java | 2 +-
 .../java/org/apache/hawq/pxf/api/examples/DemoTextResolver.java  | 2 +-
 .../org/apache/hawq/pxf/api/utilities/ColumnDescriptorTest.java  | 3 ++-
 .../java/org/apache/hawq/pxf/api/utilities/UtilitiesTest.java    | 3 ++-
 .../apache/hawq/pxf/plugins/hive/utilities/ProfileFactory.java   | 4 ++++
 .../org/apache/hawq/pxf/plugins/hive/HiveORCAccessorTest.java    | 1 +
 .../hawq/pxf/plugins/hive/utilities/HiveUtilitiesTest.java       | 3 ++-
 .../java/org/apache/hawq/pxf/service/utilities/ProtocolData.java | 2 +-
 .../org/apache/hawq/pxf/service/utilities/ProtocolDataTest.java  | 4 ++--
 11 files changed, 19 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/9fd36e3e/pxf/build.gradle
----------------------------------------------------------------------
diff --git a/pxf/build.gradle b/pxf/build.gradle
index e47aa6e..0e2cf0c 100644
--- a/pxf/build.gradle
+++ b/pxf/build.gradle
@@ -83,7 +83,7 @@ subprojects { subProject ->
     compileTestJava.options*.compilerArgs = [
             "-Xlint:varargs", "-Xlint:cast", "-Xlint:classfile", "-Xlint:dep-ann", "-Xlint:divzero",
"-Xlint:empty",
             "-Xlint:finally", "-Xlint:overrides", "-Xlint:path", "-Xlint:processing", "-Xlint:static",
"-Xlint:try",
-            "-Xlint:-fallthrough", "-Xlint:-deprecation", "-Xlint:-unchecked", "-Xlint:-options"
+            "-Xlint:fallthrough", "-Xlint:deprecation", "-Xlint:unchecked", "-Xlint:-options"
     ]
 
     // Add LICENSE, DISCLAIMER and NOTICE to generated jar files.
@@ -502,7 +502,7 @@ def buildNumber() {
 }
 
 task wrapper(type: Wrapper) {
-    gradleVersion = '2.11'
+    gradleVersion = '2.13'
 }
 
 def distSubprojects = subprojects - project(':pxf-api')

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/9fd36e3e/pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/examples/DemoFragmenter.java
----------------------------------------------------------------------
diff --git a/pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/examples/DemoFragmenter.java
b/pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/examples/DemoFragmenter.java
index 685fcf2..8392f1c 100644
--- a/pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/examples/DemoFragmenter.java
+++ b/pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/examples/DemoFragmenter.java
@@ -35,7 +35,7 @@ public class DemoFragmenter extends Fragmenter{
     /**
      * Constructs the DemoFragmenter
      *
-     * @param metaData
+     * @param metaData the InputData
      */
     public DemoFragmenter(InputData metaData) {
         super(metaData);

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/9fd36e3e/pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/examples/DemoResolver.java
----------------------------------------------------------------------
diff --git a/pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/examples/DemoResolver.java
b/pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/examples/DemoResolver.java
index 8780a19..f672078 100644
--- a/pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/examples/DemoResolver.java
+++ b/pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/examples/DemoResolver.java
@@ -38,7 +38,7 @@ public class DemoResolver extends Plugin implements ReadResolver {
     /**
      * Constructs the DemoResolver
      *
-     * @param metaData
+     * @param metaData the InputData
      */
     public DemoResolver(InputData metaData) {
         super(metaData);

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/9fd36e3e/pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/examples/DemoTextResolver.java
----------------------------------------------------------------------
diff --git a/pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/examples/DemoTextResolver.java
b/pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/examples/DemoTextResolver.java
index 772550e..ff23daf 100644
--- a/pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/examples/DemoTextResolver.java
+++ b/pxf/pxf-api/src/main/java/org/apache/hawq/pxf/api/examples/DemoTextResolver.java
@@ -40,7 +40,7 @@ public class DemoTextResolver extends Plugin implements ReadResolver {
     /**
      * Constructs the DemoResolver
      *
-     * @param metaData
+     * @param metaData the InputData
      */
     public DemoTextResolver(InputData metaData) {
         super(metaData);

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/9fd36e3e/pxf/pxf-api/src/test/java/org/apache/hawq/pxf/api/utilities/ColumnDescriptorTest.java
----------------------------------------------------------------------
diff --git a/pxf/pxf-api/src/test/java/org/apache/hawq/pxf/api/utilities/ColumnDescriptorTest.java
b/pxf/pxf-api/src/test/java/org/apache/hawq/pxf/api/utilities/ColumnDescriptorTest.java
index 25b907e..334660d 100644
--- a/pxf/pxf-api/src/test/java/org/apache/hawq/pxf/api/utilities/ColumnDescriptorTest.java
+++ b/pxf/pxf-api/src/test/java/org/apache/hawq/pxf/api/utilities/ColumnDescriptorTest.java
@@ -20,6 +20,7 @@ package org.apache.hawq.pxf.api.utilities;
  */
 
 import org.apache.hawq.pxf.api.utilities.ColumnDescriptor;
+import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import org.junit.Test;
@@ -38,7 +39,7 @@ public class ColumnDescriptorTest {
         assertEquals(clonned.columnTypeCode(), cd.columnTypeCode());
         assertEquals(clonned.columnIndex(), cd.columnIndex());
         assertEquals(clonned.columnTypeName(), cd.columnTypeName());
-        assertEquals(clonned.columnTypeModifiers(), cd.columnTypeModifiers());
+        assertArrayEquals(clonned.columnTypeModifiers(), cd.columnTypeModifiers());
         assertEquals(clonned.isKeyColumn(), cd.isKeyColumn());
 
         //Cloned instance should have reference to different array

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/9fd36e3e/pxf/pxf-api/src/test/java/org/apache/hawq/pxf/api/utilities/UtilitiesTest.java
----------------------------------------------------------------------
diff --git a/pxf/pxf-api/src/test/java/org/apache/hawq/pxf/api/utilities/UtilitiesTest.java
b/pxf/pxf-api/src/test/java/org/apache/hawq/pxf/api/utilities/UtilitiesTest.java
index 5caca6d..6379193 100644
--- a/pxf/pxf-api/src/test/java/org/apache/hawq/pxf/api/utilities/UtilitiesTest.java
+++ b/pxf/pxf-api/src/test/java/org/apache/hawq/pxf/api/utilities/UtilitiesTest.java
@@ -20,6 +20,7 @@ package org.apache.hawq.pxf.api.utilities;
  */
 
 
+import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
@@ -201,7 +202,7 @@ public class UtilitiesTest {
 
         assertEquals(10, fragmentMetadata.getStart());
         assertEquals(100, fragmentMetadata.getEnd());
-        assertEquals(new String[] { "hostname" }, fragmentMetadata.getHosts());
+        assertArrayEquals(new String[] { "hostname" }, fragmentMetadata.getHosts());
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/9fd36e3e/pxf/pxf-hive/src/main/java/org/apache/hawq/pxf/plugins/hive/utilities/ProfileFactory.java
----------------------------------------------------------------------
diff --git a/pxf/pxf-hive/src/main/java/org/apache/hawq/pxf/plugins/hive/utilities/ProfileFactory.java
b/pxf/pxf-hive/src/main/java/org/apache/hawq/pxf/plugins/hive/utilities/ProfileFactory.java
index 7294a02..9bde2c1 100644
--- a/pxf/pxf-hive/src/main/java/org/apache/hawq/pxf/plugins/hive/utilities/ProfileFactory.java
+++ b/pxf/pxf-hive/src/main/java/org/apache/hawq/pxf/plugins/hive/utilities/ProfileFactory.java
@@ -63,6 +63,10 @@ public class ProfileFactory {
 
     /**
      * @see ProfileFactory#get(InputFormat, boolean, String)
+     *
+     * @param inputFormat input format of table/partition
+     * @param hasComplexTypes whether record has complex types, see @EnumHiveToHawqType
+     * @return name of optimal profile
      */
     public static String get(InputFormat inputFormat, boolean hasComplexTypes) {
         String profileName = get(inputFormat, hasComplexTypes, null);

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/9fd36e3e/pxf/pxf-hive/src/test/java/org/apache/hawq/pxf/plugins/hive/HiveORCAccessorTest.java
----------------------------------------------------------------------
diff --git a/pxf/pxf-hive/src/test/java/org/apache/hawq/pxf/plugins/hive/HiveORCAccessorTest.java
b/pxf/pxf-hive/src/test/java/org/apache/hawq/pxf/plugins/hive/HiveORCAccessorTest.java
index b1ee3f3..1049782 100644
--- a/pxf/pxf-hive/src/test/java/org/apache/hawq/pxf/plugins/hive/HiveORCAccessorTest.java
+++ b/pxf/pxf-hive/src/test/java/org/apache/hawq/pxf/plugins/hive/HiveORCAccessorTest.java
@@ -66,6 +66,7 @@ public class HiveORCAccessorTest {
     HiveORCAccessor accessor;
 
     @Before
+    @SuppressWarnings("unchecked")
     public void setup() throws Exception {
         jobConf = new JobConf();
         PowerMockito.whenNew(JobConf.class).withAnyArguments().thenReturn(jobConf);

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/9fd36e3e/pxf/pxf-hive/src/test/java/org/apache/hawq/pxf/plugins/hive/utilities/HiveUtilitiesTest.java
----------------------------------------------------------------------
diff --git a/pxf/pxf-hive/src/test/java/org/apache/hawq/pxf/plugins/hive/utilities/HiveUtilitiesTest.java
b/pxf/pxf-hive/src/test/java/org/apache/hawq/pxf/plugins/hive/utilities/HiveUtilitiesTest.java
index 05ef001..b98c957 100644
--- a/pxf/pxf-hive/src/test/java/org/apache/hawq/pxf/plugins/hive/utilities/HiveUtilitiesTest.java
+++ b/pxf/pxf-hive/src/test/java/org/apache/hawq/pxf/plugins/hive/utilities/HiveUtilitiesTest.java
@@ -274,7 +274,7 @@ public class HiveUtilitiesTest {
     @Test
     public void extractModifiers() throws Exception {
         Integer[] mods = EnumHiveToHawqType.extractModifiers("decimal(10,2)");
-        assertEquals(mods, new Integer[]{10, 2});
+        assertArrayEquals(mods, new Integer[]{10, 2});
     }
 
     @Test
@@ -409,6 +409,7 @@ public class HiveUtilitiesTest {
     }
 
     @Test
+    @SuppressWarnings("deprecation")
     public void createDeserializer() throws Exception {
         SerDe serde = HiveUtilities.createDeserializer(HiveUtilities.PXF_HIVE_SERDES.ORC_SERDE,
HiveUtilities.PXF_HIVE_SERDES.ORC_SERDE);
         assertTrue(serde instanceof OrcSerde);

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/9fd36e3e/pxf/pxf-service/src/main/java/org/apache/hawq/pxf/service/utilities/ProtocolData.java
----------------------------------------------------------------------
diff --git a/pxf/pxf-service/src/main/java/org/apache/hawq/pxf/service/utilities/ProtocolData.java
b/pxf/pxf-service/src/main/java/org/apache/hawq/pxf/service/utilities/ProtocolData.java
index 8456165..65cdf16 100644
--- a/pxf/pxf-service/src/main/java/org/apache/hawq/pxf/service/utilities/ProtocolData.java
+++ b/pxf/pxf-service/src/main/java/org/apache/hawq/pxf/service/utilities/ProtocolData.java
@@ -290,7 +290,7 @@ public class ProtocolData extends InputData {
 
     /**
      * Returns the current output format, either {@link OutputFormat#TEXT} or
-     * {@link OutputFormat#BINARY}.
+     * {@link OutputFormat#GPDBWritable}.
      *
      * @return output format
      */

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/9fd36e3e/pxf/pxf-service/src/test/java/org/apache/hawq/pxf/service/utilities/ProtocolDataTest.java
----------------------------------------------------------------------
diff --git a/pxf/pxf-service/src/test/java/org/apache/hawq/pxf/service/utilities/ProtocolDataTest.java
b/pxf/pxf-service/src/test/java/org/apache/hawq/pxf/service/utilities/ProtocolDataTest.java
index 09efe81..10479c7 100644
--- a/pxf/pxf-service/src/test/java/org/apache/hawq/pxf/service/utilities/ProtocolDataTest.java
+++ b/pxf/pxf-service/src/test/java/org/apache/hawq/pxf/service/utilities/ProtocolDataTest.java
@@ -351,8 +351,8 @@ public class ProtocolDataTest {
 
         ProtocolData protocolData = new ProtocolData(parameters);
 
-        assertEquals(protocolData.getColumn(0).columnTypeModifiers(), new Integer[]{5});
-        assertEquals(protocolData.getColumn(1).columnTypeModifiers(), new Integer[]{10, 2});
+        assertArrayEquals(protocolData.getColumn(0).columnTypeModifiers(), new Integer[]{5});
+        assertArrayEquals(protocolData.getColumn(1).columnTypeModifiers(), new Integer[]{10,
2});
     }
 
     @Test


Mime
View raw message