You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by el...@apache.org on 2019/09/05 21:51:46 UTC

[phoenix] branch master updated (50a6aeb -> a3ff170)

This is an automated email from the ASF dual-hosted git repository.

elserj pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix.git.


    from 50a6aeb  PHOENIX-5455 IndexedKeyValue creation fails after HBASE-22034
     new 0e06588  PHOENIX-5459 Enable running the test suite with JDK11
     new ea7a218  PHOENIX-5461 phoenix-pherf IT failures with JDK11
     new a3ff170  PHOENIX-5460 SortOrderExpressionTest failure with JDK11

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../expression/SortOrderExpressionTest.java        | 11 ++++++++++-
 phoenix-pherf/pom.xml                              | 22 +++++++++++++++++-----
 .../apache/phoenix/pherf/configuration/Column.java |  5 -----
 .../pherf/configuration/XMLConfigParser.java       | 16 +++++++++++++++-
 .../apache/phoenix/pherf/util/ResourceList.java    |  3 ++-
 pom.xml                                            |  8 ++++----
 6 files changed, 48 insertions(+), 17 deletions(-)


[phoenix] 03/03: PHOENIX-5460 SortOrderExpressionTest failure with JDK11

Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

elserj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix.git

commit a3ff1707f299dd28ac7e43f90d68de1f58ca0342
Author: Istvan Toth <st...@stoty.hu>
AuthorDate: Mon Sep 2 12:45:40 2019 +0200

    PHOENIX-5460 SortOrderExpressionTest failure with JDK11
    
    Closes #577
    
    Signed-off-by: Josh Elser <el...@apache.org>
---
 .../apache/phoenix/expression/SortOrderExpressionTest.java    | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/phoenix-core/src/test/java/org/apache/phoenix/expression/SortOrderExpressionTest.java b/phoenix-core/src/test/java/org/apache/phoenix/expression/SortOrderExpressionTest.java
