Build failed in Jenkins: Phoenix-4.x-HBase-1.1 #126

2016-07-18 Thread Apache Jenkins Server
See 

--
[...truncated 2123 lines...]

Running org.apache.phoenix.end2end.index.MutableIndexReplicationIT
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.007 sec <<< 
FAILURE! - in org.apache.phoenix.end2end.index.MutableIndexReplicationIT
org.apache.phoenix.end2end.index.MutableIndexReplicationIT  Time elapsed: 0.006 
sec  <<< ERROR!
java.io.IOException: Shutting down
at 
org.apache.phoenix.end2end.index.MutableIndexReplicationIT.setupConfigsAndStartCluster(MutableIndexReplicationIT.java:170)
at 
org.apache.phoenix.end2end.index.MutableIndexReplicationIT.setUpBeforeClass(MutableIndexReplicationIT.java:108)
Caused by: java.lang.RuntimeException: Master not initialized after 20ms 
seconds
at 
org.apache.phoenix.end2end.index.MutableIndexReplicationIT.setupConfigsAndStartCluster(MutableIndexReplicationIT.java:170)
at 
org.apache.phoenix.end2end.index.MutableIndexReplicationIT.setUpBeforeClass(MutableIndexReplicationIT.java:108)

Running org.apache.phoenix.end2end.index.ReadOnlyIndexFailureIT
Running org.apache.phoenix.hbase.index.FailForUnsupportedHBaseVersionsIT
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.005 sec <<< 
FAILURE! - in org.apache.phoenix.end2end.index.ReadOnlyIndexFailureIT
org.apache.phoenix.end2end.index.ReadOnlyIndexFailureIT  Time elapsed: 0.004 
sec  <<< ERROR!
java.lang.RuntimeException: java.io.IOException: Shutting down
at 
org.apache.phoenix.end2end.index.ReadOnlyIndexFailureIT.doSetup(ReadOnlyIndexFailureIT.java:119)
Caused by: java.io.IOException: Shutting down
at 
org.apache.phoenix.end2end.index.ReadOnlyIndexFailureIT.doSetup(ReadOnlyIndexFailureIT.java:119)
Caused by: java.lang.RuntimeException: Master not initialized after 20ms 
seconds
at 
org.apache.phoenix.end2end.index.ReadOnlyIndexFailureIT.doSetup(ReadOnlyIndexFailureIT.java:119)

Running org.apache.phoenix.end2end.index.txn.TxWriteFailureIT
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.004 sec <<< 
FAILURE! - in org.apache.phoenix.end2end.index.txn.TxWriteFailureIT
org.apache.phoenix.end2end.index.txn.TxWriteFailureIT  Time elapsed: 0.004 sec  
<<< ERROR!
java.lang.RuntimeException: java.io.IOException: Shutting down
at 
org.apache.phoenix.end2end.index.txn.TxWriteFailureIT.doSetup(TxWriteFailureIT.java:86)
Caused by: java.io.IOException: Shutting down
at 
org.apache.phoenix.end2end.index.txn.TxWriteFailureIT.doSetup(TxWriteFailureIT.java:86)
Caused by: java.lang.RuntimeException: Master not initialized after 20ms 
seconds
at 
org.apache.phoenix.end2end.index.txn.TxWriteFailureIT.doSetup(TxWriteFailureIT.java:86)

Running org.apache.phoenix.execute.PartialCommitIT
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.004 sec <<< 
FAILURE! - in org.apache.phoenix.execute.PartialCommitIT
org.apache.phoenix.execute.PartialCommitIT  Time elapsed: 0.004 sec  <<< ERROR!
java.lang.RuntimeException: java.io.IOException: Shutting down
at 
org.apache.phoenix.execute.PartialCommitIT.doSetup(PartialCommitIT.java:94)
Caused by: java.io.IOException: Shutting down
at 
org.apache.phoenix.execute.PartialCommitIT.doSetup(PartialCommitIT.java:94)
Caused by: java.lang.RuntimeException: Master not initialized after 20ms 
seconds
at 
org.apache.phoenix.execute.PartialCommitIT.doSetup(PartialCommitIT.java:94)

Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 208.334 sec <<< 
FAILURE! - in org.apache.phoenix.hbase.index.FailForUnsupportedHBaseVersionsIT
testDoesNotStartRegionServerForUnsupportedCompressionAndVersion(org.apache.phoenix.hbase.index.FailForUnsupportedHBaseVersionsIT)
  Time elapsed: 207.973 sec  <<< ERROR!
java.io.IOException: Shutting down
at 
org.apache.phoenix.hbase.index.FailForUnsupportedHBaseVersionsIT.testDoesNotStartRegionServerForUnsupportedCompressionAndVersion(FailForUnsupportedHBaseVersionsIT.java:121)
Caused by: java.lang.RuntimeException: Master not initialized after 20ms 
seconds
at 
org.apache.phoenix.hbase.index.FailForUnsupportedHBaseVersionsIT.testDoesNotStartRegionServerForUnsupportedCompressionAndVersion(FailForUnsupportedHBaseVersionsIT.java:121)

Running 
org.apache.phoenix.hbase.index.covered.EndToEndCoveredColumnsIndexBuilderIT
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.007 sec <<< 
FAILURE! - in 
org.apache.phoenix.hbase.index.covered.EndToEndCoveredColumnsIndexBuilderIT
org.apache.phoenix.hbase.index.covered.EndToEndCoveredColumnsIndexBuilderIT  
Time elapsed: 0.006 sec  <<< ERROR!
java.io.IOException: Shutting down
at 
org.apache.phoenix.hbase.index.covered.EndToEndCoveredColumnsIndexBuilderIT.setupCluster(EndToEndCoveredColumnsIndexBuilderIT.java:107)
Caused by: java.lang.RuntimeException: Master not initialized after 20ms 
seconds
at 

