phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s..@apache.org
Subject [2/4] phoenix git commit: PHOENIX-3708 Tests introduced in PHOENIX-3346 doesn't work well with failsafe plugin
Date Sat, 10 Jun 2017 17:12:14 GMT
PHOENIX-3708 Tests introduced in PHOENIX-3346 doesn't work well with failsafe plugin


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/7b9a87d7
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/7b9a87d7
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/7b9a87d7

Branch: refs/heads/4.x-HBase-1.1
Commit: 7b9a87d7b77675636af80d2884bcb73cd5e7cc5c
Parents: 69db8b5
Author: Sergey Soldatov <ssa@apache.org>
Authored: Tue Mar 7 22:20:51 2017 -0800
Committer: Sergey Soldatov <ssa@apache.org>
Committed: Sat Jun 10 10:10:01 2017 -0700

----------------------------------------------------------------------
 phoenix-hive/pom.xml                            | 38 +++++++++++++-------
 .../phoenix/hive/BaseHivePhoenixStoreIT.java    |  2 +-
 .../apache/phoenix/hive/HiveMapReduceIT.java    |  1 -
 .../org/apache/phoenix/hive/HiveTestUtil.java   |  9 +++--
 .../java/org/apache/phoenix/hive/HiveTezIT.java |  1 -
 .../phoenix/hive/query/PhoenixQueryBuilder.java |  4 +--
 6 files changed, 33 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/7b9a87d7/phoenix-hive/pom.xml
----------------------------------------------------------------------
diff --git a/phoenix-hive/pom.xml b/phoenix-hive/pom.xml
index 8950f5f..282de02 100644
--- a/phoenix-hive/pom.xml
+++ b/phoenix-hive/pom.xml
@@ -110,19 +110,31 @@
       <artifactId>hadoop-minicluster</artifactId>
       <scope>test</scope>
     </dependency>
-          <dependency>
-            <groupId>org.apache.tez</groupId>
-            <artifactId>tez-tests</artifactId>
-            <scope>test</scope>
-            <version>0.8.4</version>
-            <type>test-jar</type>
-          </dependency>
-          <dependency>
-           <groupId>org.apache.tez</groupId>
-    <artifactId>tez-dag</artifactId>
-            <scope>test</scope>
-    <version>0.8.4</version>
-  </dependency>
+    <dependency>
+      <groupId>org.apache.tez</groupId>
+      <artifactId>tez-tests</artifactId>
+      <scope>test</scope>
+      <version>0.8.4</version>
+      <type>test-jar</type>
+      <exclusions>
+        <exclusion>
+          <groupId>org.apache.hadoop</groupId>
+          <artifactId>hadoop-yarn-api</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.tez</groupId>
+      <artifactId>tez-dag</artifactId>
+      <scope>test</scope>
+      <version>0.8.4</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.apache.hadoop</groupId>
+          <artifactId>hadoop-yarn-api</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
     <dependency>
       <groupId>org.mockito</groupId>
       <artifactId>mockito-all</artifactId>

http://git-wip-us.apache.org/repos/asf/phoenix/blob/7b9a87d7/phoenix-hive/src/it/java/org/apache/phoenix/hive/BaseHivePhoenixStoreIT.java
----------------------------------------------------------------------
diff --git a/phoenix-hive/src/it/java/org/apache/phoenix/hive/BaseHivePhoenixStoreIT.java
b/phoenix-hive/src/it/java/org/apache/phoenix/hive/BaseHivePhoenixStoreIT.java
index ac0a7fc..afb06ae 100644
--- a/phoenix-hive/src/it/java/org/apache/phoenix/hive/BaseHivePhoenixStoreIT.java
+++ b/phoenix-hive/src/it/java/org/apache/phoenix/hive/BaseHivePhoenixStoreIT.java
@@ -86,7 +86,7 @@ public class BaseHivePhoenixStoreIT {
         }
 
         //Start HBase cluster
-        hbaseCluster = hbaseTestUtil.startMiniCluster(3);
+        hbaseCluster = hbaseTestUtil.startMiniCluster(1);
         MiniDFSCluster x = hbaseTestUtil.getDFSCluster();
         Class.forName(PhoenixDriver.class.getName());
         zkQuorum = "localhost:" + hbaseTestUtil.getZkCluster().getClientPort();

http://git-wip-us.apache.org/repos/asf/phoenix/blob/7b9a87d7/phoenix-hive/src/it/java/org/apache/phoenix/hive/HiveMapReduceIT.java
----------------------------------------------------------------------
diff --git a/phoenix-hive/src/it/java/org/apache/phoenix/hive/HiveMapReduceIT.java b/phoenix-hive/src/it/java/org/apache/phoenix/hive/HiveMapReduceIT.java
index deaea6f..644ff24 100644
--- a/phoenix-hive/src/it/java/org/apache/phoenix/hive/HiveMapReduceIT.java
+++ b/phoenix-hive/src/it/java/org/apache/phoenix/hive/HiveMapReduceIT.java
@@ -23,7 +23,6 @@ import org.junit.BeforeClass;
 import org.junit.experimental.categories.Category;
 import org.junit.Ignore;
 