index e2ab684..c2850a9 100644
--- a/phoenix-core/src/test/java/org/apache/phoenix/expression/SortOrderExpressionTest.java
+++ b/phoenix-core/src/test/java/org/apache/phoenix/expression/SortOrderExpressionTest.java
@@ -146,7 +146,16 @@ public class SortOrderExpressionTest {
     @Test
     public void toChar() throws Exception {
         List<Expression> args = Lists.newArrayList(getInvertedLiteral(date(12, 11, 2001), PDate.INSTANCE));
-        evaluateAndAssertResult(new ToCharFunction(args, FunctionArgumentType.TEMPORAL, "", DateUtil.getDateFormatter("MM/dd/yy hh:mm a")), "12/11/01 12:00 AM");
+        // We may get AM or am depending on Java version, see JDK-8211985
+        // This is just a hack to accept any case, without completely rewriting the test logic
+        Object caseInsensitiveExpected = new Object() {
+            @Override
+            public boolean equals(Object other) {
+                return (other instanceof String) && "12/11/01 12:00 AM".equalsIgnoreCase((String) other);
+            }
+        };
+        evaluateAndAssertResult(new ToCharFunction(args, FunctionArgumentType.TEMPORAL, "", DateUtil.getDateFormatter("MM/dd/yy hh:mm a")),
+            caseInsensitiveExpected);
     }
     
     @Test


[phoenix] 01/03: PHOENIX-5459 Enable running the test suite with JDK11

Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

elserj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix.git

commit 0e06588f52b46bbc6b51c97d52981f18923681fa
Author: Istvan Toth <st...@stoty.hu>
AuthorDate: Mon Sep 2 11:17:25 2019 +0200

    PHOENIX-5459 Enable running the test suite with JDK11
    
    remove unsupported VM option
    update surefire and failsafe to 2.22.2
    
    Closes #576
    
    Signed-off-by: Josh Elser <el...@apache.org>
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 19a597e..833fec1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -124,8 +124,8 @@
     <!-- Plugin versions -->
     <maven-eclipse-plugin.version>2.9</maven-eclipse-plugin.version>
     <maven-build-helper-plugin.version>1.9.1</maven-build-helper-plugin.version>
-    <maven-surefire-plugin.version>2.20</maven-surefire-plugin.version>
-    <maven-failsafe-plugin.version>2.20</maven-failsafe-plugin.version>
+    <maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
+    <maven-failsafe-plugin.version>2.22.2</maven-failsafe-plugin.version>
 
     <maven-dependency-plugin.version>2.1</maven-dependency-plugin.version>
     <maven.assembly.version>2.5.2</maven.assembly.version>
@@ -254,7 +254,7 @@
                 <runOrder>alphabetical</runOrder>
                 <!--parallel>methods</parallel>
                 <threadCount>20</threadCount-->
-                <argLine>-Xmx2000m -XX:MaxPermSize=256m -Djava.security.egd=file:/dev/./urandom "-Djava.library.path=${hadoop.library.path}${path.separator}${java.library.path}" -XX:NewRatio=4 -XX:SurvivorRatio=8 -XX:+UseCompressedOops -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSClassUnloadingEnabled -XX:+CMSScavengeBeforeRemark -XX:CMSInitiatingOccupancyFraction=68 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./target/ - [...]
+                <argLine>-Xmx2000m -XX:MaxPermSize=256m -Djava.security.egd=file:/dev/./urandom "-Djava.library.path=${hadoop.library.path}${path.separator}${java.library.path}" -XX:NewRatio=4 -XX:SurvivorRatio=8 -XX:+UseCompressedOops -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSClassUnloadingEnabled -XX:+CMSScavengeBeforeRemark -XX:CMSInitiatingOccupancyFraction=68 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./target/ -Dorg.apache.hadoo [...]
                 <redirectTestOutputToFile>${test.output.tofile}</redirectTestOutputToFile>
                 <shutdown>kill</shutdown>
                 <testSourceDirectory>${basedir}/src/it/java</testSourceDirectory>
@@ -283,7 +283,7 @@
 	                 at org.apache.phoenix.coprocessor.MetaDataEndpointImpl.doGetTable(MetaDataEndpointImpl.java:2835)
 	                 at org.apache.phoenix.coprocessor.MetaDataEndpointImpl.getTable(MetaDataEndpointImpl.java:490) -->
 		<!--enableAssertions>false</enableAssertions-->
-                <argLine>-Xmx3000m -XX:MaxPermSize=256m -Djava.security.egd=file:/dev/./urandom "-Djava.library.path=${hadoop.library.path}${path.separator}${java.library.path}" -XX:NewRatio=4 -XX:SurvivorRatio=8 -XX:+UseCompressedOops -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSClassUnloadingEnabled -XX:+CMSScavengeBeforeRemark -XX:CMSInitiatingOccupancyFraction=68 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./target/ - [...]
+                <argLine>-Xmx3000m -XX:MaxPermSize=256m -Djava.security.egd=file:/dev/./urandom "-Djava.library.path=${hadoop.library.path}${path.separator}${java.library.path}" -XX:NewRatio=4 -XX:SurvivorRatio=8 -XX:+UseCompressedOops -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSClassUnloadingEnabled -XX:+CMSScavengeBeforeRemark -XX:CMSInitiatingOccupancyFraction=68 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./target/ -Dorg.apache.hadoo [...]
                 <redirectTestOutputToFile>${test.output.tofile}</redirectTestOutputToFile>
                 <shutdown>kill</shutdown>
                 <testSourceDirectory>${basedir}/src/it/java</testSourceDirectory>


[phoenix] 02/03: PHOENIX-5461 phoenix-pherf IT failures with JDK11

Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

elserj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix.git

commit ea7a21814dbfee181a1b3486b10d01d0b22d653f
Author: Istvan Toth <st...@stoty.hu>
AuthorDate: Mon Sep 2 13:53:17 2019 +0200

    PHOENIX-5461 phoenix-pherf IT failures with JDK11
    
    Closes #578
    
    Signed-off-by: Josh Elser <el...@apache.org>
---
 phoenix-pherf/pom.xml                              | 22 +++++++++++++++++-----
 .../apache/phoenix/pherf/configuration/Column.java |  5 -----
 .../pherf/configuration/XMLConfigParser.java       | 16 +++++++++++++++-
 .../apache/phoenix/pherf/util/ResourceList.java    |  3 ++-
 4 files changed, 34 insertions(+), 12 deletions(-)

diff --git a/phoenix-pherf/pom.xml b/phoenix-pherf/pom.xml
index 6ac62b3..31bd638 100644
--- a/phoenix-pherf/pom.xml
+++ b/phoenix-pherf/pom.xml
@@ -109,11 +109,23 @@
 			<artifactId>hadoop-minicluster</artifactId>
 			<scope>test</scope>
 		</dependency>
-    <dependency>
-      <groupId>org.mockito</groupId>
-      <artifactId>mockito-all</artifactId>
-      <scope>test</scope>
-    </dependency>
+		<dependency>
+			<groupId>org.mockito</groupId>
+			<artifactId>mockito-all</artifactId>
+			<scope>test</scope>
+		</dependency>
+		<!-- Java 11 -->
+		<dependency>
+			<groupId>jakarta.activation</groupId>
+			<artifactId>jakarta.activation-api</artifactId>
+			<version>1.2.1</version>
+		</dependency>
+		<dependency>
+			<groupId>org.glassfish.jaxb</groupId>
+			<artifactId>jaxb-runtime</artifactId>
+			<version>2.3.2</version>
+			<scope>test</scope>
+		</dependency>
 	</dependencies>
 
 	<build>
diff --git a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/Column.java b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/Column.java
index c121451..60646ea 100644
--- a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/Column.java
+++ b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/Column.java
@@ -211,11 +211,6 @@ public class Column {
     @XmlElement(name = "datavalue")
     public void setDataValues(List<DataValue> dataValues) {
         this.dataValues = dataValues;
-
-        // DataValue type is inherited from the column
-        for (DataValue value : dataValues) {
-            value.setType(getType());
-        }
     }
 
     public String getPrefix() {
diff --git a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
index 87b4403..104fab5 100644
--- a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
+++ b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/configuration/XMLConfigParser.java
@@ -36,6 +36,7 @@ import javax.xml.transform.stream.StreamSource;
 
 import org.apache.phoenix.pherf.PherfConstants;
 import org.apache.phoenix.pherf.exception.FileLoaderException;
+import org.apache.phoenix.pherf.rules.DataValue;
 import org.apache.phoenix.pherf.util.ResourceList;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -176,7 +177,20 @@ public class XMLConfigParser {
         }
         for (Path path : this.paths) {
             System.out.println("Adding model for path:" + path.toString());
-            this.dataModels.add(XMLConfigParser.readDataModel(path));
+            DataModel dataModel = XMLConfigParser.readDataModel(path);
+            updateDataValueType(dataModel);
+            this.dataModels.add(dataModel);
+        }
+    }
+    
+    private void updateDataValueType(DataModel dataModel) {
+        for (Column column : dataModel.getDataMappingColumns()) {
+            if (column.getDataValues() != null) {
+                // DataValue type is inherited from the column
+                for (DataValue value : column.getDataValues()) {
+                    value.setType(column.getType());
+                }
+            }
         }
     }
 
diff --git a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/util/ResourceList.java b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/util/ResourceList.java
index df5dbf7..cec12d1 100644
--- a/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/util/ResourceList.java
+++ b/phoenix-pherf/src/main/java/org/apache/phoenix/pherf/util/ResourceList.java
@@ -28,6 +28,7 @@ import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.net.URI;
 import java.net.URL;
+import java.nio.file.NoSuchFileException;
 import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.util.*;
@@ -130,7 +131,7 @@ public class ResourceList {
         ZipFile zf;
         try {
             zf = new ZipFile(file);
-        } catch (FileNotFoundException e) {
+        } catch (FileNotFoundException|NoSuchFileException e) {
             // Gracefully handle a jar listed on the classpath that doesn't actually exist.
             return Collections.emptyList();
         } catch (final ZipException e) {