Jenkins build is back to normal : Phoenix-4.x-HBase-1.0 #573

2016-07-18 Thread Apache Jenkins Server
See 



phoenix git commit: PHOENIX-2229 Support CREATE VIEW in Phoenix-Calcite Integration

2016-07-18 Thread maryannxue
Repository: phoenix
Updated Branches:
  refs/heads/calcite 3d4a75feb -> 1601f533a


PHOENIX-2229 Support CREATE VIEW in Phoenix-Calcite Integration


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

Branch: refs/heads/calcite
Commit: 1601f533aad85971d6ba9d2cdf70b81e7d1103a8
Parents: 3d4a75f
Author: maryannxue 
Authored: Mon Jul 18 22:13:15 2016 -0400
Committer: maryannxue 
Committed: Mon Jul 18 22:13:15 2016 -0400

--
 .../src/main/codegen/includes/parserImpls.ftl   | 23 ++--
 .../calcite/jdbc/PhoenixPrepareImpl.java|  9 +++-
 .../phoenix/calcite/parse/SqlCreateTable.java   |  4 
 3 files changed, 10 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/1601f533/phoenix-core/src/main/codegen/includes/parserImpls.ftl
--
diff --git a/phoenix-core/src/main/codegen/includes/parserImpls.ftl 
b/phoenix-core/src/main/codegen/includes/parserImpls.ftl
index 7ce1596..3c9d6dc 100644
--- a/phoenix-core/src/main/codegen/includes/parserImpls.ftl
+++ b/phoenix-core/src/main/codegen/includes/parserImpls.ftl
@@ -35,24 +35,14 @@ SqlNode SqlCommit() :
 }
 }
 
-// Remove when
-//  [CALCITE-851] Add original SQL string as a field in the parser
-// is fixed.
-JAVACODE
-public String originalSql() {
-   return 
org.apache.phoenix.calcite.jdbc.PhoenixPrepareImpl.THREAD_SQL_STRING.get();
-}
-
 SqlNode SqlCreateView() :
 {
 SqlParserPos pos;
-SqlParserPos queryPos;
 SqlIdentifier tableName;
 boolean ifNotExists;
 SqlNodeList columnDefs;
 SqlIdentifier baseTableName;
 SqlNode where;
-String viewStatementString;
 SqlNodeList tableOptions;
 }
 {
@@ -75,21 +65,12 @@ SqlNode SqlCreateView() :
 }
 )
 (
-  { queryPos = getPos(); }  
-baseTableName = DualIdentifier()
+baseTableName = DualIdentifier()
 where = WhereOpt()
-{
-queryPos = queryPos.plus(getPos());
-String sql = originalSql();
-int start = SqlParserUtil.lineColToIndex(sql, 
queryPos.getLineNum(), queryPos.getColumnNum());
-int end = SqlParserUtil.lineColToIndex(sql, 
queryPos.getEndLineNum(), queryPos.getEndColumnNum());
-viewStatementString = sql.substring(start, end + 1);
-}
 |
 {
 baseTableName = null;
 where = null;
-viewStatementString = null;
 }
 )
 (
@@ -102,7 +83,7 @@ SqlNode SqlCreateView() :
 {
 return new SqlCreateTable(pos.plus(getPos()), tableName,
 SqlLiteral.createBoolean(ifNotExists, SqlParserPos.ZERO),
-columnDefs, baseTableName, where, viewStatementString, 
tableOptions);
+columnDefs, baseTableName, where, tableOptions);
 }
 }
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/1601f533/phoenix-core/src/main/java/org/apache/phoenix/calcite/jdbc/PhoenixPrepareImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/calcite/jdbc/PhoenixPrepareImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/calcite/jdbc/PhoenixPrepareImpl.java
index c9d372d..ec2cdc0 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/calcite/jdbc/PhoenixPrepareImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/calcite/jdbc/PhoenixPrepareImpl.java
@@ -28,6 +28,8 @@ import org.apache.calcite.sql.SqlNode;
 import org.apache.calcite.sql.SqlNodeList;
 import org.apache.calcite.sql.SqlTableOptionNode;
 import org.apache.calcite.sql.parser.SqlParser;
+import org.apache.calcite.sql.parser.SqlParserPos;
+import org.apache.calcite.sql.parser.SqlParserUtil;
 import org.apache.calcite.tools.Program;
 import org.apache.calcite.tools.Programs;
 import org.apache.calcite.util.Holder;