-@Ignore("Temporary disabled to run in regular build due strange incompatibility with failsafe
plugion")
 @Category(NeedsOwnMiniClusterTest.class)
 public class HiveMapReduceIT extends HivePhoenixStoreIT {
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/7b9a87d7/phoenix-hive/src/it/java/org/apache/phoenix/hive/HiveTestUtil.java
----------------------------------------------------------------------
diff --git a/phoenix-hive/src/it/java/org/apache/phoenix/hive/HiveTestUtil.java b/phoenix-hive/src/it/java/org/apache/phoenix/hive/HiveTestUtil.java
index f5823ea..b4c4e46 100644
--- a/phoenix-hive/src/it/java/org/apache/phoenix/hive/HiveTestUtil.java
+++ b/phoenix-hive/src/it/java/org/apache/phoenix/hive/HiveTestUtil.java
@@ -299,16 +299,19 @@ public class HiveTestUtil {
                 ());
 
         HadoopShims shims = ShimLoader.getHadoopShims();
-        int numberOfDataNodes = 4;
+        int numberOfDataNodes = 1;
 
         if (clusterType != MiniClusterType.none) {
             dfs = shims.getMiniDfs(conf, numberOfDataNodes, true, null);
             FileSystem fs = dfs.getFileSystem();
             String uriString = WindowsPathUtil.getHdfsUriString(fs.getUri().toString());
             if (clusterType == MiniClusterType.tez) {
-                mr = shims.getMiniTezCluster(conf, 4, uriString, 1);
+                conf.set("hive.execution.engine", "tez");
+                mr = shims.getMiniTezCluster(conf, 1, uriString, 1);
             } else {
-                mr = shims.getMiniMrCluster(conf, 4, uriString, 1);
+                conf.set("hive.execution.engine", "mr");
+                mr = shims.getMiniMrCluster(conf, 1, uriString, 1);
+
             }
         }
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/7b9a87d7/phoenix-hive/src/it/java/org/apache/phoenix/hive/HiveTezIT.java
----------------------------------------------------------------------
diff --git a/phoenix-hive/src/it/java/org/apache/phoenix/hive/HiveTezIT.java b/phoenix-hive/src/it/java/org/apache/phoenix/hive/HiveTezIT.java
index 8d2848d..8dc3309 100644
--- a/phoenix-hive/src/it/java/org/apache/phoenix/hive/HiveTezIT.java
+++ b/phoenix-hive/src/it/java/org/apache/phoenix/hive/HiveTezIT.java
@@ -23,7 +23,6 @@ import org.junit.BeforeClass;
 import org.junit.experimental.categories.Category;
 import org.junit.Ignore;
 
-@Ignore("Temporary disabled to run in regular build due strange incompatibility with failsafe
plugion")
 @Category(NeedsOwnMiniClusterTest.class)
 public class HiveTezIT extends HivePhoenixStoreIT {
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/7b9a87d7/phoenix-hive/src/main/java/org/apache/phoenix/hive/query/PhoenixQueryBuilder.java
----------------------------------------------------------------------
diff --git a/phoenix-hive/src/main/java/org/apache/phoenix/hive/query/PhoenixQueryBuilder.java
b/phoenix-hive/src/main/java/org/apache/phoenix/hive/query/PhoenixQueryBuilder.java
index 210a377..eb336dc 100644
--- a/phoenix-hive/src/main/java/org/apache/phoenix/hive/query/PhoenixQueryBuilder.java
+++ b/phoenix-hive/src/main/java/org/apache/phoenix/hive/query/PhoenixQueryBuilder.java
@@ -98,12 +98,10 @@ public class PhoenixQueryBuilder {
 
         if (conditionColumnList.size() > 0) {
             addConditionColumnToReadColumn(readColumnList, conditionColumnList);
-            readColumnList = ColumnMappingUtils.quoteColumns(readColumnList);
             sql.insert(0, queryTemplate.replace("$HINT$", hints).replace("$COLUMN_LIST$",
                     getSelectColumns(jobConf, tableName, readColumnList)).replace("$TABLE_NAME$",
                     tableName));
         } else {
-            readColumnList = ColumnMappingUtils.quoteColumns(readColumnList);
             sql.append(queryTemplate.replace("$HINT$", hints).replace("$COLUMN_LIST$",
                     getSelectColumns(jobConf, tableName, readColumnList)).replace("$TABLE_NAME$",
                     tableName));
@@ -251,7 +249,7 @@ public class PhoenixQueryBuilder {
         for (String columnName : columnTypeMap.keySet()) {
             if (whereClause.contains(columnName)) {
                 String column = findReplacement(jobConf, columnName);
-                whereClause = StringUtils.replaceEach(whereClause, new String[] {columnName},
new String[] {"\""+column + "\""});
+                whereClause = whereClause.replaceAll("\\b" + columnName + "\\b", "\"" + column
+ "\"");
                 conditionColumnList.add(column);
 
 


Mime
View raw message