@@ -219,7 +221,12 @@ public class PhoenixPrepareImpl extends CalcitePrepareImpl 
{
 if (table.whereNode == null) {
 where = null;
 } else {
-where = new 
SQLParser(table.viewStatementString).parseQuery().getWhere();
+String sql = THREAD_SQL_STRING.get();
+SqlParserPos wherePos = 
table.whereNode.getParserPosition();
+int start = SqlParserUtil.lineColToIndex(sql, 
wherePos.getLineNum(), wherePos.getColumnNum());
+int end = SqlParserUtil.lineColToIndex(sql, 
wherePos.getEndLineNum(), wherePos.getEndColumnNum());
+  

Build failed in Jenkins: Phoenix | 4.x-HBase-0.98 #1237

2016-07-18 Thread Apache Jenkins Server
See 

Changes:

[tdsilva] PHOENIX-3042 Using functional index expression in where statement for

--
Started by an SCM change
Started by an SCM change
[EnvInject] - Loading node environment variables.
Building remotely on H10 (docker Ubuntu ubuntu yahoo-not-h2) in workspace 

 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url 
 > https://git-wip-us.apache.org/repos/asf/phoenix.git # timeout=10
Fetching upstream changes from 
https://git-wip-us.apache.org/repos/asf/phoenix.git
 > git --version # timeout=10
 > git -c core.askpass=true fetch --tags --progress 
 > https://git-wip-us.apache.org/repos/asf/phoenix.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse origin/4.x-HBase-0.98^{commit} # timeout=10
Checking out Revision 51214638f1fd3d7881addab2fd347d8ef10980cd 
(origin/4.x-HBase-0.98)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 51214638f1fd3d7881addab2fd347d8ef10980cd
 > git rev-list 6416181f89e633d9103ef2920ee14c314c473c0f # timeout=10
No emails were triggered.
[EnvInject] - Executing scripts and injecting environment variables after the 
SCM step.
[EnvInject] - Injecting as environment variables the properties content 
MAVEN_OPTS=-Xmx3G

[EnvInject] - Variables injected successfully.
[Phoenix-4.x-HBase-0.98] $ /bin/bash -xe /tmp/hudson9136683065911802882.sh
+ echo 'DELETING ~/.m2/repository/org/apache/htrace. See 
https://issues.apache.org/jira/browse/PHOENIX-1802'
DELETING ~/.m2/repository/org/apache/htrace. See 
https://issues.apache.org/jira/browse/PHOENIX-1802
+ echo 'CURRENT CONTENT:'
CURRENT CONTENT:
+ ls /home/jenkins/.m2/repository/org/apache/htrace
htrace
htrace-core
htrace-core4
FATAL: Couldn?t find any executable in /home/jenkins/tools/maven/latest3/
Build step 'Invoke top-level Maven targets' marked build as failure
Archiving artifacts
Compressed 1.58 GB of artifacts by 53.1% relative to #1236
Recording test results
ERROR: Step ?Publish JUnit test result report? failed: Test reports were found 
but none of them are new. Did tests run? 
For example, 

 is 5 days 15 hr old




Apache-Phoenix | Master | Build Successful

2016-07-18 Thread Apache Jenkins Server
Master branch build status Successful
Source repository https://git-wip-us.apache.org/repos/asf?p=phoenix.git;a=shortlog;h=refs/heads/master

Last Successful Compiled Artifacts https://builds.apache.org/job/Phoenix-master/lastSuccessfulBuild/artifact/

Last Complete Test Report https://builds.apache.org/job/Phoenix-master/lastCompletedBuild/testReport/

Changes
[larsh] PHOENIX-3070 Unnecessary use of UUID.randomUUID().



Build times for last couple of runsLatest build time is the right most | Legend blue: normal, red: test failure, gray: timeout


phoenix git commit: PHOENIX-3042 Using functional index expression in where statement for join query fails

2016-07-18 Thread tdsilva
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.0 69782b958 -> 4f5bee662


PHOENIX-3042 Using functional index expression in where statement for join 
query fails


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

Branch: refs/heads/4.x-HBase-1.0
Commit: 4f5bee662b08964d836563c14d065de1e5fa6732
Parents: 69782b9
Author: Thomas D'Silva 
Authored: Mon Jul 18 17:05:35 2016 -0700
Committer: Thomas D'Silva 
Committed: Mon Jul 18 17:05:35 2016 -0700

--
 .../end2end/index/IndexExpressionIT.java| 82 
 .../phoenix/compile/IndexStatementRewriter.java | 12 ++-
 .../apache/phoenix/compile/JoinCompiler.java| 17 ++--
 .../apache/phoenix/optimize/QueryOptimizer.java |  2 +-
 .../parse/IndexExpressionParseNodeRewriter.java |  8 +-
 .../phoenix/compile/QueryCompilerTest.java  | 41 +-
 6 files changed, 144 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/4f5bee66/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexExpressionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexExpressionIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexExpressionIT.java
index 2e55594..21da43a 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexExpressionIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexExpressionIT.java
@@ -1411,5 +1411,87 @@ public class IndexExpressionIT extends 
BaseHBaseManagedTimeIT {
conn.close();
}
}
+   
+   @Test
+public void testImmutableTableGlobalIndexExpressionWithJoin() throws 
Exception {
+helpTestIndexExpressionWithJoin(false, false);
+}
+   
+   @Test
+public void testImmutableTableLocalIndexExpressionWithJoin() throws 
Exception {
+helpTestIndexExpressionWithJoin(false, true);
+}
+   
+   @Test
+public void testMutableTableGlobalIndexExpressionWithJoin() throws 
Exception {
+helpTestIndexExpressionWithJoin(true, false);
+}
+   
+   @Test
+public void testMutableTableLocalIndexExpressionWithJoin() throws 
Exception {
+   helpTestIndexExpressionWithJoin(true, true);
+}
+
+public void helpTestIndexExpressionWithJoin(boolean mutable,
+boolean localIndex) throws Exception {
+Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+Connection conn = DriverManager.getConnection(getUrl(), props);
+String nameSuffix = "T" + (mutable ? "MUTABLE" : "_IMMUTABLE") + 
(localIndex ? "_LOCAL" : "_GLOBAL");
+String tableName = "T" + nameSuffix;
+String indexName = "IDX" + nameSuffix;
+try {
+conn.createStatement().execute(
+"CREATE TABLE "
++ tableName
++ "( c_customer_sk varchar primary key, 
c_first_name varchar, c_last_name varchar )"
++ (!mutable ? "IMMUTABLE_ROWS=true" : ""));
+String query = "SELECT * FROM " + tableName;
+ResultSet rs = conn.createStatement().executeQuery(query);
+assertFalse(rs.next());
+
+conn.createStatement().execute(
+"CREATE " + (localIndex ? "LOCAL" : "")
++ " INDEX " + indexName + " ON " + tableName + " 
(c_customer_sk || c_first_name asc)");
+query = "SELECT * FROM " + indexName;
+rs = conn.createStatement().executeQuery(query);
+assertFalse(rs.next());
+
+PreparedStatement stmt = conn.prepareStatement("UPSERT INTO " + 
tableName + " VALUES(?,?,?)");
+stmt.setString(1, "1");
+stmt.setString(2, "David");
+stmt.setString(3, "Smith");
+stmt.execute();
+conn.commit();
+
+query = "select c.c_customer_sk from  " + tableName + " c "
++ "left outer join " + tableName + " c2 on c.c_customer_sk 
= c2.c_customer_sk "
++ "where c.c_customer_sk || c.c_first_name = '1David'";
+rs = conn.createStatement().executeQuery("EXPLAIN "+query);
+String explainPlan = QueryUtil.getExplainPlan(rs);
+if (localIndex) {
+   assertEquals("CLIENT PARALLEL 1-WAY RANGE SCAN OVER " + 
tableName + " [1,'1David']\n" + 
+"SERVER FILTER BY FIRST KEY ONLY\n" + 
+  

phoenix git commit: PHOENIX-3042 Using functional index expression in where statement for join query fails

2016-07-18 Thread tdsilva
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-0.98 6416181f8 -> 51214638f


PHOENIX-3042 Using functional index expression in where statement for join 
query fails


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

Branch: refs/heads/4.x-HBase-0.98
Commit: 51214638f1fd3d7881addab2fd347d8ef10980cd
Parents: 6416181
Author: Thomas D'Silva 
Authored: Mon Jul 18 17:00:43 2016 -0700
Committer: Thomas D'Silva 
Committed: Mon Jul 18 17:00:43 2016 -0700

--
 .../end2end/index/IndexExpressionIT.java| 82 
 .../phoenix/compile/IndexStatementRewriter.java | 12 ++-
 .../apache/phoenix/compile/JoinCompiler.java| 17 ++--
 .../apache/phoenix/optimize/QueryOptimizer.java |  2 +-
 .../parse/IndexExpressionParseNodeRewriter.java |  8 +-
 .../phoenix/compile/QueryCompilerTest.java  | 41 +-
 6 files changed, 144 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/51214638/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexExpressionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexExpressionIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexExpressionIT.java
index 2e55594..21da43a 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexExpressionIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexExpressionIT.java
@@ -1411,5 +1411,87 @@ public class IndexExpressionIT extends 
BaseHBaseManagedTimeIT {
conn.close();
}
}
+   
+   @Test
+public void testImmutableTableGlobalIndexExpressionWithJoin() throws 
Exception {
+helpTestIndexExpressionWithJoin(false, false);
+}
+   
+   @Test
+public void testImmutableTableLocalIndexExpressionWithJoin() throws 
Exception {
+helpTestIndexExpressionWithJoin(false, true);
+}
+   
+   @Test
+public void testMutableTableGlobalIndexExpressionWithJoin() throws 
Exception {
+helpTestIndexExpressionWithJoin(true, false);
+}
+   
+   @Test
+public void testMutableTableLocalIndexExpressionWithJoin() throws 
Exception {
+   helpTestIndexExpressionWithJoin(true, true);
+}
+
+public void helpTestIndexExpressionWithJoin(boolean mutable,
+boolean localIndex) throws Exception {
+Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+Connection conn = DriverManager.getConnection(getUrl(), props);
+String nameSuffix = "T" + (mutable ? "MUTABLE" : "_IMMUTABLE") + 
(localIndex ? "_LOCAL" : "_GLOBAL");
+String tableName = "T" + nameSuffix;
+String indexName = "IDX" + nameSuffix;
+try {
+conn.createStatement().execute(
+"CREATE TABLE "
++ tableName
++ "( c_customer_sk varchar primary key, 
c_first_name varchar, c_last_name varchar )"
++ (!mutable ? "IMMUTABLE_ROWS=true" : ""));
+String query = "SELECT * FROM " + tableName;
+ResultSet rs = conn.createStatement().executeQuery(query);
+assertFalse(rs.next());
+
+conn.createStatement().execute(
+"CREATE " + (localIndex ? "LOCAL" : "")
++ " INDEX " + indexName + " ON " + tableName + " 
(c_customer_sk || c_first_name asc)");
+query = "SELECT * FROM " + indexName;
+rs = conn.createStatement().executeQuery(query);
+assertFalse(rs.next());
+
+PreparedStatement stmt = conn.prepareStatement("UPSERT INTO " + 
tableName + " VALUES(?,?,?)");
+stmt.setString(1, "1");
+stmt.setString(2, "David");
+stmt.setString(3, "Smith");
+stmt.execute();
+conn.commit();
+
+query = "select c.c_customer_sk from  " + tableName + " c "
++ "left outer join " + tableName + " c2 on c.c_customer_sk 
= c2.c_customer_sk "
++ "where c.c_customer_sk || c.c_first_name = '1David'";
+rs = conn.createStatement().executeQuery("EXPLAIN "+query);
+String explainPlan = QueryUtil.getExplainPlan(rs);
+if (localIndex) {
+   assertEquals("CLIENT PARALLEL 1-WAY RANGE SCAN OVER " + 
tableName + " [1,'1David']\n" + 
+"SERVER FILTER BY FIRST KEY ONLY\n" + 
+

phoenix git commit: PHOENIX-3042 Using functional index expression in where statement for join query fails

2016-07-18 Thread tdsilva
Repository: phoenix
Updated Branches:
  refs/heads/master 6a0afa4fa -> a6f61cb40


PHOENIX-3042 Using functional index expression in where statement for join 
query fails


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

Branch: refs/heads/master
Commit: a6f61cb40c3eb031cd3b8b2192a243709bce37c6
Parents: 6a0afa4
Author: Thomas D'Silva 
Authored: Mon Jul 18 17:06:13 2016 -0700
Committer: Thomas D'Silva 
Committed: Mon Jul 18 17:06:13 2016 -0700

--
 .../end2end/index/IndexExpressionIT.java| 82 
 .../phoenix/compile/IndexStatementRewriter.java | 12 ++-
 .../apache/phoenix/compile/JoinCompiler.java| 17 ++--
 .../apache/phoenix/optimize/QueryOptimizer.java |  2 +-
 .../parse/IndexExpressionParseNodeRewriter.java |  8 +-
 .../phoenix/compile/QueryCompilerTest.java  | 41 +-
 6 files changed, 144 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/a6f61cb4/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexExpressionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexExpressionIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexExpressionIT.java
index 2e55594..21da43a 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexExpressionIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexExpressionIT.java
@@ -1411,5 +1411,87 @@ public class IndexExpressionIT extends 
BaseHBaseManagedTimeIT {
conn.close();
}
}
+   
+   @Test
+public void testImmutableTableGlobalIndexExpressionWithJoin() throws 
Exception {
+helpTestIndexExpressionWithJoin(false, false);
+}
+   
+   @Test
+public void testImmutableTableLocalIndexExpressionWithJoin() throws 
Exception {
+helpTestIndexExpressionWithJoin(false, true);
+}
+   
+   @Test
+public void testMutableTableGlobalIndexExpressionWithJoin() throws 
Exception {
+helpTestIndexExpressionWithJoin(true, false);
+}
+   
+   @Test
+public void testMutableTableLocalIndexExpressionWithJoin() throws 
Exception {
+   helpTestIndexExpressionWithJoin(true, true);
+}
+
+public void helpTestIndexExpressionWithJoin(boolean mutable,
+boolean localIndex) throws Exception {
+Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+Connection conn = DriverManager.getConnection(getUrl(), props);
+String nameSuffix = "T" + (mutable ? "MUTABLE" : "_IMMUTABLE") + 
(localIndex ? "_LOCAL" : "_GLOBAL");
+String tableName = "T" + nameSuffix;
+String indexName = "IDX" + nameSuffix;
+try {
+conn.createStatement().execute(
+"CREATE TABLE "
++ tableName
++ "( c_customer_sk varchar primary key, 
c_first_name varchar, c_last_name varchar )"
++ (!mutable ? "IMMUTABLE_ROWS=true" : ""));
+String query = "SELECT * FROM " + tableName;
+ResultSet rs = conn.createStatement().executeQuery(query);
+assertFalse(rs.next());
+
+conn.createStatement().execute(
+"CREATE " + (localIndex ? "LOCAL" : "")
++ " INDEX " + indexName + " ON " + tableName + " 
(c_customer_sk || c_first_name asc)");
+query = "SELECT * FROM " + indexName;
+rs = conn.createStatement().executeQuery(query);
+assertFalse(rs.next());
+
+PreparedStatement stmt = conn.prepareStatement("UPSERT INTO " + 
tableName + " VALUES(?,?,?)");
+stmt.setString(1, "1");
+stmt.setString(2, "David");
+stmt.setString(3, "Smith");
+stmt.execute();
+conn.commit();
+
+query = "select c.c_customer_sk from  " + tableName + " c "
++ "left outer join " + tableName + " c2 on c.c_customer_sk 
= c2.c_customer_sk "
++ "where c.c_customer_sk || c.c_first_name = '1David'";
+rs = conn.createStatement().executeQuery("EXPLAIN "+query);
+String explainPlan = QueryUtil.getExplainPlan(rs);
+if (localIndex) {
+   assertEquals("CLIENT PARALLEL 1-WAY RANGE SCAN OVER " + 
tableName + " [1,'1David']\n" + 
+"SERVER FILTER BY FIRST KEY ONLY\n" + 
+

phoenix git commit: PHOENIX-3042 Using functional index expression in where statement for join query fails

2016-07-18 Thread tdsilva
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.1 13ee5caa4 -> 1ef00e299


PHOENIX-3042 Using functional index expression in where statement for join 
query fails


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

Branch: refs/heads/4.x-HBase-1.1
Commit: 1ef00e299774cdff7c14bbc7943b03f344ae2e7f
Parents: 13ee5ca
Author: Thomas D'Silva 
Authored: Mon Jul 18 17:05:56 2016 -0700
Committer: Thomas D'Silva 
Committed: Mon Jul 18 17:05:56 2016 -0700

--
 .../end2end/index/IndexExpressionIT.java| 82 
 .../phoenix/compile/IndexStatementRewriter.java | 12 ++-
 .../apache/phoenix/compile/JoinCompiler.java| 17 ++--
 .../apache/phoenix/optimize/QueryOptimizer.java |  2 +-
 .../parse/IndexExpressionParseNodeRewriter.java |  8 +-
 .../phoenix/compile/QueryCompilerTest.java  | 41 +-
 6 files changed, 144 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/1ef00e29/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexExpressionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexExpressionIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexExpressionIT.java
index 2e55594..21da43a 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexExpressionIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexExpressionIT.java
@@ -1411,5 +1411,87 @@ public class IndexExpressionIT extends 
BaseHBaseManagedTimeIT {
conn.close();
}
}
+   
+   @Test
+public void testImmutableTableGlobalIndexExpressionWithJoin() throws 
Exception {
+helpTestIndexExpressionWithJoin(false, false);
+}
+   
+   @Test
+public void testImmutableTableLocalIndexExpressionWithJoin() throws 
Exception {
+helpTestIndexExpressionWithJoin(false, true);
+}
+   
+   @Test
+public void testMutableTableGlobalIndexExpressionWithJoin() throws 
Exception {
+helpTestIndexExpressionWithJoin(true, false);
+}
+   
+   @Test
+public void testMutableTableLocalIndexExpressionWithJoin() throws 
Exception {
+   helpTestIndexExpressionWithJoin(true, true);
+}
+
+public void helpTestIndexExpressionWithJoin(boolean mutable,
+boolean localIndex) throws Exception {
+Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+Connection conn = DriverManager.getConnection(getUrl(), props);
+String nameSuffix = "T" + (mutable ? "MUTABLE" : "_IMMUTABLE") + 
(localIndex ? "_LOCAL" : "_GLOBAL");
+String tableName = "T" + nameSuffix;
+String indexName = "IDX" + nameSuffix;
+try {
+conn.createStatement().execute(
+"CREATE TABLE "
++ tableName
++ "( c_customer_sk varchar primary key, 
c_first_name varchar, c_last_name varchar )"
++ (!mutable ? "IMMUTABLE_ROWS=true" : ""));
+String query = "SELECT * FROM " + tableName;
+ResultSet rs = conn.createStatement().executeQuery(query);
+assertFalse(rs.next());
+
+conn.createStatement().execute(
+"CREATE " + (localIndex ? "LOCAL" : "")
++ " INDEX " + indexName + " ON " + tableName + " 
(c_customer_sk || c_first_name asc)");
+query = "SELECT * FROM " + indexName;
+rs = conn.createStatement().executeQuery(query);
+assertFalse(rs.next());
+
+PreparedStatement stmt = conn.prepareStatement("UPSERT INTO " + 
tableName + " VALUES(?,?,?)");
+stmt.setString(1, "1");
+stmt.setString(2, "David");
+stmt.setString(3, "Smith");
+stmt.execute();
+conn.commit();
+
+query = "select c.c_customer_sk from  " + tableName + " c "
++ "left outer join " + tableName + " c2 on c.c_customer_sk 
= c2.c_customer_sk "
++ "where c.c_customer_sk || c.c_first_name = '1David'";
+rs = conn.createStatement().executeQuery("EXPLAIN "+query);
+String explainPlan = QueryUtil.getExplainPlan(rs);
+if (localIndex) {
+   assertEquals("CLIENT PARALLEL 1-WAY RANGE SCAN OVER " + 
tableName + " [1,'1David']\n" + 
+"SERVER FILTER BY FIRST KEY ONLY\n" + 
+  

Apache-Phoenix | 4.x-HBase-0.98 | Build Successful

2016-07-18 Thread Apache Jenkins Server
4.x-HBase-0.98 branch build status Successful

Source repository https://git-wip-us.apache.org/repos/asf?p=phoenix.git;a=shortlog;h=refs/heads/4.x-HBase-0.98

Compiled Artifacts https://builds.apache.org/job/Phoenix-4.x-HBase-0.98/lastSuccessfulBuild/artifact/

Test Report https://builds.apache.org/job/Phoenix-4.x-HBase-0.98/lastCompletedBuild/testReport/

Changes
[larsh] PHOENIX-3070 Unnecessary use of UUID.randomUUID().



Build times for last couple of runsLatest build time is the right most | Legend blue: normal, red: test failure, gray: timeout


svn commit: r1753327 - in /phoenix/site: publish/ publish/images/using/ source/src/site/markdown/ source/src/site/resources/images/using/

2016-07-18 Thread mujtaba
Author: mujtaba
Date: Mon Jul 18 23:53:39 2016
New Revision: 1753327

URL: http://svn.apache.org/viewvc?rev=1753327=rev
Log:
Add Bloomberg to Who is Using Phoenix page

Added:
phoenix/site/publish/images/using/bb.png   (with props)
phoenix/site/source/src/site/resources/images/using/bb.png   (with props)
Modified:
phoenix/site/publish/images/using/all.png
phoenix/site/publish/who_is_using.html
phoenix/site/source/src/site/markdown/who_is_using.md
phoenix/site/source/src/site/resources/images/using/all.png

Modified: phoenix/site/publish/images/using/all.png
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/images/using/all.png?rev=1753327=1753326=1753327=diff
==
Binary files - no diff available.

Added: phoenix/site/publish/images/using/bb.png
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/images/using/bb.png?rev=1753327=auto
==
Binary file - no diff available.

Propchange: phoenix/site/publish/images/using/bb.png
--
svn:mime-type = application/octet-stream

Modified: phoenix/site/publish/who_is_using.html
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/who_is_using.html?rev=1753327=1753326=1753327=diff
==
--- phoenix/site/publish/who_is_using.html (original)
+++ phoenix/site/publish/who_is_using.html Mon Jul 18 23:53:39 2016
@@ -1,7 +1,7 @@
 
 
 
 
@@ -156,12 +156,15 @@
  


+  At 
Bloomberg, patterns of access to financial datasets are diverse and complex. 
HBase provides the scalability and strong consistency that our use cases 
demand. However, we need more than a key-value store. We need ANSI SQL to 
reduce the barriers to adoption, we need features such as secondary indices to 
support lookups along multiple axes and cursors to handle UI pagination. Apache 
Phoenix provides a rich set of capabilities above HBase that makes it a 
critical piece of our data platform.  Saurabh Agarwal, Bloomberg 
Data Platform 
+   
+   
   At 
eHarmony, Apache Phoenix serves as an SQL abstraction for the HBase storage 
where we maintain details about potential relationship matches identified for 
our users. We store presentation-ready user match feeds in HBase, and serve the 
data to one of the most visited pages on http://www.eharmony.com;>eharmony.com. Apache Phoenix helped us to 
build a query abstraction layer that eased our development process, enabling us 
to to apply various filters and sorting on the aggregated data in the HBase 
store. 
 
  The integration with Apache Phoenix has not only stabilized our 
system, but also reduced response time for loading hundreds of matches on a 
page to below 200ms.
   Vijay Vangapandu, Principal Software Engineer 


-   
+   
   In our 
Force.com platform, we rely on Apache Phoenix to run interactive queries 
against big data residing in HBase leveraging  
  
   multi-tenant tables for customization and scale out across our 
diverse customer schemas 
@@ -172,22 +175,22 @@
  Apache Phoenix is the foundation of our big data stack, 
allowing us to run interactive queries against HBase data in a performant 
manner.
   Steven Tamm, CTO 

-   
+   
   Hortonworks 
supports Apache Phoenix as a feature rich ANSI SQL interface for Apache HBase 
in Hortonworks Data Platform (HDP). It plays a critical role for our customers 
who want diverse choice for data access in Hadoop and want a simple interface 
to build low-latency, large scale applications. Critical features, such as 
secondary indexing have made Phoenix the API of choice for building these HBase 
applications.  Devaraj Das, Cofounder  

-   
+   
   At CertusNet 
we utilize HBase for Gigabytes level data storage and processing per five 
minutes. We found Phoenix most appropriate for easy-to-use sql layer and JDBC 
query support, even more highlighting secondary-indexes support, cause we are 
expecting both query performance and data manipulation load balancing for our 
HBase processing architecture. 
 
  For us, the most valuable feature are index support and query 
convenience for our HBase data processing.
  Fulin Sun, Software Enginneer 

-   
+   
   TEOCO is 
a leading provider of assurance and analytics solutions to communications 
service providers worldwide. At Teoco we use Phoenix to provide fast 
access to customers activity records. The system is required to manage tens of 
billions of records per day. Phoenix allows us easy and rapid 
development using it's SQL interface while maintaining HBase performance and 
throughput. It's saves the need to 

Build failed in Jenkins: Phoenix-4.x-HBase-1.0 #571

2016-07-18 Thread Apache Jenkins Server
See 

Changes:

[larsh] PHOENIX-3070 Unnecessary use of UUID.randomUUID().

--
Started by an SCM change
Started by an SCM change
Started by an SCM change
Started by an SCM change
[EnvInject] - Loading node environment variables.
Building remotely on H10 (docker Ubuntu ubuntu yahoo-not-h2) in workspace 

 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url 
 > https://git-wip-us.apache.org/repos/asf/phoenix.git # timeout=10
Fetching upstream changes from 
https://git-wip-us.apache.org/repos/asf/phoenix.git
 > git --version # timeout=10
 > git -c core.askpass=true fetch --tags --progress 
 > https://git-wip-us.apache.org/repos/asf/phoenix.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse origin/4.x-HBase-1.0^{commit} # timeout=10
Checking out Revision 69782b95841fee8b2014e21e7491dca2576ff886 
(origin/4.x-HBase-1.0)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 69782b95841fee8b2014e21e7491dca2576ff886
 > git rev-list dec4631e8b88a1886f29809ead8c735bde3bf633 # timeout=10
No emails were triggered.
[EnvInject] - Executing scripts and injecting environment variables after the 
SCM step.
[EnvInject] - Injecting as environment variables the properties content 
MAVEN_OPTS=-Xmx3G

[EnvInject] - Variables injected successfully.
[Phoenix-4.x-HBase-1.0] $ /bin/bash -xe /tmp/hudson4968084448554078596.sh
+ echo 'DELETING ~/.m2/repository/org/apache/htrace. See 
https://issues.apache.org/jira/browse/PHOENIX-1802'
DELETING ~/.m2/repository/org/apache/htrace. See 
https://issues.apache.org/jira/browse/PHOENIX-1802
+ echo 'CURRENT CONTENT:'
CURRENT CONTENT:
+ ls /home/jenkins/.m2/repository/org/apache/htrace
htrace
htrace-core
htrace-core4
FATAL: Couldn?t find any executable in /home/jenkins/tools/maven/latest3/
Build step 'Invoke top-level Maven targets' marked build as failure
Archiving artifacts
Compressed 2.01 GB of artifacts by 35.5% relative to #570
Recording test results
ERROR: Step ?Publish JUnit test result report? failed: Test reports were found 
but none of them are new. Did tests run? 
For example, 

 is 7 days 15 hr old




Build failed in Jenkins: Phoenix-4.x-HBase-1.1 #124

2016-07-18 Thread Apache Jenkins Server
See 

Changes:

[larsh] PHOENIX-3070 Unnecessary use of UUID.randomUUID().

--
Started by an SCM change
Started by an SCM change
Started by an SCM change
[EnvInject] - Loading node environment variables.
Building remotely on H10 (docker Ubuntu ubuntu yahoo-not-h2) in workspace 

 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url 
 > https://git-wip-us.apache.org/repos/asf/phoenix.git # timeout=10
Fetching upstream changes from 
https://git-wip-us.apache.org/repos/asf/phoenix.git
 > git --version # timeout=10
 > git -c core.askpass=true fetch --tags --progress 
 > https://git-wip-us.apache.org/repos/asf/phoenix.git 
 > +refs/heads/*:refs/remotes/origin/*
 > git rev-parse origin/4.x-HBase-1.1^{commit} # timeout=10
Checking out Revision 13ee5caa4f4a9d4667f751d8daf0c4131518670f 
(origin/4.x-HBase-1.1)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 13ee5caa4f4a9d4667f751d8daf0c4131518670f
 > git rev-list c71b98ec1a0bd2718a4aee1304fa145189a4213b # timeout=10
No emails were triggered.
[EnvInject] - Executing scripts and injecting environment variables after the 
SCM step.
[EnvInject] - Injecting as environment variables the properties content 
MAVEN_OPTS=-Xmx3G

[EnvInject] - Variables injected successfully.
[Phoenix-4.x-HBase-1.1] $ /bin/bash -xe /tmp/hudson204273066999016291.sh
+ echo 'DELETING ~/.m2/repository/org/apache/htrace. See 
https://issues.apache.org/jira/browse/PHOENIX-1802'
DELETING ~/.m2/repository/org/apache/htrace. See 
https://issues.apache.org/jira/browse/PHOENIX-1802
+ echo 'CURRENT CONTENT:'
CURRENT CONTENT:
+ ls /home/jenkins/.m2/repository/org/apache/htrace
htrace
htrace-core
htrace-core4
FATAL: Couldn?t find any executable in /home/jenkins/tools/maven/latest3/
Build step 'Invoke top-level Maven targets' marked build as failure
Archiving artifacts
Compressed 523.89 MB of artifacts by 11.6% relative to #123
Recording test results
ERROR: Step ?Publish JUnit test result report? failed: Test reports were found 
but none of them are new. Did tests run? 
For example, 

 is 5 days 12 hr old




phoenix git commit: PHOENIX-3070 Unnecessary use of UUID.randomUUID().

2016-07-18 Thread larsh
Repository: phoenix
Updated Branches:
  refs/heads/master e5a8dca90 -> 6a0afa4fa


PHOENIX-3070 Unnecessary use of UUID.randomUUID().


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

Branch: refs/heads/master
Commit: 6a0afa4fa45bce497275eda76fa3c6e663ee9979
Parents: e5a8dca
Author: Lars Hofhansl 
Authored: Mon Jul 18 14:13:21 2016 -0700
Committer: Lars Hofhansl 
Committed: Mon Jul 18 14:15:11 2016 -0700

--
 .../main/java/org/apache/phoenix/iterate/BaseResultIterators.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/6a0afa4f/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
index c2a97b5..d0ade72 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
@@ -43,6 +43,7 @@ import java.util.UUID;
 import java.util.concurrent.ConcurrentLinkedQueue;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
+import java.util.concurrent.ThreadLocalRandom;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 
@@ -365,7 +366,7 @@ public abstract class BaseResultIterators extends 
ExplainTable implements Result
 ? 
context.getConnection().getQueryServices().getTableStats(physicalTableName, 
currentSCN)
 : PTableStats.EMPTY_STATS;
 // Used to tie all the scans together during logging
-scanId = UUID.randomUUID().toString();
+scanId = new UUID(ThreadLocalRandom.current().nextLong(), 
ThreadLocalRandom.current().nextLong()).toString();
 
 initializeScan(plan, perScanLimit, offset, scan);
 



phoenix git commit: PHOENIX-3070 Unnecessary use of UUID.randomUUID().

2016-07-18 Thread larsh
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.1 c71b98ec1 -> 13ee5caa4


PHOENIX-3070 Unnecessary use of UUID.randomUUID().


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

Branch: refs/heads/4.x-HBase-1.1
Commit: 13ee5caa4f4a9d4667f751d8daf0c4131518670f
Parents: c71b98e
Author: Lars Hofhansl 
Authored: Mon Jul 18 14:13:21 2016 -0700
Committer: Lars Hofhansl 
Committed: Mon Jul 18 14:14:19 2016 -0700

--
 .../main/java/org/apache/phoenix/iterate/BaseResultIterators.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/13ee5caa/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
index c2a97b5..d0ade72 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
@@ -43,6 +43,7 @@ import java.util.UUID;
 import java.util.concurrent.ConcurrentLinkedQueue;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
+import java.util.concurrent.ThreadLocalRandom;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 
@@ -365,7 +366,7 @@ public abstract class BaseResultIterators extends 
ExplainTable implements Result
 ? 
context.getConnection().getQueryServices().getTableStats(physicalTableName, 
currentSCN)
 : PTableStats.EMPTY_STATS;
 // Used to tie all the scans together during logging
-scanId = UUID.randomUUID().toString();
+scanId = new UUID(ThreadLocalRandom.current().nextLong(), 
ThreadLocalRandom.current().nextLong()).toString();
 
 initializeScan(plan, perScanLimit, offset, scan);
 



phoenix git commit: PHOENIX-3070 Unnecessary use of UUID.randomUUID().

2016-07-18 Thread larsh
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.0 dec4631e8 -> 69782b958


PHOENIX-3070 Unnecessary use of UUID.randomUUID().


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

Branch: refs/heads/4.x-HBase-1.0
Commit: 69782b95841fee8b2014e21e7491dca2576ff886
Parents: dec4631
Author: Lars Hofhansl 
Authored: Mon Jul 18 14:13:21 2016 -0700
Committer: Lars Hofhansl 
Committed: Mon Jul 18 14:13:58 2016 -0700

--
 .../main/java/org/apache/phoenix/iterate/BaseResultIterators.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/69782b95/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
index c2a97b5..d0ade72 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
@@ -43,6 +43,7 @@ import java.util.UUID;
 import java.util.concurrent.ConcurrentLinkedQueue;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
+import java.util.concurrent.ThreadLocalRandom;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 
@@ -365,7 +366,7 @@ public abstract class BaseResultIterators extends 
ExplainTable implements Result
 ? 
context.getConnection().getQueryServices().getTableStats(physicalTableName, 
currentSCN)
 : PTableStats.EMPTY_STATS;
 // Used to tie all the scans together during logging
-scanId = UUID.randomUUID().toString();
+scanId = new UUID(ThreadLocalRandom.current().nextLong(), 
ThreadLocalRandom.current().nextLong()).toString();
 
 initializeScan(plan, perScanLimit, offset, scan);