Apache-Phoenix | Master | Build Successful

2017-09-13 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
[jtaylor] PHOENIX-4208 Modify tests to not use CurrentSCN

[jtaylor] PHOENIX-4208 Modify tests to not use CurrentSCN



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


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

2017-09-13 Thread Apache Jenkins Server
4.x-HBase-1.2 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-1.2

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

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

Changes
[jtaylor] PHOENIX-4180 Modify tests to generate unique table names and not use

[jtaylor] PHOENIX-4208 Modify tests to not use CurrentSCN

[jtaylor] PHOENIX-4208 Modify tests to not use CurrentSCN



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


Jenkins build is back to normal : Phoenix | Master #1796

2017-09-13 Thread Apache Jenkins Server
See 




Jenkins build is back to normal : Phoenix-4.x-HBase-1.2 #163

2017-09-13 Thread Apache Jenkins Server
See 




phoenix git commit: PHOENIX-4208 Modify tests to not use CurrentSCN

2017-09-13 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.2 4f5dea361 -> a7f36076d


PHOENIX-4208 Modify tests to not use CurrentSCN


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

Branch: refs/heads/4.x-HBase-1.2
Commit: a7f36076d112c1e48fd70a03e89c87dfa8de01fe
Parents: 4f5dea3
Author: James Taylor 
Authored: Wed Sep 13 18:12:54 2017 -0700
Committer: James Taylor 
Committed: Wed Sep 13 18:16:21 2017 -0700

--
 .../phoenix/compile/QueryCompilerTest.java  | 52 +---
 1 file changed, 13 insertions(+), 39 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/a7f36076/phoenix-core/src/test/java/org/apache/phoenix/compile/QueryCompilerTest.java
--
diff --git 
a/phoenix-core/src/test/java/org/apache/phoenix/compile/QueryCompilerTest.java 
b/phoenix-core/src/test/java/org/apache/phoenix/compile/QueryCompilerTest.java
index a45a035..3f09a54 100644
--- 
a/phoenix-core/src/test/java/org/apache/phoenix/compile/QueryCompilerTest.java
+++ 
b/phoenix-core/src/test/java/org/apache/phoenix/compile/QueryCompilerTest.java
@@ -780,11 +780,9 @@ public class QueryCompilerTest extends 
BaseConnectionlessQueryTest {
 
 @Test
 public void testAmbiguousColumn() throws Exception {
-long ts = nextTimestamp();
 String query = "SELECT * from multi_cf G where RESPONSE_TIME = ";
-String url = getUrl() + ";" + PhoenixRuntime.CURRENT_SCN_ATTRIB + "=" 
+ (ts + 5); // Run query at timestamp 5
 Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-Connection conn = DriverManager.getConnection(url, props);
+Connection conn = DriverManager.getConnection(getUrl(), props);
 try {
 PreparedStatement statement = conn.prepareStatement(query);
 statement.executeQuery();
@@ -797,11 +795,9 @@ public class QueryCompilerTest extends 
BaseConnectionlessQueryTest {
 
 @Test
 public void testTableAliasMatchesCFName() throws Exception {
-long ts = nextTimestamp();
 String query = "SELECT F.RESPONSE_TIME,G.RESPONSE_TIME from multi_cf G 
where G.RESPONSE_TIME-1 = F.RESPONSE_TIME";
-String url = getUrl() + ";" + PhoenixRuntime.CURRENT_SCN_ATTRIB + "=" 
+ (ts + 5); // Run query at timestamp 5
 Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-Connection conn = DriverManager.getConnection(url, props);
+Connection conn = DriverManager.getConnection(getUrl(), props);
 try {
 PreparedStatement statement = conn.prepareStatement(query);
 statement.executeQuery();
@@ -814,11 +810,9 @@ public class QueryCompilerTest extends 
BaseConnectionlessQueryTest {
 
 @Test
 public void testCoelesceFunctionTypeMismatch() throws Exception {
-long ts = nextTimestamp();
 String query = "SELECT coalesce(x_integer,'foo') from atable";
-String url = getUrl() + ";" + PhoenixRuntime.CURRENT_SCN_ATTRIB + "=" 
+ (ts + 5); // Run query at timestamp 5
 Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-Connection conn = DriverManager.getConnection(url, props);
+Connection conn = DriverManager.getConnection(getUrl(), props);
 try {
 PreparedStatement statement = conn.prepareStatement(query);
 statement.executeQuery();
@@ -832,11 +826,9 @@ public class QueryCompilerTest extends 
BaseConnectionlessQueryTest {
 
 @Test
 public void testOrderByNotInSelectDistinct() throws Exception {
-long ts = nextTimestamp();
 String query = "SELECT distinct a_string,b_string from atable order by 
x_integer";
-String url = getUrl() + ";" + PhoenixRuntime.CURRENT_SCN_ATTRIB + "=" 
+ (ts + 5); // Run query at timestamp 5
 Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-Connection conn = DriverManager.getConnection(url, props);
+Connection conn = DriverManager.getConnection(getUrl(), props);
 try {
 PreparedStatement statement = conn.prepareStatement(query);
 statement.executeQuery();
@@ -850,11 +842,9 @@ public class QueryCompilerTest extends 
BaseConnectionlessQueryTest {
 
 @Test
 public void testSelectDistinctAndAll() throws Exception {
-long ts = nextTimestamp();
 String query = "SELECT all distinct a_string,b_string from atable 
order by x_integer";
-String url = getUrl() + ";" + PhoenixRuntime.CURRENT_SCN_ATTRIB + "=" 
+ (ts + 5); // Run query at timestamp 5
 

phoenix git commit: PHOENIX-4208 Modify tests to not use CurrentSCN

2017-09-13 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.1 3950439f7 -> fcb2dde54


PHOENIX-4208 Modify tests to not use CurrentSCN


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

Branch: refs/heads/4.x-HBase-1.1
Commit: fcb2dde5456a4596040435ffd09ae35611f6ba72
Parents: 3950439
Author: James Taylor 
Authored: Wed Sep 13 18:12:54 2017 -0700
Committer: James Taylor 
Committed: Wed Sep 13 18:15:03 2017 -0700

--
 .../phoenix/compile/QueryCompilerTest.java  | 52 +---
 1 file changed, 13 insertions(+), 39 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/fcb2dde5/phoenix-core/src/test/java/org/apache/phoenix/compile/QueryCompilerTest.java
--
diff --git 
a/phoenix-core/src/test/java/org/apache/phoenix/compile/QueryCompilerTest.java 
b/phoenix-core/src/test/java/org/apache/phoenix/compile/QueryCompilerTest.java
index a45a035..3f09a54 100644
--- 
a/phoenix-core/src/test/java/org/apache/phoenix/compile/QueryCompilerTest.java
+++ 
b/phoenix-core/src/test/java/org/apache/phoenix/compile/QueryCompilerTest.java
@@ -780,11 +780,9 @@ public class QueryCompilerTest extends 
BaseConnectionlessQueryTest {
 
 @Test
 public void testAmbiguousColumn() throws Exception {
-long ts = nextTimestamp();
 String query = "SELECT * from multi_cf G where RESPONSE_TIME = ";
-String url = getUrl() + ";" + PhoenixRuntime.CURRENT_SCN_ATTRIB + "=" 
+ (ts + 5); // Run query at timestamp 5
 Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-Connection conn = DriverManager.getConnection(url, props);
+Connection conn = DriverManager.getConnection(getUrl(), props);
 try {
 PreparedStatement statement = conn.prepareStatement(query);
 statement.executeQuery();
@@ -797,11 +795,9 @@ public class QueryCompilerTest extends 
BaseConnectionlessQueryTest {
 
 @Test
 public void testTableAliasMatchesCFName() throws Exception {
-long ts = nextTimestamp();
 String query = "SELECT F.RESPONSE_TIME,G.RESPONSE_TIME from multi_cf G 
where G.RESPONSE_TIME-1 = F.RESPONSE_TIME";
-String url = getUrl() + ";" + PhoenixRuntime.CURRENT_SCN_ATTRIB + "=" 
+ (ts + 5); // Run query at timestamp 5
 Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-Connection conn = DriverManager.getConnection(url, props);
+Connection conn = DriverManager.getConnection(getUrl(), props);
 try {
 PreparedStatement statement = conn.prepareStatement(query);
 statement.executeQuery();
@@ -814,11 +810,9 @@ public class QueryCompilerTest extends 
BaseConnectionlessQueryTest {
 
 @Test
 public void testCoelesceFunctionTypeMismatch() throws Exception {
-long ts = nextTimestamp();
 String query = "SELECT coalesce(x_integer,'foo') from atable";
-String url = getUrl() + ";" + PhoenixRuntime.CURRENT_SCN_ATTRIB + "=" 
+ (ts + 5); // Run query at timestamp 5
 Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-Connection conn = DriverManager.getConnection(url, props);
+Connection conn = DriverManager.getConnection(getUrl(), props);
 try {
 PreparedStatement statement = conn.prepareStatement(query);
 statement.executeQuery();
@@ -832,11 +826,9 @@ public class QueryCompilerTest extends 
BaseConnectionlessQueryTest {
 
 @Test
 public void testOrderByNotInSelectDistinct() throws Exception {
-long ts = nextTimestamp();
 String query = "SELECT distinct a_string,b_string from atable order by 
x_integer";
-String url = getUrl() + ";" + PhoenixRuntime.CURRENT_SCN_ATTRIB + "=" 
+ (ts + 5); // Run query at timestamp 5
 Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-Connection conn = DriverManager.getConnection(url, props);
+Connection conn = DriverManager.getConnection(getUrl(), props);
 try {
 PreparedStatement statement = conn.prepareStatement(query);
 statement.executeQuery();
@@ -850,11 +842,9 @@ public class QueryCompilerTest extends 
BaseConnectionlessQueryTest {
 
 @Test
 public void testSelectDistinctAndAll() throws Exception {
-long ts = nextTimestamp();
 String query = "SELECT all distinct a_string,b_string from atable 
order by x_integer";
-String url = getUrl() + ";" + PhoenixRuntime.CURRENT_SCN_ATTRIB + "=" 
+ (ts + 5); // Run query at timestamp 5
 

phoenix git commit: PHOENIX-4208 Modify tests to not use CurrentSCN

2017-09-13 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-0.98 8189557eb -> f5d3987ae


PHOENIX-4208 Modify tests to not use CurrentSCN


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

Branch: refs/heads/4.x-HBase-0.98
Commit: f5d3987ae25d026f837867d3b2c47e5ab09652c5
Parents: 8189557
Author: James Taylor 
Authored: Wed Sep 13 18:12:54 2017 -0700
Committer: James Taylor 
Committed: Wed Sep 13 18:13:50 2017 -0700

--
 .../phoenix/compile/QueryCompilerTest.java  | 52 +---
 1 file changed, 13 insertions(+), 39 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/f5d3987a/phoenix-core/src/test/java/org/apache/phoenix/compile/QueryCompilerTest.java
--
diff --git 
a/phoenix-core/src/test/java/org/apache/phoenix/compile/QueryCompilerTest.java 
b/phoenix-core/src/test/java/org/apache/phoenix/compile/QueryCompilerTest.java
index a45a035..3f09a54 100644
--- 
a/phoenix-core/src/test/java/org/apache/phoenix/compile/QueryCompilerTest.java
+++ 
b/phoenix-core/src/test/java/org/apache/phoenix/compile/QueryCompilerTest.java
@@ -780,11 +780,9 @@ public class QueryCompilerTest extends 
BaseConnectionlessQueryTest {
 
 @Test
 public void testAmbiguousColumn() throws Exception {
-long ts = nextTimestamp();
 String query = "SELECT * from multi_cf G where RESPONSE_TIME = ";
-String url = getUrl() + ";" + PhoenixRuntime.CURRENT_SCN_ATTRIB + "=" 
+ (ts + 5); // Run query at timestamp 5
 Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-Connection conn = DriverManager.getConnection(url, props);
+Connection conn = DriverManager.getConnection(getUrl(), props);
 try {
 PreparedStatement statement = conn.prepareStatement(query);
 statement.executeQuery();
@@ -797,11 +795,9 @@ public class QueryCompilerTest extends 
BaseConnectionlessQueryTest {
 
 @Test
 public void testTableAliasMatchesCFName() throws Exception {
-long ts = nextTimestamp();
 String query = "SELECT F.RESPONSE_TIME,G.RESPONSE_TIME from multi_cf G 
where G.RESPONSE_TIME-1 = F.RESPONSE_TIME";
-String url = getUrl() + ";" + PhoenixRuntime.CURRENT_SCN_ATTRIB + "=" 
+ (ts + 5); // Run query at timestamp 5
 Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-Connection conn = DriverManager.getConnection(url, props);
+Connection conn = DriverManager.getConnection(getUrl(), props);
 try {
 PreparedStatement statement = conn.prepareStatement(query);
 statement.executeQuery();
@@ -814,11 +810,9 @@ public class QueryCompilerTest extends 
BaseConnectionlessQueryTest {
 
 @Test
 public void testCoelesceFunctionTypeMismatch() throws Exception {
-long ts = nextTimestamp();
 String query = "SELECT coalesce(x_integer,'foo') from atable";
-String url = getUrl() + ";" + PhoenixRuntime.CURRENT_SCN_ATTRIB + "=" 
+ (ts + 5); // Run query at timestamp 5
 Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-Connection conn = DriverManager.getConnection(url, props);
+Connection conn = DriverManager.getConnection(getUrl(), props);
 try {
 PreparedStatement statement = conn.prepareStatement(query);
 statement.executeQuery();
@@ -832,11 +826,9 @@ public class QueryCompilerTest extends 
BaseConnectionlessQueryTest {
 
 @Test
 public void testOrderByNotInSelectDistinct() throws Exception {
-long ts = nextTimestamp();
 String query = "SELECT distinct a_string,b_string from atable order by 
x_integer";
-String url = getUrl() + ";" + PhoenixRuntime.CURRENT_SCN_ATTRIB + "=" 
+ (ts + 5); // Run query at timestamp 5
 Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-Connection conn = DriverManager.getConnection(url, props);
+Connection conn = DriverManager.getConnection(getUrl(), props);
 try {
 PreparedStatement statement = conn.prepareStatement(query);
 statement.executeQuery();
@@ -850,11 +842,9 @@ public class QueryCompilerTest extends 
BaseConnectionlessQueryTest {
 
 @Test
 public void testSelectDistinctAndAll() throws Exception {
-long ts = nextTimestamp();
 String query = "SELECT all distinct a_string,b_string from atable 
order by x_integer";
-String url = getUrl() + ";" + PhoenixRuntime.CURRENT_SCN_ATTRIB + "=" 
+ (ts + 5); // Run query at timestamp 5
 

phoenix git commit: PHOENIX-4208 Modify tests to not use CurrentSCN

2017-09-13 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/master 4c2674b1d -> 8ee8f092a


PHOENIX-4208 Modify tests to not use CurrentSCN


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

Branch: refs/heads/master
Commit: 8ee8f092a67ef278bef1656afadb488c6f6f47f9
Parents: 4c2674b
Author: James Taylor 
Authored: Wed Sep 13 18:12:54 2017 -0700
Committer: James Taylor 
Committed: Wed Sep 13 18:12:54 2017 -0700

--
 .../phoenix/compile/QueryCompilerTest.java  | 52 +---
 1 file changed, 13 insertions(+), 39 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/8ee8f092/phoenix-core/src/test/java/org/apache/phoenix/compile/QueryCompilerTest.java
--
diff --git 
a/phoenix-core/src/test/java/org/apache/phoenix/compile/QueryCompilerTest.java 
b/phoenix-core/src/test/java/org/apache/phoenix/compile/QueryCompilerTest.java
index a45a035..3f09a54 100644
--- 
a/phoenix-core/src/test/java/org/apache/phoenix/compile/QueryCompilerTest.java
+++ 
b/phoenix-core/src/test/java/org/apache/phoenix/compile/QueryCompilerTest.java
@@ -780,11 +780,9 @@ public class QueryCompilerTest extends 
BaseConnectionlessQueryTest {
 
 @Test
 public void testAmbiguousColumn() throws Exception {
-long ts = nextTimestamp();
 String query = "SELECT * from multi_cf G where RESPONSE_TIME = ";
-String url = getUrl() + ";" + PhoenixRuntime.CURRENT_SCN_ATTRIB + "=" 
+ (ts + 5); // Run query at timestamp 5
 Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-Connection conn = DriverManager.getConnection(url, props);
+Connection conn = DriverManager.getConnection(getUrl(), props);
 try {
 PreparedStatement statement = conn.prepareStatement(query);
 statement.executeQuery();
@@ -797,11 +795,9 @@ public class QueryCompilerTest extends 
BaseConnectionlessQueryTest {
 
 @Test
 public void testTableAliasMatchesCFName() throws Exception {
-long ts = nextTimestamp();
 String query = "SELECT F.RESPONSE_TIME,G.RESPONSE_TIME from multi_cf G 
where G.RESPONSE_TIME-1 = F.RESPONSE_TIME";
-String url = getUrl() + ";" + PhoenixRuntime.CURRENT_SCN_ATTRIB + "=" 
+ (ts + 5); // Run query at timestamp 5
 Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-Connection conn = DriverManager.getConnection(url, props);
+Connection conn = DriverManager.getConnection(getUrl(), props);
 try {
 PreparedStatement statement = conn.prepareStatement(query);
 statement.executeQuery();
@@ -814,11 +810,9 @@ public class QueryCompilerTest extends 
BaseConnectionlessQueryTest {
 
 @Test
 public void testCoelesceFunctionTypeMismatch() throws Exception {
-long ts = nextTimestamp();
 String query = "SELECT coalesce(x_integer,'foo') from atable";
-String url = getUrl() + ";" + PhoenixRuntime.CURRENT_SCN_ATTRIB + "=" 
+ (ts + 5); // Run query at timestamp 5
 Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-Connection conn = DriverManager.getConnection(url, props);
+Connection conn = DriverManager.getConnection(getUrl(), props);
 try {
 PreparedStatement statement = conn.prepareStatement(query);
 statement.executeQuery();
@@ -832,11 +826,9 @@ public class QueryCompilerTest extends 
BaseConnectionlessQueryTest {
 
 @Test
 public void testOrderByNotInSelectDistinct() throws Exception {
-long ts = nextTimestamp();
 String query = "SELECT distinct a_string,b_string from atable order by 
x_integer";
-String url = getUrl() + ";" + PhoenixRuntime.CURRENT_SCN_ATTRIB + "=" 
+ (ts + 5); // Run query at timestamp 5
 Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-Connection conn = DriverManager.getConnection(url, props);
+Connection conn = DriverManager.getConnection(getUrl(), props);
 try {
 PreparedStatement statement = conn.prepareStatement(query);
 statement.executeQuery();
@@ -850,11 +842,9 @@ public class QueryCompilerTest extends 
BaseConnectionlessQueryTest {
 
 @Test
 public void testSelectDistinctAndAll() throws Exception {
-long ts = nextTimestamp();
 String query = "SELECT all distinct a_string,b_string from atable 
order by x_integer";
-String url = getUrl() + ";" + PhoenixRuntime.CURRENT_SCN_ATTRIB + "=" 
+ (ts + 5); // Run query at timestamp 5
 Properties props = 

phoenix git commit: PHOENIX-4208 Modify tests to not use CurrentSCN

2017-09-13 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.2 f64f2d4fa -> 4f5dea361


PHOENIX-4208 Modify tests to not use CurrentSCN


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

Branch: refs/heads/4.x-HBase-1.2
Commit: 4f5dea3614b3ae24ec6b02884985fc4af9476de4
Parents: f64f2d4
Author: James Taylor 
Authored: Wed Sep 13 17:48:21 2017 -0700
Committer: James Taylor 
Committed: Wed Sep 13 17:53:42 2017 -0700

--
 .../apache/phoenix/end2end/DropSchemaIT.java| 80 +++-
 .../org/apache/phoenix/end2end/GroupByIT.java   | 26 ---
 .../apache/phoenix/end2end/MutableQueryIT.java  |  4 +-
 .../phoenix/end2end/ReadIsolationLevelIT.java   | 46 ++-
 .../end2end/RebuildIndexConnectionPropsIT.java  |  2 -
 .../org/apache/phoenix/end2end/ScanQueryIT.java | 21 +
 .../apache/phoenix/end2end/StoreNullsIT.java|  5 +-
 .../org/apache/phoenix/rpc/UpdateCacheIT.java   | 30 +++-
 .../phoenix/rpc/UpdateCacheWithScnIT.java   | 49 
 9 files changed, 88 insertions(+), 175 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/4f5dea36/phoenix-core/src/it/java/org/apache/phoenix/end2end/DropSchemaIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DropSchemaIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DropSchemaIT.java
index 6a7bd52..5c5420c 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DropSchemaIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DropSchemaIT.java
@@ -33,12 +33,11 @@ import org.apache.hadoop.hbase.NamespaceDescriptor;
 import org.apache.hadoop.hbase.NamespaceNotFoundException;
 import org.apache.hadoop.hbase.client.HBaseAdmin;
 import org.apache.phoenix.exception.SQLExceptionCode;
+import org.apache.phoenix.jdbc.PhoenixConnection;
 import org.apache.phoenix.query.QueryServices;
 import org.apache.phoenix.schema.SchemaNotFoundException;
-import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.ReadOnlyProps;
 import org.apache.phoenix.util.SchemaUtil;
-import org.apache.phoenix.util.TestUtil;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -48,10 +47,13 @@ import org.junit.runners.Parameterized.Parameters;
 import com.google.common.collect.Maps;
 
 @RunWith(Parameterized.class)
-public class DropSchemaIT extends BaseClientManagedTimeIT {
+public class DropSchemaIT extends BaseUniqueNamesOwnClusterIT {
 private String schema;
 
-@Shadower(classBeingShadowed = BaseClientManagedTimeIT.class)
+public DropSchemaIT(String schema) {
+this.schema = schema;
+}
+
 @BeforeClass 
 public static void doSetup() throws Exception {
 Map props = Maps.newHashMapWithExpectedSize(1);
@@ -60,61 +62,39 @@ public class DropSchemaIT extends BaseClientManagedTimeIT {
 // Must update config before starting server
 setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
 }
-
-public DropSchemaIT(String schema) {
-this.schema = schema;
-}
+
 
 @Parameters(name = "DropSchemaIT_schema={0}") // name is used by failsafe 
as file name in reports
 public static Collection data() {
-return Arrays.asList("TEST_SCHEMA", "\"test_schema\"");
+return Arrays.asList(generateUniqueName().toUpperCase(), "\"" + 
generateUniqueName().toLowerCase() + "\"");
 }
 
 @Test
 public void testDropSchema() throws Exception {
-long ts = nextTimestamp();
-
-String tableName = "TEST";
+String tableName = generateUniqueName();
 Properties props = new Properties();
+props.setProperty(QueryServices.IS_NAMESPACE_MAPPING_ENABLED, 
Boolean.toString(true));
 String normalizeSchemaIdentifier = 
SchemaUtil.normalizeIdentifier(schema);
 String ddl = "DROP SCHEMA " + schema;
-props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, 
Long.toString(ts));
-props.setProperty(QueryServices.IS_NAMESPACE_MAPPING_ENABLED, 
Boolean.toString(true));
-try (Connection conn = DriverManager.getConnection(getUrl(), props);) {
+try (Connection conn = DriverManager.getConnection(getUrl(), props);
+ HBaseAdmin admin = 
conn.unwrap(PhoenixConnection.class).getQueryServices().getAdmin()) {
+try {
+conn.createStatement().execute(ddl);
+fail();
+} catch (SchemaNotFoundException e) {
+// expected
+}
   

phoenix git commit: PHOENIX-4208 Modify tests to not use CurrentSCN

2017-09-13 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.1 baff1d713 -> 3950439f7


PHOENIX-4208 Modify tests to not use CurrentSCN


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

Branch: refs/heads/4.x-HBase-1.1
Commit: 3950439f7dd44b8ec9b5425812d4b784dae38cee
Parents: baff1d7
Author: James Taylor 
Authored: Wed Sep 13 17:48:21 2017 -0700
Committer: James Taylor 
Committed: Wed Sep 13 17:52:28 2017 -0700

--
 .../apache/phoenix/end2end/DropSchemaIT.java| 80 +++-
 .../org/apache/phoenix/end2end/GroupByIT.java   | 26 ---
 .../apache/phoenix/end2end/MutableQueryIT.java  |  4 +-
 .../phoenix/end2end/ReadIsolationLevelIT.java   | 46 ++-
 .../end2end/RebuildIndexConnectionPropsIT.java  |  2 -
 .../org/apache/phoenix/end2end/ScanQueryIT.java | 21 +
 .../apache/phoenix/end2end/StoreNullsIT.java|  5 +-
 .../org/apache/phoenix/rpc/UpdateCacheIT.java   | 30 +++-
 .../phoenix/rpc/UpdateCacheWithScnIT.java   | 49 
 9 files changed, 88 insertions(+), 175 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/3950439f/phoenix-core/src/it/java/org/apache/phoenix/end2end/DropSchemaIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DropSchemaIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DropSchemaIT.java
index 6a7bd52..5c5420c 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DropSchemaIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DropSchemaIT.java
@@ -33,12 +33,11 @@ import org.apache.hadoop.hbase.NamespaceDescriptor;
 import org.apache.hadoop.hbase.NamespaceNotFoundException;
 import org.apache.hadoop.hbase.client.HBaseAdmin;
 import org.apache.phoenix.exception.SQLExceptionCode;
+import org.apache.phoenix.jdbc.PhoenixConnection;
 import org.apache.phoenix.query.QueryServices;
 import org.apache.phoenix.schema.SchemaNotFoundException;
-import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.ReadOnlyProps;
 import org.apache.phoenix.util.SchemaUtil;
-import org.apache.phoenix.util.TestUtil;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -48,10 +47,13 @@ import org.junit.runners.Parameterized.Parameters;
 import com.google.common.collect.Maps;
 
 @RunWith(Parameterized.class)
-public class DropSchemaIT extends BaseClientManagedTimeIT {
+public class DropSchemaIT extends BaseUniqueNamesOwnClusterIT {
 private String schema;
 
-@Shadower(classBeingShadowed = BaseClientManagedTimeIT.class)
+public DropSchemaIT(String schema) {
+this.schema = schema;
+}
+
 @BeforeClass 
 public static void doSetup() throws Exception {
 Map props = Maps.newHashMapWithExpectedSize(1);
@@ -60,61 +62,39 @@ public class DropSchemaIT extends BaseClientManagedTimeIT {
 // Must update config before starting server
 setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
 }
-
-public DropSchemaIT(String schema) {
-this.schema = schema;
-}
+
 
 @Parameters(name = "DropSchemaIT_schema={0}") // name is used by failsafe 
as file name in reports
 public static Collection data() {
-return Arrays.asList("TEST_SCHEMA", "\"test_schema\"");
+return Arrays.asList(generateUniqueName().toUpperCase(), "\"" + 
generateUniqueName().toLowerCase() + "\"");
 }
 
 @Test
 public void testDropSchema() throws Exception {
-long ts = nextTimestamp();
-
-String tableName = "TEST";
+String tableName = generateUniqueName();
 Properties props = new Properties();
+props.setProperty(QueryServices.IS_NAMESPACE_MAPPING_ENABLED, 
Boolean.toString(true));
 String normalizeSchemaIdentifier = 
SchemaUtil.normalizeIdentifier(schema);
 String ddl = "DROP SCHEMA " + schema;
-props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, 
Long.toString(ts));
-props.setProperty(QueryServices.IS_NAMESPACE_MAPPING_ENABLED, 
Boolean.toString(true));
-try (Connection conn = DriverManager.getConnection(getUrl(), props);) {
+try (Connection conn = DriverManager.getConnection(getUrl(), props);
+ HBaseAdmin admin = 
conn.unwrap(PhoenixConnection.class).getQueryServices().getAdmin()) {
+try {
+conn.createStatement().execute(ddl);
+fail();
+} catch (SchemaNotFoundException e) {
+// expected
+}
   

phoenix git commit: PHOENIX-4208 Modify tests to not use CurrentSCN

2017-09-13 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-0.98 933a5b1fb -> 8189557eb


PHOENIX-4208 Modify tests to not use CurrentSCN


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

Branch: refs/heads/4.x-HBase-0.98
Commit: 8189557eb5948fc55d92df447301180f80c73be4
Parents: 933a5b1
Author: James Taylor 
Authored: Wed Sep 13 17:48:21 2017 -0700
Committer: James Taylor 
Committed: Wed Sep 13 17:51:09 2017 -0700

--
 .../apache/phoenix/end2end/DropSchemaIT.java| 80 +++-
 .../org/apache/phoenix/end2end/GroupByIT.java   | 26 ---
 .../apache/phoenix/end2end/MutableQueryIT.java  |  4 +-
 .../phoenix/end2end/ReadIsolationLevelIT.java   | 46 ++-
 .../end2end/RebuildIndexConnectionPropsIT.java  |  2 -
 .../org/apache/phoenix/end2end/ScanQueryIT.java | 21 +
 .../apache/phoenix/end2end/StoreNullsIT.java|  5 +-
 .../org/apache/phoenix/rpc/UpdateCacheIT.java   | 30 +++-
 .../phoenix/rpc/UpdateCacheWithScnIT.java   | 49 
 9 files changed, 88 insertions(+), 175 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/8189557e/phoenix-core/src/it/java/org/apache/phoenix/end2end/DropSchemaIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DropSchemaIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DropSchemaIT.java
index 6a7bd52..5c5420c 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DropSchemaIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DropSchemaIT.java
@@ -33,12 +33,11 @@ import org.apache.hadoop.hbase.NamespaceDescriptor;
 import org.apache.hadoop.hbase.NamespaceNotFoundException;
 import org.apache.hadoop.hbase.client.HBaseAdmin;
 import org.apache.phoenix.exception.SQLExceptionCode;
+import org.apache.phoenix.jdbc.PhoenixConnection;
 import org.apache.phoenix.query.QueryServices;
 import org.apache.phoenix.schema.SchemaNotFoundException;
-import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.ReadOnlyProps;
 import org.apache.phoenix.util.SchemaUtil;
-import org.apache.phoenix.util.TestUtil;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -48,10 +47,13 @@ import org.junit.runners.Parameterized.Parameters;
 import com.google.common.collect.Maps;
 
 @RunWith(Parameterized.class)
-public class DropSchemaIT extends BaseClientManagedTimeIT {
+public class DropSchemaIT extends BaseUniqueNamesOwnClusterIT {
 private String schema;
 
-@Shadower(classBeingShadowed = BaseClientManagedTimeIT.class)
+public DropSchemaIT(String schema) {
+this.schema = schema;
+}
+
 @BeforeClass 
 public static void doSetup() throws Exception {
 Map props = Maps.newHashMapWithExpectedSize(1);
@@ -60,61 +62,39 @@ public class DropSchemaIT extends BaseClientManagedTimeIT {
 // Must update config before starting server
 setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
 }
-
-public DropSchemaIT(String schema) {
-this.schema = schema;
-}
+
 
 @Parameters(name = "DropSchemaIT_schema={0}") // name is used by failsafe 
as file name in reports
 public static Collection data() {
-return Arrays.asList("TEST_SCHEMA", "\"test_schema\"");
+return Arrays.asList(generateUniqueName().toUpperCase(), "\"" + 
generateUniqueName().toLowerCase() + "\"");
 }
 
 @Test
 public void testDropSchema() throws Exception {
-long ts = nextTimestamp();
-
-String tableName = "TEST";
+String tableName = generateUniqueName();
 Properties props = new Properties();
+props.setProperty(QueryServices.IS_NAMESPACE_MAPPING_ENABLED, 
Boolean.toString(true));
 String normalizeSchemaIdentifier = 
SchemaUtil.normalizeIdentifier(schema);
 String ddl = "DROP SCHEMA " + schema;
-props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, 
Long.toString(ts));
-props.setProperty(QueryServices.IS_NAMESPACE_MAPPING_ENABLED, 
Boolean.toString(true));
-try (Connection conn = DriverManager.getConnection(getUrl(), props);) {
+try (Connection conn = DriverManager.getConnection(getUrl(), props);
+ HBaseAdmin admin = 
conn.unwrap(PhoenixConnection.class).getQueryServices().getAdmin()) {
+try {
+conn.createStatement().execute(ddl);
+fail();
+} catch (SchemaNotFoundException e) {
+// expected
+}
 

phoenix git commit: PHOENIX-4208 Modify tests to not use CurrentSCN

2017-09-13 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/master 26a7b9e8b -> 4c2674b1d


PHOENIX-4208 Modify tests to not use CurrentSCN


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

Branch: refs/heads/master
Commit: 4c2674b1ddc679d897933fd266273bf8c50db21c
Parents: 26a7b9e
Author: James Taylor 
Authored: Wed Sep 13 17:48:21 2017 -0700
Committer: James Taylor 
Committed: Wed Sep 13 17:48:21 2017 -0700

--
 .../apache/phoenix/end2end/DropSchemaIT.java| 80 +++-
 .../org/apache/phoenix/end2end/GroupByIT.java   | 26 ---
 .../apache/phoenix/end2end/MutableQueryIT.java  |  4 +-
 .../phoenix/end2end/ReadIsolationLevelIT.java   | 46 ++-
 .../end2end/RebuildIndexConnectionPropsIT.java  |  2 -
 .../org/apache/phoenix/end2end/ScanQueryIT.java | 21 +
 .../apache/phoenix/end2end/StoreNullsIT.java|  5 +-
 .../org/apache/phoenix/rpc/UpdateCacheIT.java   | 30 +++-
 .../phoenix/rpc/UpdateCacheWithScnIT.java   | 49 
 9 files changed, 88 insertions(+), 175 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/4c2674b1/phoenix-core/src/it/java/org/apache/phoenix/end2end/DropSchemaIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DropSchemaIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DropSchemaIT.java
index 6a7bd52..5c5420c 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DropSchemaIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DropSchemaIT.java
@@ -33,12 +33,11 @@ import org.apache.hadoop.hbase.NamespaceDescriptor;
 import org.apache.hadoop.hbase.NamespaceNotFoundException;
 import org.apache.hadoop.hbase.client.HBaseAdmin;
 import org.apache.phoenix.exception.SQLExceptionCode;
+import org.apache.phoenix.jdbc.PhoenixConnection;
 import org.apache.phoenix.query.QueryServices;
 import org.apache.phoenix.schema.SchemaNotFoundException;
-import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.ReadOnlyProps;
 import org.apache.phoenix.util.SchemaUtil;
-import org.apache.phoenix.util.TestUtil;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -48,10 +47,13 @@ import org.junit.runners.Parameterized.Parameters;
 import com.google.common.collect.Maps;
 
 @RunWith(Parameterized.class)
-public class DropSchemaIT extends BaseClientManagedTimeIT {
+public class DropSchemaIT extends BaseUniqueNamesOwnClusterIT {
 private String schema;
 
-@Shadower(classBeingShadowed = BaseClientManagedTimeIT.class)
+public DropSchemaIT(String schema) {
+this.schema = schema;
+}
+
 @BeforeClass 
 public static void doSetup() throws Exception {
 Map props = Maps.newHashMapWithExpectedSize(1);
@@ -60,61 +62,39 @@ public class DropSchemaIT extends BaseClientManagedTimeIT {
 // Must update config before starting server
 setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
 }
-
-public DropSchemaIT(String schema) {
-this.schema = schema;
-}
+
 
 @Parameters(name = "DropSchemaIT_schema={0}") // name is used by failsafe 
as file name in reports
 public static Collection data() {
-return Arrays.asList("TEST_SCHEMA", "\"test_schema\"");
+return Arrays.asList(generateUniqueName().toUpperCase(), "\"" + 
generateUniqueName().toLowerCase() + "\"");
 }
 
 @Test
 public void testDropSchema() throws Exception {
-long ts = nextTimestamp();
-
-String tableName = "TEST";
+String tableName = generateUniqueName();
 Properties props = new Properties();
+props.setProperty(QueryServices.IS_NAMESPACE_MAPPING_ENABLED, 
Boolean.toString(true));
 String normalizeSchemaIdentifier = 
SchemaUtil.normalizeIdentifier(schema);
 String ddl = "DROP SCHEMA " + schema;
-props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, 
Long.toString(ts));
-props.setProperty(QueryServices.IS_NAMESPACE_MAPPING_ENABLED, 
Boolean.toString(true));
-try (Connection conn = DriverManager.getConnection(getUrl(), props);) {
+try (Connection conn = DriverManager.getConnection(getUrl(), props);
+ HBaseAdmin admin = 
conn.unwrap(PhoenixConnection.class).getQueryServices().getAdmin()) {
+try {
+conn.createStatement().execute(ddl);
+fail();
+} catch (SchemaNotFoundException e) {
+// expected
+}
 

Build failed in Jenkins: Phoenix | Master #1795

2017-09-13 Thread Apache Jenkins Server
See 

--
[...truncated 108.01 KB...]
[INFO] 
[INFO] --- maven-failsafe-plugin:2.20:integration-test 
(NeedTheirOwnClusterTests) @ phoenix-core ---
[INFO] 
[INFO] ---
[INFO]  T E S T S
[INFO] ---
[INFO] Running 
org.apache.hadoop.hbase.regionserver.wal.WALReplayWithIndexWritesAndCompressedWALIT
[INFO] Running org.apache.phoenix.end2end.ConnectionUtilIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 58.963 s 
- in 
org.apache.hadoop.hbase.regionserver.wal.WALReplayWithIndexWritesAndCompressedWALIT
[INFO] Running 
org.apache.hadoop.hbase.regionserver.wal.WALRecoveryRegionPostOpenIT
[INFO] Running org.apache.phoenix.end2end.CsvBulkLoadToolIT
[INFO] Running org.apache.phoenix.end2end.ArrayIT
[INFO] Running org.apache.phoenix.end2end.CountDistinctCompressionIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 14.728 s 
- in org.apache.hadoop.hbase.regionserver.wal.WALRecoveryRegionPostOpenIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 49.751 s 
- in org.apache.phoenix.end2end.ConnectionUtilIT
[INFO] Running org.apache.phoenix.end2end.ContextClassloaderIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.878 s 
- in org.apache.phoenix.end2end.CountDistinctCompressionIT
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.803 s 
- in org.apache.phoenix.end2end.ContextClassloaderIT
[INFO] Running org.apache.phoenix.end2end.FlappingLocalIndexIT
[INFO] Running org.apache.phoenix.end2end.IndexExtendedIT
[INFO] Running org.apache.phoenix.end2end.IndexScrutinyToolIT
[INFO] Running org.apache.phoenix.end2end.IndexToolForPartialBuildIT
[INFO] Running 
org.apache.phoenix.end2end.IndexToolForPartialBuildWithNamespaceEnabledIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 18.697 s 
- in org.apache.phoenix.end2end.IndexToolForPartialBuildIT
[INFO] Running org.apache.phoenix.end2end.QueryTimeoutIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 35.863 s 
- in org.apache.phoenix.end2end.IndexToolForPartialBuildWithNamespaceEnabledIT
[INFO] Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 142.077 
s - in org.apache.phoenix.end2end.CsvBulkLoadToolIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 16.241 s 
- in org.apache.phoenix.end2end.QueryTimeoutIT
[INFO] Running org.apache.phoenix.end2end.QueryWithLimitIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 14.111 s 
- in org.apache.phoenix.end2end.QueryWithLimitIT
[INFO] Running org.apache.phoenix.end2end.RebuildIndexConnectionPropsIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.743 s 
- in org.apache.phoenix.end2end.RebuildIndexConnectionPropsIT
[INFO] Running org.apache.phoenix.end2end.RegexBulkLoadToolIT
[INFO] Running org.apache.phoenix.end2end.RenewLeaseIT
[INFO] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 157.543 
s - in org.apache.phoenix.end2end.IndexScrutinyToolIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 28.627 s 
- in org.apache.phoenix.end2end.RenewLeaseIT
[INFO] Running org.apache.phoenix.end2end.SystemTablePermissionsIT
[INFO] Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 270.257 
s - in org.apache.phoenix.end2end.FlappingLocalIndexIT
[INFO] Running org.apache.phoenix.end2end.SpillableGroupByIT
[INFO] Running org.apache.phoenix.end2end.StatsCollectorIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 15.626 s 
- in org.apache.phoenix.end2end.SpillableGroupByIT
[INFO] Running 
org.apache.phoenix.end2end.SysTableNamespaceMappedStatsCollectorIT
[INFO] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 114.775 
s - in org.apache.phoenix.end2end.RegexBulkLoadToolIT
[INFO] Running org.apache.phoenix.end2end.TableSnapshotReadsMapReduceIT
[INFO] Running org.apache.phoenix.end2end.UpdateCacheAcrossDifferentClientsIT
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 35.523 s 
- in org.apache.phoenix.end2end.TableSnapshotReadsMapReduceIT
[INFO] Running org.apache.phoenix.end2end.UserDefinedFunctionsIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 181.275 
s - in org.apache.phoenix.end2end.SystemTablePermissionsIT
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 73.043 s 
- in org.apache.phoenix.end2end.UpdateCacheAcrossDifferentClientsIT
[INFO] Running org.apache.phoenix.end2end.index.ImmutableIndexIT
[INFO] Running org.apache.phoenix.end2end.index.LocalIndexIT
[INFO] Running org.apache.phoenix.end2end.index.MutableIndexFailureIT
[INFO] Tests run: 14, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 129.401 
s - in 

[1/4] phoenix git commit: PHOENIX-4180 Modify tests to generate unique table names and not use CURRENT_SCN (Rahul Shrivastava)

2017-09-13 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.2 b47173be3 -> f64f2d4fa


http://git-wip-us.apache.org/repos/asf/phoenix/blob/f64f2d4f/phoenix-core/src/it/java/org/apache/phoenix/end2end/CursorWithRowValueConstructorIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CursorWithRowValueConstructorIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CursorWithRowValueConstructorIT.java
index dda4bd1..e5457d6 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CursorWithRowValueConstructorIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CursorWithRowValueConstructorIT.java
@@ -17,42 +17,56 @@
  */
 package org.apache.phoenix.end2end;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.phoenix.util.*;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import static org.apache.phoenix.util.TestUtil.ENTITYHISTID3;
+import static org.apache.phoenix.util.TestUtil.ENTITYHISTID7;
+import static org.apache.phoenix.util.TestUtil.PARENTID3;
+import static org.apache.phoenix.util.TestUtil.PARENTID7;
+import static org.apache.phoenix.util.TestUtil.ROW1;
+import static org.apache.phoenix.util.TestUtil.ROW2;
+import static org.apache.phoenix.util.TestUtil.ROW3;
+import static org.apache.phoenix.util.TestUtil.ROW4;
+import static org.apache.phoenix.util.TestUtil.ROW7;
+import static org.apache.phoenix.util.TestUtil.ROW8;
+import static org.apache.phoenix.util.TestUtil.ROW9;
+import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 import java.math.BigDecimal;
-import java.sql.*;
+import java.sql.Connection;
+import java.sql.Date;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Timestamp;
 import java.util.Properties;
 import java.util.Random;
 
-import static org.apache.phoenix.util.TestUtil.*;
-import static org.junit.Assert.*;
+import org.apache.phoenix.util.CursorUtil;
+import org.apache.phoenix.util.DateUtil;
+import org.apache.phoenix.util.PropertiesUtil;
+import org.junit.Test;
 
 
 public class CursorWithRowValueConstructorIT extends ParallelStatsDisabledIT {
-private static final String TABLE_NAME = "CursorRVCTestTable";
-protected static final Log LOG = 
LogFactory.getLog(CursorWithRowValueConstructorIT.class);
+private String tableName = generateUniqueName();
 
 public void createAndInitializeTestTable() throws SQLException {
 Connection conn = DriverManager.getConnection(getUrl());
-
-PreparedStatement stmt = conn.prepareStatement("CREATE TABLE IF NOT 
EXISTS " + TABLE_NAME +
+tableName = generateUniqueName();
+PreparedStatement stmt = conn.prepareStatement("CREATE TABLE " + 
tableName +
 "(a_id INTEGER NOT NULL, " +
 "a_data INTEGER, " +
 "CONSTRAINT my_pk PRIMARY KEY (a_id))");
 stmt.execute();
-synchronized (conn){
-conn.commit();
-}
+conn.commit();
 
 //Upsert test values into the test table
 Random rand = new Random();
-stmt = conn.prepareStatement("UPSERT INTO " + TABLE_NAME +
+stmt = conn.prepareStatement("UPSERT INTO " + tableName +
 "(a_id, a_data) VALUES (?,?)");
 int rowCount = 0;
 while(rowCount < 100){
@@ -61,363 +75,340 @@ public class CursorWithRowValueConstructorIT extends 
ParallelStatsDisabledIT {
 stmt.execute();
 ++rowCount;
 }
-synchronized (conn){
-conn.commit();
-}
-}
-
-public void deleteTestTable() throws SQLException {
-Connection conn = DriverManager.getConnection(getUrl());
-PreparedStatement stmt = conn.prepareStatement("DROP TABLE IF EXISTS " 
+ TABLE_NAME);
-stmt.execute();
-synchronized (conn){
-conn.commit();
-}
+conn.commit();
+conn.close();
 }
 
 @Test
 public void testCursorsOnTestTablePK() throws SQLException {
-try{
+String cursorName = generateUniqueName();
+try (Connection conn = DriverManager.getConnection(getUrl())) {
 createAndInitializeTestTable();
-String querySQL = "SELECT a_id FROM " + TABLE_NAME;
+String querySQL = "SELECT a_id FROM " + tableName;
 
 //Test actual cursor implementation
-String cursorSQL = "DECLARE testCursor CURSOR FOR " + querySQL;
-
DriverManager.getConnection(getUrl()).prepareStatement(cursorSQL).execute();
-cursorSQL = "OPEN testCursor";
-

[4/4] phoenix git commit: PHOENIX-4180 Modify tests to generate unique table names and not use CURRENT_SCN (Rahul Shrivastava)

2017-09-13 Thread jamestaylor
PHOENIX-4180 Modify tests to generate unique table names and not use 
CURRENT_SCN (Rahul Shrivastava)


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

Branch: refs/heads/4.x-HBase-1.2
Commit: f64f2d4fae88c60825f83130e1d5e94f76bc78ff
Parents: b47173b
Author: James Taylor 
Authored: Wed Sep 13 15:45:00 2017 -0700
Committer: James Taylor 
Committed: Wed Sep 13 16:12:40 2017 -0700

--
 .../org/apache/phoenix/end2end/ArrayIT.java | 516 +---
 .../end2end/ClientTimeArithmeticQueryIT.java|  26 -
 .../end2end/ColumnProjectionOptimizationIT.java |  31 +-
 .../phoenix/end2end/ConcurrentMutationsIT.java  | 406 ++--
 .../CursorWithRowValueConstructorIT.java| 617 +--
 .../phoenix/end2end/OutOfOrderMutationsIT.java  | 386 
 .../java/org/apache/phoenix/query/BaseTest.java |   4 +
 7 files changed, 799 insertions(+), 1187 deletions(-)
--




[2/4] phoenix git commit: PHOENIX-4180 Modify tests to generate unique table names and not use CURRENT_SCN (Rahul Shrivastava)

2017-09-13 Thread jamestaylor
http://git-wip-us.apache.org/repos/asf/phoenix/blob/f64f2d4f/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
index 52044a8..46dd598 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
@@ -47,7 +47,6 @@ import java.util.Collection;
 import java.util.List;
 import java.util.Properties;
 
-import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.PropertiesUtil;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -616,27 +615,22 @@ public class ClientTimeArithmeticQueryIT extends 
BaseQueryIT {
   ResultSet rs;
   String tName = generateUniqueName();
 
-  long ts = nextTimestamp();
   Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
10));
   conn = DriverManager.getConnection(getUrl(), props);
   conn.createStatement()
   .execute(
   "create table " + tName + " (ts timestamp primary key)");
   conn.close();
 
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
30));
   conn = DriverManager.getConnection(getUrl(), props);
   stmt = conn.prepareStatement("upsert into " + tName + " values (?)");
   stmt.setTimestamp(1, new Timestamp(1995 - 1900, 4, 2, 1, 1, 1, 1));
   stmt.execute();
   conn.commit();
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
60));
   conn = DriverManager.getConnection(getUrl(), props);
   rs = conn.createStatement().executeQuery("SELECT ts FROM " + tName + "");
   assertTrue(rs.next());
   assertEquals("1995-05-02 
01:01:01.1",rs.getTimestamp(1).toString());
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
70));
   conn = DriverManager.getConnection(getUrl(), props);
   rs = conn.createStatement().executeQuery("SELECT ts + 1 FROM " + tName + 
"");
   assertTrue(rs.next());
@@ -649,27 +643,22 @@ public class ClientTimeArithmeticQueryIT extends 
BaseQueryIT {
   PreparedStatement stmt;
   ResultSet rs;
   String tName = generateUniqueName();
-  long ts = nextTimestamp();
   Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
10));
   conn = DriverManager.getConnection(getUrl(), props);
   conn.createStatement()
   .execute(
   "create table " + tName + " (ts timestamp primary key)");
   conn.close();
 
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
30));
   conn = DriverManager.getConnection(getUrl(), props);
   stmt = conn.prepareStatement("upsert into " + tName + " values (?)");
   stmt.setTimestamp(1, new Timestamp(1995 - 1900, 4, 2, 1, 1, 1, 1));
   stmt.execute();
   conn.commit();
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
60));
   conn = DriverManager.getConnection(getUrl(), props);
   rs = conn.createStatement().executeQuery("SELECT ts FROM " + tName);
   assertTrue(rs.next());
   assertEquals("1995-05-02 
01:01:01.1",rs.getTimestamp(1).toString());
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
70));
   conn = DriverManager.getConnection(getUrl(), props);
   rs = conn.createStatement().executeQuery("SELECT ts - 1 FROM " + tName);
   assertTrue(rs.next());
@@ -683,28 +672,23 @@ public class ClientTimeArithmeticQueryIT extends 
BaseQueryIT {
   ResultSet rs;
   String tName = generateUniqueName();
 
-  long ts = nextTimestamp();
   Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
10));
   conn = DriverManager.getConnection(getUrl(), props);
   conn.createStatement()
   .execute(
   "create table " + tName + " (ts time primary key)");
   conn.close();
 
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
30));
   conn = DriverManager.getConnection(getUrl(), props);
   stmt = conn.prepareStatement("upsert into " + tName + " values (?)");
   Time time = new Time(1995 - 1900, 4, 2);
   stmt.setTime(1, time);
   stmt.execute();
   conn.commit();
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
60));
   conn = DriverManager.getConnection(getUrl(), props);
   rs = 

[3/4] phoenix git commit: PHOENIX-4180 Modify tests to generate unique table names and not use CURRENT_SCN (Rahul Shrivastava)

2017-09-13 Thread jamestaylor
http://git-wip-us.apache.org/repos/asf/phoenix/blob/f64f2d4f/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayIT.java
--
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayIT.java
index 550c115..d05a200 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayIT.java
@@ -17,7 +17,6 @@
  */
 package org.apache.phoenix.end2end;
 
-import static org.apache.phoenix.util.PhoenixRuntime.CURRENT_SCN_ATTRIB;
 import static org.apache.phoenix.util.TestUtil.B_VALUE;
 import static org.apache.phoenix.util.TestUtil.ROW1;
 import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
@@ -35,37 +34,21 @@ import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Types;
-import java.util.Map;
 import java.util.Properties;
 
 import org.apache.phoenix.query.BaseTest;
-import org.apache.phoenix.query.QueryServices;
 import org.apache.phoenix.schema.types.PhoenixArray;
-import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.PropertiesUtil;
-import org.apache.phoenix.util.ReadOnlyProps;
 import org.apache.phoenix.util.SchemaUtil;
 import org.apache.phoenix.util.StringUtil;
-import org.junit.BeforeClass;
 import org.junit.Test;
 
-import com.google.common.collect.Maps;
 import com.google.common.primitives.Floats;
 
-public class ArrayIT extends BaseUniqueNamesOwnClusterIT {
+public class ArrayIT extends ParallelStatsDisabledIT {
 
-@BeforeClass
-public static void doSetup() throws Exception {
-Map props = Maps.newHashMapWithExpectedSize(5);
-props.put(QueryServices.STATS_USE_CURRENT_TIME_ATTRIB, 
Boolean.FALSE.toString());
-setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
-}
-
-private static void initTablesWithArrays(String tableName, String 
tenantId, Date date, Long ts, boolean useNull, String url) throws Exception {
+private static void initTablesWithArrays(String tableName, String 
tenantId, Date date, boolean useNull, String url) throws Exception {
 Properties props = new Properties();
-if (ts != null) {
-props.setProperty(CURRENT_SCN_ATTRIB, ts.toString());
-}
 Connection conn = DriverManager.getConnection(url, props);
 try {
 // Insert all rows at ts
@@ -141,15 +124,12 @@ public class ArrayIT extends BaseUniqueNamesOwnClusterIT {
 
@Test
public void testScanByArrayValue() throws Exception {
-   long ts = nextTimestamp();
String tenantId = getOrganizationId();
String tableName = createTableWithArray(getUrl(),
-   getDefaultSplits(tenantId), null, ts - 2);
-   initTablesWithArrays(tableName, tenantId, null, ts, false, 
getUrl());
+   getDefaultSplits(tenantId), null);
+   initTablesWithArrays(tableName, tenantId, null, false, 
getUrl());
String query = "SELECT a_double_array, /* comment ok? */ 
b_string, a_float FROM " + tableName + " WHERE ?=organization_id and ?=a_float";
Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-   props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB,
-   Long.toString(ts + 2)); // Execute at timestamp 2
Connection conn = DriverManager.getConnection(getUrl(), props);
 //TODO: samarth do we need this
analyzeTable(conn, tableName);
@@ -186,15 +166,12 @@ public class ArrayIT extends BaseUniqueNamesOwnClusterIT {
 
@Test
public void testScanWithArrayInWhereClause() throws Exception {
-   long ts = nextTimestamp();
String tenantId = getOrganizationId();
String tableName = createTableWithArray(getUrl(),
-   getDefaultSplits(tenantId), null, ts - 2);
-   initTablesWithArrays(tableName, tenantId, null, ts, false, 
getUrl());
+   getDefaultSplits(tenantId), null);
+   initTablesWithArrays(tableName, tenantId, null, false, 
getUrl());
String query = "SELECT a_double_array, /* comment ok? */ 
b_string, a_float FROM " + tableName + " WHERE ?=organization_id and 
?=a_byte_array";
Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-   props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB,
-   Long.toString(ts + 2)); // Execute at timestamp 
2
Connection conn = DriverManager.getConnection(getUrl(), props);
//TODO: samarth do we need this?
analyzeTable(conn, tableName);
@@ -229,15 +206,12 @@ public class ArrayIT extends 

[4/4] phoenix git commit: PHOENIX-4180 Modify tests to generate unique table names and not use CURRENT_SCN (Rahul Shrivastava)

2017-09-13 Thread jamestaylor
PHOENIX-4180 Modify tests to generate unique table names and not use 
CURRENT_SCN (Rahul Shrivastava)


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

Branch: refs/heads/4.x-HBase-1.1
Commit: baff1d71346517de54d4f12fbd5586a3c80562a3
Parents: 83ad82d
Author: James Taylor 
Authored: Wed Sep 13 15:45:00 2017 -0700
Committer: James Taylor 
Committed: Wed Sep 13 16:11:04 2017 -0700

--
 .../org/apache/phoenix/end2end/ArrayIT.java | 516 +---
 .../end2end/ClientTimeArithmeticQueryIT.java|  26 -
 .../end2end/ColumnProjectionOptimizationIT.java |  31 +-
 .../phoenix/end2end/ConcurrentMutationsIT.java  | 406 ++--
 .../CursorWithRowValueConstructorIT.java| 617 +--
 .../phoenix/end2end/OutOfOrderMutationsIT.java  | 386 
 .../java/org/apache/phoenix/query/BaseTest.java |   4 +
 7 files changed, 799 insertions(+), 1187 deletions(-)
--




[2/4] phoenix git commit: PHOENIX-4180 Modify tests to generate unique table names and not use CURRENT_SCN (Rahul Shrivastava)

2017-09-13 Thread jamestaylor
http://git-wip-us.apache.org/repos/asf/phoenix/blob/baff1d71/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
index 52044a8..46dd598 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
@@ -47,7 +47,6 @@ import java.util.Collection;
 import java.util.List;
 import java.util.Properties;
 
-import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.PropertiesUtil;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -616,27 +615,22 @@ public class ClientTimeArithmeticQueryIT extends 
BaseQueryIT {
   ResultSet rs;
   String tName = generateUniqueName();
 
-  long ts = nextTimestamp();
   Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
10));
   conn = DriverManager.getConnection(getUrl(), props);
   conn.createStatement()
   .execute(
   "create table " + tName + " (ts timestamp primary key)");
   conn.close();
 
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
30));
   conn = DriverManager.getConnection(getUrl(), props);
   stmt = conn.prepareStatement("upsert into " + tName + " values (?)");
   stmt.setTimestamp(1, new Timestamp(1995 - 1900, 4, 2, 1, 1, 1, 1));
   stmt.execute();
   conn.commit();
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
60));
   conn = DriverManager.getConnection(getUrl(), props);
   rs = conn.createStatement().executeQuery("SELECT ts FROM " + tName + "");
   assertTrue(rs.next());
   assertEquals("1995-05-02 
01:01:01.1",rs.getTimestamp(1).toString());
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
70));
   conn = DriverManager.getConnection(getUrl(), props);
   rs = conn.createStatement().executeQuery("SELECT ts + 1 FROM " + tName + 
"");
   assertTrue(rs.next());
@@ -649,27 +643,22 @@ public class ClientTimeArithmeticQueryIT extends 
BaseQueryIT {
   PreparedStatement stmt;
   ResultSet rs;
   String tName = generateUniqueName();
-  long ts = nextTimestamp();
   Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
10));
   conn = DriverManager.getConnection(getUrl(), props);
   conn.createStatement()
   .execute(
   "create table " + tName + " (ts timestamp primary key)");
   conn.close();
 
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
30));
   conn = DriverManager.getConnection(getUrl(), props);
   stmt = conn.prepareStatement("upsert into " + tName + " values (?)");
   stmt.setTimestamp(1, new Timestamp(1995 - 1900, 4, 2, 1, 1, 1, 1));
   stmt.execute();
   conn.commit();
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
60));
   conn = DriverManager.getConnection(getUrl(), props);
   rs = conn.createStatement().executeQuery("SELECT ts FROM " + tName);
   assertTrue(rs.next());
   assertEquals("1995-05-02 
01:01:01.1",rs.getTimestamp(1).toString());
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
70));
   conn = DriverManager.getConnection(getUrl(), props);
   rs = conn.createStatement().executeQuery("SELECT ts - 1 FROM " + tName);
   assertTrue(rs.next());
@@ -683,28 +672,23 @@ public class ClientTimeArithmeticQueryIT extends 
BaseQueryIT {
   ResultSet rs;
   String tName = generateUniqueName();
 
-  long ts = nextTimestamp();
   Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
10));
   conn = DriverManager.getConnection(getUrl(), props);
   conn.createStatement()
   .execute(
   "create table " + tName + " (ts time primary key)");
   conn.close();
 
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
30));
   conn = DriverManager.getConnection(getUrl(), props);
   stmt = conn.prepareStatement("upsert into " + tName + " values (?)");
   Time time = new Time(1995 - 1900, 4, 2);
   stmt.setTime(1, time);
   stmt.execute();
   conn.commit();
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
60));
   conn = DriverManager.getConnection(getUrl(), props);
   rs = 

[1/4] phoenix git commit: PHOENIX-4180 Modify tests to generate unique table names and not use CURRENT_SCN (Rahul Shrivastava)

2017-09-13 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.1 83ad82d7d -> baff1d713


http://git-wip-us.apache.org/repos/asf/phoenix/blob/baff1d71/phoenix-core/src/it/java/org/apache/phoenix/end2end/CursorWithRowValueConstructorIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CursorWithRowValueConstructorIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CursorWithRowValueConstructorIT.java
index dda4bd1..e5457d6 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CursorWithRowValueConstructorIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CursorWithRowValueConstructorIT.java
@@ -17,42 +17,56 @@
  */
 package org.apache.phoenix.end2end;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.phoenix.util.*;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import static org.apache.phoenix.util.TestUtil.ENTITYHISTID3;
+import static org.apache.phoenix.util.TestUtil.ENTITYHISTID7;
+import static org.apache.phoenix.util.TestUtil.PARENTID3;
+import static org.apache.phoenix.util.TestUtil.PARENTID7;
+import static org.apache.phoenix.util.TestUtil.ROW1;
+import static org.apache.phoenix.util.TestUtil.ROW2;
+import static org.apache.phoenix.util.TestUtil.ROW3;
+import static org.apache.phoenix.util.TestUtil.ROW4;
+import static org.apache.phoenix.util.TestUtil.ROW7;
+import static org.apache.phoenix.util.TestUtil.ROW8;
+import static org.apache.phoenix.util.TestUtil.ROW9;
+import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 import java.math.BigDecimal;
-import java.sql.*;
+import java.sql.Connection;
+import java.sql.Date;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Timestamp;
 import java.util.Properties;
 import java.util.Random;
 
-import static org.apache.phoenix.util.TestUtil.*;
-import static org.junit.Assert.*;
+import org.apache.phoenix.util.CursorUtil;
+import org.apache.phoenix.util.DateUtil;
+import org.apache.phoenix.util.PropertiesUtil;
+import org.junit.Test;
 
 
 public class CursorWithRowValueConstructorIT extends ParallelStatsDisabledIT {
-private static final String TABLE_NAME = "CursorRVCTestTable";
-protected static final Log LOG = 
LogFactory.getLog(CursorWithRowValueConstructorIT.class);
+private String tableName = generateUniqueName();
 
 public void createAndInitializeTestTable() throws SQLException {
 Connection conn = DriverManager.getConnection(getUrl());
-
-PreparedStatement stmt = conn.prepareStatement("CREATE TABLE IF NOT 
EXISTS " + TABLE_NAME +
+tableName = generateUniqueName();
+PreparedStatement stmt = conn.prepareStatement("CREATE TABLE " + 
tableName +
 "(a_id INTEGER NOT NULL, " +
 "a_data INTEGER, " +
 "CONSTRAINT my_pk PRIMARY KEY (a_id))");
 stmt.execute();
-synchronized (conn){
-conn.commit();
-}
+conn.commit();
 
 //Upsert test values into the test table
 Random rand = new Random();
-stmt = conn.prepareStatement("UPSERT INTO " + TABLE_NAME +
+stmt = conn.prepareStatement("UPSERT INTO " + tableName +
 "(a_id, a_data) VALUES (?,?)");
 int rowCount = 0;
 while(rowCount < 100){
@@ -61,363 +75,340 @@ public class CursorWithRowValueConstructorIT extends 
ParallelStatsDisabledIT {
 stmt.execute();
 ++rowCount;
 }
-synchronized (conn){
-conn.commit();
-}
-}
-
-public void deleteTestTable() throws SQLException {
-Connection conn = DriverManager.getConnection(getUrl());
-PreparedStatement stmt = conn.prepareStatement("DROP TABLE IF EXISTS " 
+ TABLE_NAME);
-stmt.execute();
-synchronized (conn){
-conn.commit();
-}
+conn.commit();
+conn.close();
 }
 
 @Test
 public void testCursorsOnTestTablePK() throws SQLException {
-try{
+String cursorName = generateUniqueName();
+try (Connection conn = DriverManager.getConnection(getUrl())) {
 createAndInitializeTestTable();
-String querySQL = "SELECT a_id FROM " + TABLE_NAME;
+String querySQL = "SELECT a_id FROM " + tableName;
 
 //Test actual cursor implementation
-String cursorSQL = "DECLARE testCursor CURSOR FOR " + querySQL;
-
DriverManager.getConnection(getUrl()).prepareStatement(cursorSQL).execute();
-cursorSQL = "OPEN testCursor";
-

[3/4] phoenix git commit: PHOENIX-4180 Modify tests to generate unique table names and not use CURRENT_SCN (Rahul Shrivastava)

2017-09-13 Thread jamestaylor
http://git-wip-us.apache.org/repos/asf/phoenix/blob/baff1d71/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayIT.java
--
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayIT.java
index 550c115..d05a200 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayIT.java
@@ -17,7 +17,6 @@
  */
 package org.apache.phoenix.end2end;
 
-import static org.apache.phoenix.util.PhoenixRuntime.CURRENT_SCN_ATTRIB;
 import static org.apache.phoenix.util.TestUtil.B_VALUE;
 import static org.apache.phoenix.util.TestUtil.ROW1;
 import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
@@ -35,37 +34,21 @@ import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Types;
-import java.util.Map;
 import java.util.Properties;
 
 import org.apache.phoenix.query.BaseTest;
-import org.apache.phoenix.query.QueryServices;
 import org.apache.phoenix.schema.types.PhoenixArray;
-import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.PropertiesUtil;
-import org.apache.phoenix.util.ReadOnlyProps;
 import org.apache.phoenix.util.SchemaUtil;
 import org.apache.phoenix.util.StringUtil;
-import org.junit.BeforeClass;
 import org.junit.Test;
 
-import com.google.common.collect.Maps;
 import com.google.common.primitives.Floats;
 
-public class ArrayIT extends BaseUniqueNamesOwnClusterIT {
+public class ArrayIT extends ParallelStatsDisabledIT {
 
-@BeforeClass
-public static void doSetup() throws Exception {
-Map props = Maps.newHashMapWithExpectedSize(5);
-props.put(QueryServices.STATS_USE_CURRENT_TIME_ATTRIB, 
Boolean.FALSE.toString());
-setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
-}
-
-private static void initTablesWithArrays(String tableName, String 
tenantId, Date date, Long ts, boolean useNull, String url) throws Exception {
+private static void initTablesWithArrays(String tableName, String 
tenantId, Date date, boolean useNull, String url) throws Exception {
 Properties props = new Properties();
-if (ts != null) {
-props.setProperty(CURRENT_SCN_ATTRIB, ts.toString());
-}
 Connection conn = DriverManager.getConnection(url, props);
 try {
 // Insert all rows at ts
@@ -141,15 +124,12 @@ public class ArrayIT extends BaseUniqueNamesOwnClusterIT {
 
@Test
public void testScanByArrayValue() throws Exception {
-   long ts = nextTimestamp();
String tenantId = getOrganizationId();
String tableName = createTableWithArray(getUrl(),
-   getDefaultSplits(tenantId), null, ts - 2);
-   initTablesWithArrays(tableName, tenantId, null, ts, false, 
getUrl());
+   getDefaultSplits(tenantId), null);
+   initTablesWithArrays(tableName, tenantId, null, false, 
getUrl());
String query = "SELECT a_double_array, /* comment ok? */ 
b_string, a_float FROM " + tableName + " WHERE ?=organization_id and ?=a_float";
Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-   props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB,
-   Long.toString(ts + 2)); // Execute at timestamp 2
Connection conn = DriverManager.getConnection(getUrl(), props);
 //TODO: samarth do we need this
analyzeTable(conn, tableName);
@@ -186,15 +166,12 @@ public class ArrayIT extends BaseUniqueNamesOwnClusterIT {
 
@Test
public void testScanWithArrayInWhereClause() throws Exception {
-   long ts = nextTimestamp();
String tenantId = getOrganizationId();
String tableName = createTableWithArray(getUrl(),
-   getDefaultSplits(tenantId), null, ts - 2);
-   initTablesWithArrays(tableName, tenantId, null, ts, false, 
getUrl());
+   getDefaultSplits(tenantId), null);
+   initTablesWithArrays(tableName, tenantId, null, false, 
getUrl());
String query = "SELECT a_double_array, /* comment ok? */ 
b_string, a_float FROM " + tableName + " WHERE ?=organization_id and 
?=a_byte_array";
Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-   props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB,
-   Long.toString(ts + 2)); // Execute at timestamp 
2
Connection conn = DriverManager.getConnection(getUrl(), props);
//TODO: samarth do we need this?
analyzeTable(conn, tableName);
@@ -229,15 +206,12 @@ public class ArrayIT extends 

[1/4] phoenix git commit: PHOENIX-4180 Modify tests to generate unique table names and not use CURRENT_SCN (Rahul Shrivastava)

2017-09-13 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-0.98 fe0d0bb3b -> 933a5b1fb


http://git-wip-us.apache.org/repos/asf/phoenix/blob/933a5b1f/phoenix-core/src/it/java/org/apache/phoenix/end2end/CursorWithRowValueConstructorIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CursorWithRowValueConstructorIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CursorWithRowValueConstructorIT.java
index dda4bd1..e5457d6 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CursorWithRowValueConstructorIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CursorWithRowValueConstructorIT.java
@@ -17,42 +17,56 @@
  */
 package org.apache.phoenix.end2end;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.phoenix.util.*;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import static org.apache.phoenix.util.TestUtil.ENTITYHISTID3;
+import static org.apache.phoenix.util.TestUtil.ENTITYHISTID7;
+import static org.apache.phoenix.util.TestUtil.PARENTID3;
+import static org.apache.phoenix.util.TestUtil.PARENTID7;
+import static org.apache.phoenix.util.TestUtil.ROW1;
+import static org.apache.phoenix.util.TestUtil.ROW2;
+import static org.apache.phoenix.util.TestUtil.ROW3;
+import static org.apache.phoenix.util.TestUtil.ROW4;
+import static org.apache.phoenix.util.TestUtil.ROW7;
+import static org.apache.phoenix.util.TestUtil.ROW8;
+import static org.apache.phoenix.util.TestUtil.ROW9;
+import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 import java.math.BigDecimal;
-import java.sql.*;
+import java.sql.Connection;
+import java.sql.Date;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Timestamp;
 import java.util.Properties;
 import java.util.Random;
 
-import static org.apache.phoenix.util.TestUtil.*;
-import static org.junit.Assert.*;
+import org.apache.phoenix.util.CursorUtil;
+import org.apache.phoenix.util.DateUtil;
+import org.apache.phoenix.util.PropertiesUtil;
+import org.junit.Test;
 
 
 public class CursorWithRowValueConstructorIT extends ParallelStatsDisabledIT {
-private static final String TABLE_NAME = "CursorRVCTestTable";
-protected static final Log LOG = 
LogFactory.getLog(CursorWithRowValueConstructorIT.class);
+private String tableName = generateUniqueName();
 
 public void createAndInitializeTestTable() throws SQLException {
 Connection conn = DriverManager.getConnection(getUrl());
-
-PreparedStatement stmt = conn.prepareStatement("CREATE TABLE IF NOT 
EXISTS " + TABLE_NAME +
+tableName = generateUniqueName();
+PreparedStatement stmt = conn.prepareStatement("CREATE TABLE " + 
tableName +
 "(a_id INTEGER NOT NULL, " +
 "a_data INTEGER, " +
 "CONSTRAINT my_pk PRIMARY KEY (a_id))");
 stmt.execute();
-synchronized (conn){
-conn.commit();
-}
+conn.commit();
 
 //Upsert test values into the test table
 Random rand = new Random();
-stmt = conn.prepareStatement("UPSERT INTO " + TABLE_NAME +
+stmt = conn.prepareStatement("UPSERT INTO " + tableName +
 "(a_id, a_data) VALUES (?,?)");
 int rowCount = 0;
 while(rowCount < 100){
@@ -61,363 +75,340 @@ public class CursorWithRowValueConstructorIT extends 
ParallelStatsDisabledIT {
 stmt.execute();
 ++rowCount;
 }
-synchronized (conn){
-conn.commit();
-}
-}
-
-public void deleteTestTable() throws SQLException {
-Connection conn = DriverManager.getConnection(getUrl());
-PreparedStatement stmt = conn.prepareStatement("DROP TABLE IF EXISTS " 
+ TABLE_NAME);
-stmt.execute();
-synchronized (conn){
-conn.commit();
-}
+conn.commit();
+conn.close();
 }
 
 @Test
 public void testCursorsOnTestTablePK() throws SQLException {
-try{
+String cursorName = generateUniqueName();
+try (Connection conn = DriverManager.getConnection(getUrl())) {
 createAndInitializeTestTable();
-String querySQL = "SELECT a_id FROM " + TABLE_NAME;
+String querySQL = "SELECT a_id FROM " + tableName;
 
 //Test actual cursor implementation
-String cursorSQL = "DECLARE testCursor CURSOR FOR " + querySQL;
-
DriverManager.getConnection(getUrl()).prepareStatement(cursorSQL).execute();
-cursorSQL = "OPEN testCursor";
-

[3/4] phoenix git commit: PHOENIX-4180 Modify tests to generate unique table names and not use CURRENT_SCN (Rahul Shrivastava)

2017-09-13 Thread jamestaylor
http://git-wip-us.apache.org/repos/asf/phoenix/blob/933a5b1f/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayIT.java
--
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayIT.java
index 550c115..d05a200 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayIT.java
@@ -17,7 +17,6 @@
  */
 package org.apache.phoenix.end2end;
 
-import static org.apache.phoenix.util.PhoenixRuntime.CURRENT_SCN_ATTRIB;
 import static org.apache.phoenix.util.TestUtil.B_VALUE;
 import static org.apache.phoenix.util.TestUtil.ROW1;
 import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
@@ -35,37 +34,21 @@ import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Types;
-import java.util.Map;
 import java.util.Properties;
 
 import org.apache.phoenix.query.BaseTest;
-import org.apache.phoenix.query.QueryServices;
 import org.apache.phoenix.schema.types.PhoenixArray;
-import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.PropertiesUtil;
-import org.apache.phoenix.util.ReadOnlyProps;
 import org.apache.phoenix.util.SchemaUtil;
 import org.apache.phoenix.util.StringUtil;
-import org.junit.BeforeClass;
 import org.junit.Test;
 
-import com.google.common.collect.Maps;
 import com.google.common.primitives.Floats;
 
-public class ArrayIT extends BaseUniqueNamesOwnClusterIT {
+public class ArrayIT extends ParallelStatsDisabledIT {
 
-@BeforeClass
-public static void doSetup() throws Exception {
-Map props = Maps.newHashMapWithExpectedSize(5);
-props.put(QueryServices.STATS_USE_CURRENT_TIME_ATTRIB, 
Boolean.FALSE.toString());
-setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
-}
-
-private static void initTablesWithArrays(String tableName, String 
tenantId, Date date, Long ts, boolean useNull, String url) throws Exception {
+private static void initTablesWithArrays(String tableName, String 
tenantId, Date date, boolean useNull, String url) throws Exception {
 Properties props = new Properties();
-if (ts != null) {
-props.setProperty(CURRENT_SCN_ATTRIB, ts.toString());
-}
 Connection conn = DriverManager.getConnection(url, props);
 try {
 // Insert all rows at ts
@@ -141,15 +124,12 @@ public class ArrayIT extends BaseUniqueNamesOwnClusterIT {
 
@Test
public void testScanByArrayValue() throws Exception {
-   long ts = nextTimestamp();
String tenantId = getOrganizationId();
String tableName = createTableWithArray(getUrl(),
-   getDefaultSplits(tenantId), null, ts - 2);
-   initTablesWithArrays(tableName, tenantId, null, ts, false, 
getUrl());
+   getDefaultSplits(tenantId), null);
+   initTablesWithArrays(tableName, tenantId, null, false, 
getUrl());
String query = "SELECT a_double_array, /* comment ok? */ 
b_string, a_float FROM " + tableName + " WHERE ?=organization_id and ?=a_float";
Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-   props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB,
-   Long.toString(ts + 2)); // Execute at timestamp 2
Connection conn = DriverManager.getConnection(getUrl(), props);
 //TODO: samarth do we need this
analyzeTable(conn, tableName);
@@ -186,15 +166,12 @@ public class ArrayIT extends BaseUniqueNamesOwnClusterIT {
 
@Test
public void testScanWithArrayInWhereClause() throws Exception {
-   long ts = nextTimestamp();
String tenantId = getOrganizationId();
String tableName = createTableWithArray(getUrl(),
-   getDefaultSplits(tenantId), null, ts - 2);
-   initTablesWithArrays(tableName, tenantId, null, ts, false, 
getUrl());
+   getDefaultSplits(tenantId), null);
+   initTablesWithArrays(tableName, tenantId, null, false, 
getUrl());
String query = "SELECT a_double_array, /* comment ok? */ 
b_string, a_float FROM " + tableName + " WHERE ?=organization_id and 
?=a_byte_array";
Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-   props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB,
-   Long.toString(ts + 2)); // Execute at timestamp 
2
Connection conn = DriverManager.getConnection(getUrl(), props);
//TODO: samarth do we need this?
analyzeTable(conn, tableName);
@@ -229,15 +206,12 @@ public class ArrayIT extends 

[4/4] phoenix git commit: PHOENIX-4180 Modify tests to generate unique table names and not use CURRENT_SCN (Rahul Shrivastava)

2017-09-13 Thread jamestaylor
PHOENIX-4180 Modify tests to generate unique table names and not use 
CURRENT_SCN (Rahul Shrivastava)


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

Branch: refs/heads/4.x-HBase-0.98
Commit: 933a5b1fb398b0c1b3bf81f40961ae245a75ac9b
Parents: fe0d0bb
Author: James Taylor 
Authored: Wed Sep 13 15:45:00 2017 -0700
Committer: James Taylor 
Committed: Wed Sep 13 16:09:33 2017 -0700

--
 .../org/apache/phoenix/end2end/ArrayIT.java | 516 +---
 .../end2end/ClientTimeArithmeticQueryIT.java|  26 -
 .../end2end/ColumnProjectionOptimizationIT.java |  31 +-
 .../phoenix/end2end/ConcurrentMutationsIT.java  | 406 ++--
 .../CursorWithRowValueConstructorIT.java| 617 +--
 .../phoenix/end2end/OutOfOrderMutationsIT.java  | 386 
 .../java/org/apache/phoenix/query/BaseTest.java |   4 +
 7 files changed, 799 insertions(+), 1187 deletions(-)
--




[2/4] phoenix git commit: PHOENIX-4180 Modify tests to generate unique table names and not use CURRENT_SCN (Rahul Shrivastava)

2017-09-13 Thread jamestaylor
http://git-wip-us.apache.org/repos/asf/phoenix/blob/933a5b1f/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
index 52044a8..46dd598 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
@@ -47,7 +47,6 @@ import java.util.Collection;
 import java.util.List;
 import java.util.Properties;
 
-import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.PropertiesUtil;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -616,27 +615,22 @@ public class ClientTimeArithmeticQueryIT extends 
BaseQueryIT {
   ResultSet rs;
   String tName = generateUniqueName();
 
-  long ts = nextTimestamp();
   Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
10));
   conn = DriverManager.getConnection(getUrl(), props);
   conn.createStatement()
   .execute(
   "create table " + tName + " (ts timestamp primary key)");
   conn.close();
 
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
30));
   conn = DriverManager.getConnection(getUrl(), props);
   stmt = conn.prepareStatement("upsert into " + tName + " values (?)");
   stmt.setTimestamp(1, new Timestamp(1995 - 1900, 4, 2, 1, 1, 1, 1));
   stmt.execute();
   conn.commit();
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
60));
   conn = DriverManager.getConnection(getUrl(), props);
   rs = conn.createStatement().executeQuery("SELECT ts FROM " + tName + "");
   assertTrue(rs.next());
   assertEquals("1995-05-02 
01:01:01.1",rs.getTimestamp(1).toString());
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
70));
   conn = DriverManager.getConnection(getUrl(), props);
   rs = conn.createStatement().executeQuery("SELECT ts + 1 FROM " + tName + 
"");
   assertTrue(rs.next());
@@ -649,27 +643,22 @@ public class ClientTimeArithmeticQueryIT extends 
BaseQueryIT {
   PreparedStatement stmt;
   ResultSet rs;
   String tName = generateUniqueName();
-  long ts = nextTimestamp();
   Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
10));
   conn = DriverManager.getConnection(getUrl(), props);
   conn.createStatement()
   .execute(
   "create table " + tName + " (ts timestamp primary key)");
   conn.close();
 
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
30));
   conn = DriverManager.getConnection(getUrl(), props);
   stmt = conn.prepareStatement("upsert into " + tName + " values (?)");
   stmt.setTimestamp(1, new Timestamp(1995 - 1900, 4, 2, 1, 1, 1, 1));
   stmt.execute();
   conn.commit();
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
60));
   conn = DriverManager.getConnection(getUrl(), props);
   rs = conn.createStatement().executeQuery("SELECT ts FROM " + tName);
   assertTrue(rs.next());
   assertEquals("1995-05-02 
01:01:01.1",rs.getTimestamp(1).toString());
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
70));
   conn = DriverManager.getConnection(getUrl(), props);
   rs = conn.createStatement().executeQuery("SELECT ts - 1 FROM " + tName);
   assertTrue(rs.next());
@@ -683,28 +672,23 @@ public class ClientTimeArithmeticQueryIT extends 
BaseQueryIT {
   ResultSet rs;
   String tName = generateUniqueName();
 
-  long ts = nextTimestamp();
   Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
10));
   conn = DriverManager.getConnection(getUrl(), props);
   conn.createStatement()
   .execute(
   "create table " + tName + " (ts time primary key)");
   conn.close();
 
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
30));
   conn = DriverManager.getConnection(getUrl(), props);
   stmt = conn.prepareStatement("upsert into " + tName + " values (?)");
   Time time = new Time(1995 - 1900, 4, 2);
   stmt.setTime(1, time);
   stmt.execute();
   conn.commit();
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
60));
   conn = DriverManager.getConnection(getUrl(), props);
   rs = 

[4/4] phoenix git commit: PHOENIX-4180 Modify tests to generate unique table names and not use CURRENT_SCN (Rahul Shrivastava)

2017-09-13 Thread jamestaylor
PHOENIX-4180 Modify tests to generate unique table names and not use 
CURRENT_SCN (Rahul Shrivastava)


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

Branch: refs/heads/master
Commit: 26a7b9e8b051c270ae8003332ed2ebb4bb91d972
Parents: 41e1371
Author: James Taylor 
Authored: Wed Sep 13 15:45:00 2017 -0700
Committer: James Taylor 
Committed: Wed Sep 13 15:47:21 2017 -0700

--
 .../org/apache/phoenix/end2end/ArrayIT.java | 516 +---
 .../end2end/ClientTimeArithmeticQueryIT.java|  26 -
 .../end2end/ColumnProjectionOptimizationIT.java |  31 +-
 .../phoenix/end2end/ConcurrentMutationsIT.java  | 406 ++--
 .../CursorWithRowValueConstructorIT.java| 617 +--
 .../phoenix/end2end/OutOfOrderMutationsIT.java  | 386 
 .../java/org/apache/phoenix/query/BaseTest.java |   4 +
 7 files changed, 799 insertions(+), 1187 deletions(-)
--




[2/4] phoenix git commit: PHOENIX-4180 Modify tests to generate unique table names and not use CURRENT_SCN (Rahul Shrivastava)

2017-09-13 Thread jamestaylor
http://git-wip-us.apache.org/repos/asf/phoenix/blob/26a7b9e8/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
index 52044a8..46dd598 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ClientTimeArithmeticQueryIT.java
@@ -47,7 +47,6 @@ import java.util.Collection;
 import java.util.List;
 import java.util.Properties;
 
-import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.PropertiesUtil;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -616,27 +615,22 @@ public class ClientTimeArithmeticQueryIT extends 
BaseQueryIT {
   ResultSet rs;
   String tName = generateUniqueName();
 
-  long ts = nextTimestamp();
   Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
10));
   conn = DriverManager.getConnection(getUrl(), props);
   conn.createStatement()
   .execute(
   "create table " + tName + " (ts timestamp primary key)");
   conn.close();
 
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
30));
   conn = DriverManager.getConnection(getUrl(), props);
   stmt = conn.prepareStatement("upsert into " + tName + " values (?)");
   stmt.setTimestamp(1, new Timestamp(1995 - 1900, 4, 2, 1, 1, 1, 1));
   stmt.execute();
   conn.commit();
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
60));
   conn = DriverManager.getConnection(getUrl(), props);
   rs = conn.createStatement().executeQuery("SELECT ts FROM " + tName + "");
   assertTrue(rs.next());
   assertEquals("1995-05-02 
01:01:01.1",rs.getTimestamp(1).toString());
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
70));
   conn = DriverManager.getConnection(getUrl(), props);
   rs = conn.createStatement().executeQuery("SELECT ts + 1 FROM " + tName + 
"");
   assertTrue(rs.next());
@@ -649,27 +643,22 @@ public class ClientTimeArithmeticQueryIT extends 
BaseQueryIT {
   PreparedStatement stmt;
   ResultSet rs;
   String tName = generateUniqueName();
-  long ts = nextTimestamp();
   Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
10));
   conn = DriverManager.getConnection(getUrl(), props);
   conn.createStatement()
   .execute(
   "create table " + tName + " (ts timestamp primary key)");
   conn.close();
 
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
30));
   conn = DriverManager.getConnection(getUrl(), props);
   stmt = conn.prepareStatement("upsert into " + tName + " values (?)");
   stmt.setTimestamp(1, new Timestamp(1995 - 1900, 4, 2, 1, 1, 1, 1));
   stmt.execute();
   conn.commit();
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
60));
   conn = DriverManager.getConnection(getUrl(), props);
   rs = conn.createStatement().executeQuery("SELECT ts FROM " + tName);
   assertTrue(rs.next());
   assertEquals("1995-05-02 
01:01:01.1",rs.getTimestamp(1).toString());
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
70));
   conn = DriverManager.getConnection(getUrl(), props);
   rs = conn.createStatement().executeQuery("SELECT ts - 1 FROM " + tName);
   assertTrue(rs.next());
@@ -683,28 +672,23 @@ public class ClientTimeArithmeticQueryIT extends 
BaseQueryIT {
   ResultSet rs;
   String tName = generateUniqueName();
 
-  long ts = nextTimestamp();
   Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
10));
   conn = DriverManager.getConnection(getUrl(), props);
   conn.createStatement()
   .execute(
   "create table " + tName + " (ts time primary key)");
   conn.close();
 
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
30));
   conn = DriverManager.getConnection(getUrl(), props);
   stmt = conn.prepareStatement("upsert into " + tName + " values (?)");
   Time time = new Time(1995 - 1900, 4, 2);
   stmt.setTime(1, time);
   stmt.execute();
   conn.commit();
-  props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
60));
   conn = DriverManager.getConnection(getUrl(), props);
   rs = 

[3/4] phoenix git commit: PHOENIX-4180 Modify tests to generate unique table names and not use CURRENT_SCN (Rahul Shrivastava)

2017-09-13 Thread jamestaylor
http://git-wip-us.apache.org/repos/asf/phoenix/blob/26a7b9e8/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayIT.java
--
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayIT.java
index 550c115..d05a200 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayIT.java
@@ -17,7 +17,6 @@
  */
 package org.apache.phoenix.end2end;
 
-import static org.apache.phoenix.util.PhoenixRuntime.CURRENT_SCN_ATTRIB;
 import static org.apache.phoenix.util.TestUtil.B_VALUE;
 import static org.apache.phoenix.util.TestUtil.ROW1;
 import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
@@ -35,37 +34,21 @@ import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Types;
-import java.util.Map;
 import java.util.Properties;
 
 import org.apache.phoenix.query.BaseTest;
-import org.apache.phoenix.query.QueryServices;
 import org.apache.phoenix.schema.types.PhoenixArray;
-import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.PropertiesUtil;
-import org.apache.phoenix.util.ReadOnlyProps;
 import org.apache.phoenix.util.SchemaUtil;
 import org.apache.phoenix.util.StringUtil;
-import org.junit.BeforeClass;
 import org.junit.Test;
 
-import com.google.common.collect.Maps;
 import com.google.common.primitives.Floats;
 
-public class ArrayIT extends BaseUniqueNamesOwnClusterIT {
+public class ArrayIT extends ParallelStatsDisabledIT {
 
-@BeforeClass
-public static void doSetup() throws Exception {
-Map props = Maps.newHashMapWithExpectedSize(5);
-props.put(QueryServices.STATS_USE_CURRENT_TIME_ATTRIB, 
Boolean.FALSE.toString());
-setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
-}
-
-private static void initTablesWithArrays(String tableName, String 
tenantId, Date date, Long ts, boolean useNull, String url) throws Exception {
+private static void initTablesWithArrays(String tableName, String 
tenantId, Date date, boolean useNull, String url) throws Exception {
 Properties props = new Properties();
-if (ts != null) {
-props.setProperty(CURRENT_SCN_ATTRIB, ts.toString());
-}
 Connection conn = DriverManager.getConnection(url, props);
 try {
 // Insert all rows at ts
@@ -141,15 +124,12 @@ public class ArrayIT extends BaseUniqueNamesOwnClusterIT {
 
@Test
public void testScanByArrayValue() throws Exception {
-   long ts = nextTimestamp();
String tenantId = getOrganizationId();
String tableName = createTableWithArray(getUrl(),
-   getDefaultSplits(tenantId), null, ts - 2);
-   initTablesWithArrays(tableName, tenantId, null, ts, false, 
getUrl());
+   getDefaultSplits(tenantId), null);
+   initTablesWithArrays(tableName, tenantId, null, false, 
getUrl());
String query = "SELECT a_double_array, /* comment ok? */ 
b_string, a_float FROM " + tableName + " WHERE ?=organization_id and ?=a_float";
Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-   props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB,
-   Long.toString(ts + 2)); // Execute at timestamp 2
Connection conn = DriverManager.getConnection(getUrl(), props);
 //TODO: samarth do we need this
analyzeTable(conn, tableName);
@@ -186,15 +166,12 @@ public class ArrayIT extends BaseUniqueNamesOwnClusterIT {
 
@Test
public void testScanWithArrayInWhereClause() throws Exception {
-   long ts = nextTimestamp();
String tenantId = getOrganizationId();
String tableName = createTableWithArray(getUrl(),
-   getDefaultSplits(tenantId), null, ts - 2);
-   initTablesWithArrays(tableName, tenantId, null, ts, false, 
getUrl());
+   getDefaultSplits(tenantId), null);
+   initTablesWithArrays(tableName, tenantId, null, false, 
getUrl());
String query = "SELECT a_double_array, /* comment ok? */ 
b_string, a_float FROM " + tableName + " WHERE ?=organization_id and 
?=a_byte_array";
Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-   props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB,
-   Long.toString(ts + 2)); // Execute at timestamp 
2
Connection conn = DriverManager.getConnection(getUrl(), props);
//TODO: samarth do we need this?
analyzeTable(conn, tableName);
@@ -229,15 +206,12 @@ public class ArrayIT extends 

phoenix git commit: PHOENIX-4202 Clear client side cache in ConnectionQueryServicesImpl#clearCache()

2017-09-13 Thread samarth
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-0.98 67aa5da88 -> fe0d0bb3b


PHOENIX-4202 Clear client side cache in ConnectionQueryServicesImpl#clearCache()


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

Branch: refs/heads/4.x-HBase-0.98
Commit: fe0d0bb3b729f2d0d10adaf47e2b79ef588b64f0
Parents: 67aa5da
Author: Samarth Jain 
Authored: Wed Sep 13 15:45:19 2017 -0700
Committer: Samarth Jain 
Committed: Wed Sep 13 15:45:19 2017 -0700

--
 .../query/ConnectionQueryServicesImpl.java  | 64 
 1 file changed, 25 insertions(+), 39 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/fe0d0bb3/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index aca0904..81e12af 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -3373,60 +3373,46 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
  */
 @Override
 public long clearCache() throws SQLException {
-try {
-SQLException sqlE = null;
-HTableInterface htable = this.getTable(SchemaUtil
-
.getPhysicalName(PhoenixDatabaseMetaData.SYSTEM_CATALOG_NAME_BYTES, 
this.getProps()).getName());
-try {
-tableStatsCache.invalidateAll();
-final Map results =
-htable.coprocessorService(MetaDataService.class, 
HConstants.EMPTY_START_ROW,
-HConstants.EMPTY_END_ROW, new 
Batch.Call() {
+synchronized (latestMetaDataLock) {
+latestMetaData = newEmptyMetaData();
+}
+tableStatsCache.invalidateAll();
+try (HTableInterface htable =
+this.getTable(
+
SchemaUtil.getPhysicalName(PhoenixDatabaseMetaData.SYSTEM_CATALOG_NAME_BYTES,
+this.getProps()).getName())) {
+final Map results =
+htable.coprocessorService(MetaDataService.class, 
HConstants.EMPTY_START_ROW,
+HConstants.EMPTY_END_ROW, new 
Batch.Call() {
 @Override
 public Long call(MetaDataService instance) throws 
IOException {
 ServerRpcController controller = new 
ServerRpcController();
 BlockingRpcCallback 
rpcCallback =
 new 
BlockingRpcCallback();
 ClearCacheRequest.Builder builder = 
ClearCacheRequest.newBuilder();
-
builder.setClientVersion(VersionUtil.encodeVersion(PHOENIX_MAJOR_VERSION, 
PHOENIX_MINOR_VERSION, PHOENIX_PATCH_NUMBER));
+builder.setClientVersion(
+
VersionUtil.encodeVersion(PHOENIX_MAJOR_VERSION,
+PHOENIX_MINOR_VERSION, 
PHOENIX_PATCH_NUMBER));
 instance.clearCache(controller, 
builder.build(), rpcCallback);
-if(controller.getFailedOn() != null) {
+if (controller.getFailedOn() != null) {
 throw controller.getFailedOn();
 }
 return rpcCallback.get().getUnfreedBytes();
 }
 });
-long unfreedBytes = 0;
-for (Map.Entry result : results.entrySet()) {
-if (result.getValue() != null) {
-unfreedBytes += result.getValue();
-}
-}
-return unfreedBytes;
-} catch (IOException e) {
-throw ServerUtil.parseServerException(e);
-} catch (Throwable e) {
-sqlE = new SQLException(e);
-} finally {
-try {
-tableStatsCache.invalidateAll();
-htable.close();
-} catch (IOException e) {
-if 

phoenix git commit: PHOENIX-4202 Clear client side cache in ConnectionQueryServicesImpl#clearCache()

2017-09-13 Thread samarth
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.1 e46d3d3dc -> 83ad82d7d


PHOENIX-4202 Clear client side cache in ConnectionQueryServicesImpl#clearCache()


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

Branch: refs/heads/4.x-HBase-1.1
Commit: 83ad82d7d38c08e405497a7551bcc90e11ef57b4
Parents: e46d3d3
Author: Samarth Jain 
Authored: Wed Sep 13 15:45:55 2017 -0700
Committer: Samarth Jain 
Committed: Wed Sep 13 15:45:55 2017 -0700

--
 .../query/ConnectionQueryServicesImpl.java  | 64 
 1 file changed, 25 insertions(+), 39 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/83ad82d7/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index 2d8395f..12b2c41 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -3377,60 +3377,46 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
  */
 @Override
 public long clearCache() throws SQLException {
-try {
-SQLException sqlE = null;
-HTableInterface htable = this.getTable(SchemaUtil
-
.getPhysicalName(PhoenixDatabaseMetaData.SYSTEM_CATALOG_NAME_BYTES, 
this.getProps()).getName());
-try {
-tableStatsCache.invalidateAll();
-final Map results =
-htable.coprocessorService(MetaDataService.class, 
HConstants.EMPTY_START_ROW,
-HConstants.EMPTY_END_ROW, new 
Batch.Call() {
+synchronized (latestMetaDataLock) {
+latestMetaData = newEmptyMetaData();
+}
+tableStatsCache.invalidateAll();
+try (HTableInterface htable =
+this.getTable(
+
SchemaUtil.getPhysicalName(PhoenixDatabaseMetaData.SYSTEM_CATALOG_NAME_BYTES,
+this.getProps()).getName())) {
+final Map results =
+htable.coprocessorService(MetaDataService.class, 
HConstants.EMPTY_START_ROW,
+HConstants.EMPTY_END_ROW, new 
Batch.Call() {
 @Override
 public Long call(MetaDataService instance) throws 
IOException {
 ServerRpcController controller = new 
ServerRpcController();
 BlockingRpcCallback 
rpcCallback =
 new 
BlockingRpcCallback();
 ClearCacheRequest.Builder builder = 
ClearCacheRequest.newBuilder();
-
builder.setClientVersion(VersionUtil.encodeVersion(PHOENIX_MAJOR_VERSION, 
PHOENIX_MINOR_VERSION, PHOENIX_PATCH_NUMBER));
+builder.setClientVersion(
+
VersionUtil.encodeVersion(PHOENIX_MAJOR_VERSION,
+PHOENIX_MINOR_VERSION, 
PHOENIX_PATCH_NUMBER));
 instance.clearCache(controller, 
builder.build(), rpcCallback);
-if(controller.getFailedOn() != null) {
+if (controller.getFailedOn() != null) {
 throw controller.getFailedOn();
 }
 return rpcCallback.get().getUnfreedBytes();
 }
 });
-long unfreedBytes = 0;
-for (Map.Entry result : results.entrySet()) {
-if (result.getValue() != null) {
-unfreedBytes += result.getValue();
-}
-}
-return unfreedBytes;
-} catch (IOException e) {
-throw ServerUtil.parseServerException(e);
-} catch (Throwable e) {
-sqlE = new SQLException(e);
-} finally {
-try {
-tableStatsCache.invalidateAll();
-htable.close();
-} catch (IOException e) {
-if 

phoenix git commit: PHOENIX-4202 Clear client side cache in ConnectionQueryServicesImpl#clearCache()

2017-09-13 Thread samarth
Repository: phoenix
Updated Branches:
  refs/heads/master 1407a5ec8 -> 41e137199


PHOENIX-4202 Clear client side cache in ConnectionQueryServicesImpl#clearCache()


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

Branch: refs/heads/master
Commit: 41e137199a9e42c080475c96653be6e9fc451b99
Parents: 1407a5e
Author: Samarth Jain 
Authored: Wed Sep 13 15:44:50 2017 -0700
Committer: Samarth Jain 
Committed: Wed Sep 13 15:44:50 2017 -0700

--
 .../query/ConnectionQueryServicesImpl.java  | 64 
 1 file changed, 25 insertions(+), 39 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/41e13719/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index c853a70..5ba134c 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -3377,60 +3377,46 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
  */
 @Override
 public long clearCache() throws SQLException {
-try {
-SQLException sqlE = null;
-HTableInterface htable = this.getTable(SchemaUtil
-
.getPhysicalName(PhoenixDatabaseMetaData.SYSTEM_CATALOG_NAME_BYTES, 
this.getProps()).getName());
-try {
-tableStatsCache.invalidateAll();
-final Map results =
-htable.coprocessorService(MetaDataService.class, 
HConstants.EMPTY_START_ROW,
-HConstants.EMPTY_END_ROW, new 
Batch.Call() {
+synchronized (latestMetaDataLock) {
+latestMetaData = newEmptyMetaData();
+}
+tableStatsCache.invalidateAll();
+try (HTableInterface htable =
+this.getTable(
+
SchemaUtil.getPhysicalName(PhoenixDatabaseMetaData.SYSTEM_CATALOG_NAME_BYTES,
+this.getProps()).getName())) {
+final Map results =
+htable.coprocessorService(MetaDataService.class, 
HConstants.EMPTY_START_ROW,
+HConstants.EMPTY_END_ROW, new 
Batch.Call() {
 @Override
 public Long call(MetaDataService instance) throws 
IOException {
 ServerRpcController controller = new 
ServerRpcController();
 BlockingRpcCallback 
rpcCallback =
 new 
BlockingRpcCallback();
 ClearCacheRequest.Builder builder = 
ClearCacheRequest.newBuilder();
-
builder.setClientVersion(VersionUtil.encodeVersion(PHOENIX_MAJOR_VERSION, 
PHOENIX_MINOR_VERSION, PHOENIX_PATCH_NUMBER));
+builder.setClientVersion(
+
VersionUtil.encodeVersion(PHOENIX_MAJOR_VERSION,
+PHOENIX_MINOR_VERSION, 
PHOENIX_PATCH_NUMBER));
 instance.clearCache(controller, 
builder.build(), rpcCallback);
-if(controller.getFailedOn() != null) {
+if (controller.getFailedOn() != null) {
 throw controller.getFailedOn();
 }
 return rpcCallback.get().getUnfreedBytes();
 }
 });
-long unfreedBytes = 0;
-for (Map.Entry result : results.entrySet()) {
-if (result.getValue() != null) {
-unfreedBytes += result.getValue();
-}
-}
-return unfreedBytes;
-} catch (IOException e) {
-throw ServerUtil.parseServerException(e);
-} catch (Throwable e) {
-sqlE = new SQLException(e);
-} finally {
-try {
-tableStatsCache.invalidateAll();
-htable.close();
-} catch (IOException e) {
-if (sqlE == null) {
- 

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

2017-09-13 Thread Apache Jenkins Server
4.x-HBase-1.1 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-1.1

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

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

Changes
[mujtaba] PHOENIX-4194 Modify RoundFloorCeilFuncIT, RowValueConstructorIT,



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


Build failed in Jenkins: Phoenix | Master #1794

2017-09-13 Thread Apache Jenkins Server
See 


Changes:

[mujtaba] PHOENIX-4194 Modify RoundFloorCeilFuncIT, RowValueConstructorIT,

--
[...truncated 120.24 KB...]
[INFO] Tests run: 17, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 87.396 
s - in org.apache.phoenix.end2end.UnionAllIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 11.06 s 
- in org.apache.phoenix.end2end.index.ChildViewsUseParentViewIndexIT
[INFO] Running org.apache.phoenix.end2end.index.AsyncIndexDisabledIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.826 s 
- in org.apache.phoenix.end2end.index.AsyncIndexDisabledIT
[INFO] Running org.apache.phoenix.end2end.index.GlobalIndexOptimizationIT
[INFO] Running org.apache.phoenix.end2end.index.DropMetadataIT
[INFO] Running org.apache.phoenix.end2end.index.DropColumnIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 9.367 s 
- in org.apache.phoenix.end2end.index.DropMetadataIT
[INFO] Running org.apache.phoenix.end2end.index.IndexExpressionIT
[INFO] Tests run: 245, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
1,890.594 s - in org.apache.phoenix.end2end.ClientTimeArithmeticQueryIT
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 41.315 s 
- in org.apache.phoenix.end2end.index.GlobalIndexOptimizationIT
[INFO] Running org.apache.phoenix.end2end.index.IndexMetadataIT
[INFO] Tests run: 24, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 130.754 
s - in org.apache.phoenix.end2end.UpsertSelectIT
[INFO] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 45.031 
s - in org.apache.phoenix.end2end.index.IndexMetadataIT
[INFO] Running org.apache.phoenix.end2end.index.MutableIndexIT
[INFO] Running org.apache.phoenix.end2end.index.IndexIT
[INFO] Running org.apache.phoenix.end2end.index.MutableIndexSplitForwardScanIT
[INFO] Tests run: 112, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
761.879 s - in org.apache.phoenix.end2end.ScanQueryIT
[INFO] Running org.apache.phoenix.end2end.index.MutableIndexSplitReverseScanIT
[INFO] Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 246.928 
s - in org.apache.phoenix.end2end.UpgradeIT
[INFO] Running org.apache.phoenix.end2end.index.SaltedIndexIT
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 14.12 s 
- in org.apache.phoenix.end2end.index.SaltedIndexIT
[INFO] Running org.apache.phoenix.end2end.index.ViewIndexIT
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 51.788 s 
- in org.apache.phoenix.end2end.index.ViewIndexIT
[INFO] Running org.apache.phoenix.end2end.index.txn.MutableRollbackIT
[INFO] Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 321.791 
s - in org.apache.phoenix.end2end.index.DropColumnIT
[INFO] Running org.apache.phoenix.end2end.index.txn.RollbackIT
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 67.316 s 
- in org.apache.phoenix.end2end.index.txn.MutableRollbackIT
[INFO] Running org.apache.phoenix.end2end.salted.SaltedTableIT
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 14.571 s 
- in org.apache.phoenix.end2end.salted.SaltedTableIT
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 49.507 s 
- in org.apache.phoenix.end2end.index.txn.RollbackIT
[INFO] Running org.apache.phoenix.end2end.salted.SaltedTableVarLengthRowKeyIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.373 s 
- in org.apache.phoenix.end2end.salted.SaltedTableVarLengthRowKeyIT
[INFO] Running org.apache.phoenix.iterate.PhoenixQueryTimeoutIT
[INFO] Running org.apache.phoenix.end2end.salted.SaltedTableUpsertSelectIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.441 s 
- in org.apache.phoenix.iterate.PhoenixQueryTimeoutIT
[INFO] Running org.apache.phoenix.iterate.RoundRobinResultIteratorIT
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 30.779 s 
- in org.apache.phoenix.end2end.salted.SaltedTableUpsertSelectIT
[INFO] Running org.apache.phoenix.replication.SystemCatalogWALEntryFilterIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.12 s - 
in org.apache.phoenix.replication.SystemCatalogWALEntryFilterIT
[INFO] Running org.apache.phoenix.rpc.UpdateCacheIT
[INFO] Tests run: 67, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 443.997 
s - in org.apache.phoenix.end2end.index.IndexExpressionIT
[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 24.718 s 
- in org.apache.phoenix.rpc.UpdateCacheIT
[INFO] Running org.apache.phoenix.trace.PhoenixTracingEndToEndIT
[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 54.193 s 
- in org.apache.phoenix.iterate.RoundRobinResultIteratorIT
[INFO] Running org.apache.phoenix.tx.FlappingTransactionIT
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.996 s 
- in 

Build failed in Jenkins: Phoenix-4.x-HBase-1.2 #162

2017-09-13 Thread Apache Jenkins Server
See 


Changes:

[mujtaba] PHOENIX-4194 Modify RoundFloorCeilFuncIT, RowValueConstructorIT,

--
[...truncated 55.73 KB...]
[INFO] Running org.apache.phoenix.memory.MemoryManagerTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.909 s 
- in org.apache.phoenix.schema.RowKeyValueAccessorTest
[INFO] Running org.apache.phoenix.index.IndexMaintainerTest
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.127 s 
- in org.apache.phoenix.schema.stats.StatisticsScannerTest
[INFO] Tests run: 36, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.761 s 
- in org.apache.phoenix.schema.types.PDataTypeTest
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.556 s 
- in org.apache.phoenix.schema.ImmutableStorageSchemeTest
[INFO] Running org.apache.phoenix.index.automated.MRJobSubmitterTest
[INFO] Running org.apache.phoenix.expression.ArrayPrependFunctionTest
[INFO] Running org.apache.phoenix.expression.LikeExpressionTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.265 s 
- in org.apache.phoenix.schema.MutationTest
[INFO] Running org.apache.phoenix.expression.ArithmeticOperationTest
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.098 s 
- in org.apache.phoenix.expression.ArithmeticOperationTest
[INFO] Running org.apache.phoenix.expression.ArrayConcatFunctionTest
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.511 s 
- in org.apache.phoenix.expression.LikeExpressionTest
[INFO] Running org.apache.phoenix.expression.ExpFunctionTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 s 
- in org.apache.phoenix.expression.ExpFunctionTest
[INFO] Running org.apache.phoenix.expression.DeterminismTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 s 
- in org.apache.phoenix.expression.DeterminismTest
[INFO] Running org.apache.phoenix.expression.GetSetByteBitFunctionTest
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.688 s 
- in org.apache.phoenix.index.automated.MRJobSubmitterTest
[INFO] Running org.apache.phoenix.expression.util.regex.PatternPerformanceTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 s 
- in org.apache.phoenix.expression.util.regex.PatternPerformanceTest
[INFO] Running org.apache.phoenix.expression.ArrayAppendFunctionTest
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.591 s 
- in org.apache.phoenix.memory.MemoryManagerTest
[INFO] Running org.apache.phoenix.expression.RegexpSplitFunctionTest
[INFO] Tests run: 37, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.987 s 
- in org.apache.phoenix.expression.ArrayPrependFunctionTest
[INFO] Running org.apache.phoenix.expression.ILikeExpressionTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.692 s 
- in org.apache.phoenix.expression.RegexpSplitFunctionTest
[INFO] Running org.apache.phoenix.expression.SignFunctionTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.562 s 
- in org.apache.phoenix.expression.ILikeExpressionTest
[INFO] Running org.apache.phoenix.expression.NullValueTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.096 s 
- in org.apache.phoenix.expression.SignFunctionTest
[INFO] Running org.apache.phoenix.expression.ArrayToStringFunctionTest
[INFO] Tests run: 24, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.132 s 
- in org.apache.phoenix.expression.ArrayToStringFunctionTest
[INFO] Running org.apache.phoenix.expression.RoundFloorCeilExpressionsTest
[INFO] Tests run: 158, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 21.537 
s - in org.apache.phoenix.compile.QueryCompilerTest
[INFO] Running org.apache.phoenix.expression.RegexpSubstrFunctionTest
[INFO] Tests run: 25, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.332 s 
- in org.apache.phoenix.expression.ArrayAppendFunctionTest
[INFO] Running org.apache.phoenix.expression.OctetLengthFunctionTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.134 s 
- in org.apache.phoenix.expression.OctetLengthFunctionTest
[INFO] Running org.apache.phoenix.expression.CoerceExpressionTest
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.028 s 
- in org.apache.phoenix.expression.CoerceExpressionTest
[INFO] Running org.apache.phoenix.expression.SortOrderExpressionTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.54 s - 
in org.apache.phoenix.expression.RegexpSubstrFunctionTest
[INFO] Running org.apache.phoenix.expression.ArrayConstructorExpressionTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 s 
- in org.apache.phoenix.expression.ArrayConstructorExpressionTest
[INFO] Running 

[1/2] phoenix git commit: PHOENIX-4194 Modify RoundFloorCeilFuncIT, RowValueConstructorIT, SaltedTableIT, TenantIdTypeIT, StoreNullsIT and RebuildIndexConnectionPropsIT to not use CurrentSCN

2017-09-13 Thread mujtaba
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.1 2352f819e -> e46d3d3dc


http://git-wip-us.apache.org/repos/asf/phoenix/blob/e46d3d3d/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
--
diff --git a/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java 
b/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
index 6151271..74dfd1a 100644
--- a/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
+++ b/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
@@ -1250,27 +1250,31 @@ public abstract class BaseTest {
 }
 
 
-protected static void initEntityHistoryTableValues(String tenantId, 
byte[][] splits, Date date, Long ts) throws Exception {
-initEntityHistoryTableValues(tenantId, splits, date, ts, getUrl());
+protected static String initEntityHistoryTableValues(String tenantId, 
byte[][] splits, Date date, Long ts) throws Exception {
+return initEntityHistoryTableValues(ENTITY_HISTORY_TABLE_NAME, 
tenantId, splits, date, ts, getUrl());
 }
 
-protected static void initSaltedEntityHistoryTableValues(String tenantId, 
byte[][] splits, Date date, Long ts) throws Exception {
-initSaltedEntityHistoryTableValues(tenantId, splits, date, ts, 
getUrl());
-}
-
-protected static void initEntityHistoryTableValues(String tenantId, 
byte[][] splits, String url) throws Exception {
-initEntityHistoryTableValues(tenantId, splits, null, null, url);
+protected static String initEntityHistoryTableValues(String tableName, 
String tenantId, byte[][] splits, Date date, Long ts) throws Exception {
+return initEntityHistoryTableValues(tableName, tenantId, splits, date, 
ts, getUrl());
 }
 
-protected static void initEntityHistoryTableValues(String tenantId, 
byte[][] splits, Date date, String url) throws Exception {
-initEntityHistoryTableValues(tenantId, splits, date, null, url);
+protected static String initSaltedEntityHistoryTableValues(String 
tableName, String tenantId, byte[][] splits, Date date, Long ts) throws 
Exception {
+return initSaltedEntityHistoryTableValues(tableName, tenantId, splits, 
date, ts, getUrl());
+}
+
+protected static String initEntityHistoryTableValues(String tableName, 
String tenantId, byte[][] splits, String url) throws Exception {
+return initEntityHistoryTableValues(tableName, tenantId, splits, null, 
null, url);
 }
 
-private static void initEntityHistoryTableValues(String tenantId, byte[][] 
splits, Date date, Long ts, String url) throws Exception {
+private static String initEntityHistoryTableValues(String tableName, 
String tenantId, byte[][] splits, Date date, Long ts, String url) throws 
Exception {
+   if (tableName == null) {
+   tableName = generateUniqueName();
+   }
+   
 if (ts == null) {
-ensureTableCreated(url, ENTITY_HISTORY_TABLE_NAME, 
ENTITY_HISTORY_TABLE_NAME, splits, null);
+ensureTableCreated(url, tableName, ENTITY_HISTORY_TABLE_NAME, 
splits, null);
 } else {
-ensureTableCreated(url, ENTITY_HISTORY_TABLE_NAME, 
ENTITY_HISTORY_TABLE_NAME, splits, ts-2, null);
+ensureTableCreated(url, tableName, ENTITY_HISTORY_TABLE_NAME, 
splits, ts-2, null);
 }
 
 Properties props = new Properties();
@@ -1282,7 +1286,7 @@ public abstract class BaseTest {
 // Insert all rows at ts
 PreparedStatement stmt = conn.prepareStatement(
 "upsert into " +
-ENTITY_HISTORY_TABLE_NAME+
+tableName +
 "(" +
 "ORGANIZATION_ID, " +
 "PARENT_ID, " +
@@ -1368,13 +1372,19 @@ public abstract class BaseTest {
 } finally {
 conn.close();
 }
+
+return tableName;
 }
 
-protected static void initSaltedEntityHistoryTableValues(String tenantId, 
byte[][] splits, Date date, Long ts, String url) throws Exception {
+protected static String initSaltedEntityHistoryTableValues(String 
tableName, String tenantId, byte[][] splits, Date date, Long ts, String url) 
throws Exception {
+   if (tableName == null) {
+   tableName = generateUniqueName();
+   }
+   
 if (ts == null) {
-ensureTableCreated(url, ENTITY_HISTORY_SALTED_TABLE_NAME, 
ENTITY_HISTORY_SALTED_TABLE_NAME, splits, null);
+ensureTableCreated(url, tableName, 
ENTITY_HISTORY_SALTED_TABLE_NAME, splits, null);
 } else {
-ensureTableCreated(url, ENTITY_HISTORY_SALTED_TABLE_NAME, 
ENTITY_HISTORY_SALTED_TABLE_NAME, splits, ts-2, null);
+ensureTableCreated(url, tableName, 
ENTITY_HISTORY_SALTED_TABLE_NAME, splits, ts-2, null);
 }
 
 Properties props 

[2/2] phoenix git commit: PHOENIX-4194 Modify RoundFloorCeilFuncIT, RowValueConstructorIT, SaltedTableIT, TenantIdTypeIT, StoreNullsIT and RebuildIndexConnectionPropsIT to not use CurrentSCN

2017-09-13 Thread mujtaba
PHOENIX-4194 Modify RoundFloorCeilFuncIT, RowValueConstructorIT, SaltedTableIT, 
TenantIdTypeIT, StoreNullsIT and RebuildIndexConnectionPropsIT to not use 
CurrentSCN


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

Branch: refs/heads/4.x-HBase-1.1
Commit: e46d3d3dc0fc5b07c9aca6629a7839ba7beb1719
Parents: 2352f81
Author: Mujtaba 
Authored: Wed Sep 13 10:56:41 2017 -0700
Committer: Mujtaba 
Committed: Wed Sep 13 10:56:41 2017 -0700

--
 .../phoenix/end2end/RoundFloorCeilFuncIT.java   |  21 +-
 .../phoenix/end2end/RowValueConstructorIT.java  | 365 ---
 .../apache/phoenix/end2end/StoreNullsIT.java|  27 +-
 .../apache/phoenix/end2end/TenantIdTypeIT.java  |   6 +-
 .../phoenix/end2end/salted/SaltedTableIT.java   | 101 +++--
 .../java/org/apache/phoenix/query/BaseTest.java |  48 ++-
 6 files changed, 242 insertions(+), 326 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/e46d3d3d/phoenix-core/src/it/java/org/apache/phoenix/end2end/RoundFloorCeilFuncIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/RoundFloorCeilFuncIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/RoundFloorCeilFuncIT.java
index 423876f..b1e218b 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/RoundFloorCeilFuncIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/RoundFloorCeilFuncIT.java
@@ -59,7 +59,6 @@ public class RoundFloorCeilFuncIT extends 
ParallelStatsDisabledIT {
 private static final double unsignedDoubleUpserted = 1.264d;
 private static final float floatUpserted = 1.264f;
 private static final float unsignedFloatUpserted = 1.264f;
-
 private String tableName;
 
 @Before
@@ -647,33 +646,23 @@ public class RoundFloorCeilFuncIT extends 
ParallelStatsDisabledIT {
 
   @Test
   public void testRoundOffFunction() throws SQLException {
-long ts = nextTimestamp();
 Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
10));
 Connection conn = DriverManager.getConnection(getUrl(), props);
-String ddl = "create table round_test(k bigint primary key)";
+String uniquetableName = generateUniqueName();
+String ddl = "create table " + uniquetableName + "(k bigint primary key)";
 conn.createStatement().execute(ddl);
-conn.close();
 
-props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
30));
-conn = DriverManager.getConnection(getUrl(), props);
-PreparedStatement stmt = conn.prepareStatement("upsert into round_test 
values(1380603308885)");
+PreparedStatement stmt = conn.prepareStatement("upsert into " + 
uniquetableName + " values(1380603308885)");
 stmt.execute();
 conn.commit();
-conn.close();
-
 
-props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
40));
-conn = DriverManager.getConnection(getUrl(), props);
 ResultSet rs;
-stmt = conn.prepareStatement("select round(k/100,0) from round_test");
+stmt = conn.prepareStatement("select round(k/100,0) from " + 
uniquetableName);
 rs = stmt.executeQuery();
 assertTrue(rs.next());
 assertEquals(1380603, rs.getLong(1));
 
-props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
40));
-conn = DriverManager.getConnection(getUrl(), props);
-stmt = conn.prepareStatement("select round(k/100,0) x from round_test 
group by x");
+stmt = conn.prepareStatement("select round(k/100,0) x from " + 
uniquetableName + " group by x");
 rs = stmt.executeQuery();
 assertTrue(rs.next());
 assertEquals(1380603, rs.getLong(1));

http://git-wip-us.apache.org/repos/asf/phoenix/blob/e46d3d3d/phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorIT.java
index b7d67f2..df7603a 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorIT.java
@@ -22,8 +22,6 @@ import static org.apache.phoenix.util.TestUtil.ENTITYHISTID1;
 import static org.apache.phoenix.util.TestUtil.ENTITYHISTID3;
 import static org.apache.phoenix.util.TestUtil.ENTITYHISTID7;
 import static 

[2/2] phoenix git commit: PHOENIX-4194 Modify RoundFloorCeilFuncIT, RowValueConstructorIT, SaltedTableIT, TenantIdTypeIT, StoreNullsIT and RebuildIndexConnectionPropsIT to not use CurrentSCN

2017-09-13 Thread mujtaba
PHOENIX-4194 Modify RoundFloorCeilFuncIT, RowValueConstructorIT, SaltedTableIT, 
TenantIdTypeIT, StoreNullsIT and RebuildIndexConnectionPropsIT to not use 
CurrentSCN


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

Branch: refs/heads/4.x-HBase-1.2
Commit: 06fbb9a1508144b2bd3d6880d34e819cb29d1538
Parents: 28941bc
Author: Mujtaba 
Authored: Wed Sep 13 10:56:01 2017 -0700
Committer: Mujtaba 
Committed: Wed Sep 13 10:56:01 2017 -0700

--
 .../phoenix/end2end/RoundFloorCeilFuncIT.java   |  21 +-
 .../phoenix/end2end/RowValueConstructorIT.java  | 365 ---
 .../apache/phoenix/end2end/StoreNullsIT.java|  27 +-
 .../apache/phoenix/end2end/TenantIdTypeIT.java  |   6 +-
 .../phoenix/end2end/salted/SaltedTableIT.java   | 101 +++--
 .../java/org/apache/phoenix/query/BaseTest.java |  48 ++-
 6 files changed, 242 insertions(+), 326 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/06fbb9a1/phoenix-core/src/it/java/org/apache/phoenix/end2end/RoundFloorCeilFuncIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/RoundFloorCeilFuncIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/RoundFloorCeilFuncIT.java
index 423876f..b1e218b 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/RoundFloorCeilFuncIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/RoundFloorCeilFuncIT.java
@@ -59,7 +59,6 @@ public class RoundFloorCeilFuncIT extends 
ParallelStatsDisabledIT {
 private static final double unsignedDoubleUpserted = 1.264d;
 private static final float floatUpserted = 1.264f;
 private static final float unsignedFloatUpserted = 1.264f;
-
 private String tableName;
 
 @Before
@@ -647,33 +646,23 @@ public class RoundFloorCeilFuncIT extends 
ParallelStatsDisabledIT {
 
   @Test
   public void testRoundOffFunction() throws SQLException {
-long ts = nextTimestamp();
 Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
10));
 Connection conn = DriverManager.getConnection(getUrl(), props);
-String ddl = "create table round_test(k bigint primary key)";
+String uniquetableName = generateUniqueName();
+String ddl = "create table " + uniquetableName + "(k bigint primary key)";
 conn.createStatement().execute(ddl);
-conn.close();
 
-props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
30));
-conn = DriverManager.getConnection(getUrl(), props);
-PreparedStatement stmt = conn.prepareStatement("upsert into round_test 
values(1380603308885)");
+PreparedStatement stmt = conn.prepareStatement("upsert into " + 
uniquetableName + " values(1380603308885)");
 stmt.execute();
 conn.commit();
-conn.close();
-
 
-props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
40));
-conn = DriverManager.getConnection(getUrl(), props);
 ResultSet rs;
-stmt = conn.prepareStatement("select round(k/100,0) from round_test");
+stmt = conn.prepareStatement("select round(k/100,0) from " + 
uniquetableName);
 rs = stmt.executeQuery();
 assertTrue(rs.next());
 assertEquals(1380603, rs.getLong(1));
 
-props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
40));
-conn = DriverManager.getConnection(getUrl(), props);
-stmt = conn.prepareStatement("select round(k/100,0) x from round_test 
group by x");
+stmt = conn.prepareStatement("select round(k/100,0) x from " + 
uniquetableName + " group by x");
 rs = stmt.executeQuery();
 assertTrue(rs.next());
 assertEquals(1380603, rs.getLong(1));

http://git-wip-us.apache.org/repos/asf/phoenix/blob/06fbb9a1/phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorIT.java
index b7d67f2..df7603a 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorIT.java
@@ -22,8 +22,6 @@ import static org.apache.phoenix.util.TestUtil.ENTITYHISTID1;
 import static org.apache.phoenix.util.TestUtil.ENTITYHISTID3;
 import static org.apache.phoenix.util.TestUtil.ENTITYHISTID7;
 import static 

[1/2] phoenix git commit: PHOENIX-4194 Modify RoundFloorCeilFuncIT, RowValueConstructorIT, SaltedTableIT, TenantIdTypeIT, StoreNullsIT and RebuildIndexConnectionPropsIT to not use CurrentSCN

2017-09-13 Thread mujtaba
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.2 28941bc6f -> 06fbb9a15


http://git-wip-us.apache.org/repos/asf/phoenix/blob/06fbb9a1/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
--
diff --git a/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java 
b/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
index ac9624b..33193ff 100644
--- a/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
+++ b/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
@@ -1249,27 +1249,31 @@ public abstract class BaseTest {
 }
 
 
-protected static void initEntityHistoryTableValues(String tenantId, 
byte[][] splits, Date date, Long ts) throws Exception {
-initEntityHistoryTableValues(tenantId, splits, date, ts, getUrl());
+protected static String initEntityHistoryTableValues(String tenantId, 
byte[][] splits, Date date, Long ts) throws Exception {
+return initEntityHistoryTableValues(ENTITY_HISTORY_TABLE_NAME, 
tenantId, splits, date, ts, getUrl());
 }
 
-protected static void initSaltedEntityHistoryTableValues(String tenantId, 
byte[][] splits, Date date, Long ts) throws Exception {
-initSaltedEntityHistoryTableValues(tenantId, splits, date, ts, 
getUrl());
-}
-
-protected static void initEntityHistoryTableValues(String tenantId, 
byte[][] splits, String url) throws Exception {
-initEntityHistoryTableValues(tenantId, splits, null, null, url);
+protected static String initEntityHistoryTableValues(String tableName, 
String tenantId, byte[][] splits, Date date, Long ts) throws Exception {
+return initEntityHistoryTableValues(tableName, tenantId, splits, date, 
ts, getUrl());
 }
 
-protected static void initEntityHistoryTableValues(String tenantId, 
byte[][] splits, Date date, String url) throws Exception {
-initEntityHistoryTableValues(tenantId, splits, date, null, url);
+protected static String initSaltedEntityHistoryTableValues(String 
tableName, String tenantId, byte[][] splits, Date date, Long ts) throws 
Exception {
+return initSaltedEntityHistoryTableValues(tableName, tenantId, splits, 
date, ts, getUrl());
+}
+
+protected static String initEntityHistoryTableValues(String tableName, 
String tenantId, byte[][] splits, String url) throws Exception {
+return initEntityHistoryTableValues(tableName, tenantId, splits, null, 
null, url);
 }
 
-private static void initEntityHistoryTableValues(String tenantId, byte[][] 
splits, Date date, Long ts, String url) throws Exception {
+private static String initEntityHistoryTableValues(String tableName, 
String tenantId, byte[][] splits, Date date, Long ts, String url) throws 
Exception {
+   if (tableName == null) {
+   tableName = generateUniqueName();
+   }
+   
 if (ts == null) {
-ensureTableCreated(url, ENTITY_HISTORY_TABLE_NAME, 
ENTITY_HISTORY_TABLE_NAME, splits, null);
+ensureTableCreated(url, tableName, ENTITY_HISTORY_TABLE_NAME, 
splits, null);
 } else {
-ensureTableCreated(url, ENTITY_HISTORY_TABLE_NAME, 
ENTITY_HISTORY_TABLE_NAME, splits, ts-2, null);
+ensureTableCreated(url, tableName, ENTITY_HISTORY_TABLE_NAME, 
splits, ts-2, null);
 }
 
 Properties props = new Properties();
@@ -1281,7 +1285,7 @@ public abstract class BaseTest {
 // Insert all rows at ts
 PreparedStatement stmt = conn.prepareStatement(
 "upsert into " +
-ENTITY_HISTORY_TABLE_NAME+
+tableName +
 "(" +
 "ORGANIZATION_ID, " +
 "PARENT_ID, " +
@@ -1367,13 +1371,19 @@ public abstract class BaseTest {
 } finally {
 conn.close();
 }
+
+return tableName;
 }
 
-protected static void initSaltedEntityHistoryTableValues(String tenantId, 
byte[][] splits, Date date, Long ts, String url) throws Exception {
+protected static String initSaltedEntityHistoryTableValues(String 
tableName, String tenantId, byte[][] splits, Date date, Long ts, String url) 
throws Exception {
+   if (tableName == null) {
+   tableName = generateUniqueName();
+   }
+   
 if (ts == null) {
-ensureTableCreated(url, ENTITY_HISTORY_SALTED_TABLE_NAME, 
ENTITY_HISTORY_SALTED_TABLE_NAME, splits, null);
+ensureTableCreated(url, tableName, 
ENTITY_HISTORY_SALTED_TABLE_NAME, splits, null);
 } else {
-ensureTableCreated(url, ENTITY_HISTORY_SALTED_TABLE_NAME, 
ENTITY_HISTORY_SALTED_TABLE_NAME, splits, ts-2, null);
+ensureTableCreated(url, tableName, 
ENTITY_HISTORY_SALTED_TABLE_NAME, splits, ts-2, null);
 }
 
 Properties props 

[2/2] phoenix git commit: PHOENIX-4194 Modify RoundFloorCeilFuncIT, RowValueConstructorIT, SaltedTableIT, TenantIdTypeIT, StoreNullsIT and RebuildIndexConnectionPropsIT to not use CurrentSCN

2017-09-13 Thread mujtaba
PHOENIX-4194 Modify RoundFloorCeilFuncIT, RowValueConstructorIT, SaltedTableIT, 
TenantIdTypeIT, StoreNullsIT and RebuildIndexConnectionPropsIT to not use 
CurrentSCN


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

Branch: refs/heads/master
Commit: 1407a5ec84ff8ceb50e25efe6085d62df4544228
Parents: 586cdab
Author: Mujtaba 
Authored: Wed Sep 13 10:55:19 2017 -0700
Committer: Mujtaba 
Committed: Wed Sep 13 10:55:19 2017 -0700

--
 .../phoenix/end2end/RoundFloorCeilFuncIT.java   |  21 +-
 .../phoenix/end2end/RowValueConstructorIT.java  | 365 ---
 .../apache/phoenix/end2end/StoreNullsIT.java|  27 +-
 .../apache/phoenix/end2end/TenantIdTypeIT.java  |   6 +-
 .../phoenix/end2end/salted/SaltedTableIT.java   | 101 +++--
 .../java/org/apache/phoenix/query/BaseTest.java |  48 ++-
 6 files changed, 242 insertions(+), 326 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/1407a5ec/phoenix-core/src/it/java/org/apache/phoenix/end2end/RoundFloorCeilFuncIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/RoundFloorCeilFuncIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/RoundFloorCeilFuncIT.java
index 423876f..b1e218b 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/RoundFloorCeilFuncIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/RoundFloorCeilFuncIT.java
@@ -59,7 +59,6 @@ public class RoundFloorCeilFuncIT extends 
ParallelStatsDisabledIT {
 private static final double unsignedDoubleUpserted = 1.264d;
 private static final float floatUpserted = 1.264f;
 private static final float unsignedFloatUpserted = 1.264f;
-
 private String tableName;
 
 @Before
@@ -647,33 +646,23 @@ public class RoundFloorCeilFuncIT extends 
ParallelStatsDisabledIT {
 
   @Test
   public void testRoundOffFunction() throws SQLException {
-long ts = nextTimestamp();
 Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
10));
 Connection conn = DriverManager.getConnection(getUrl(), props);
-String ddl = "create table round_test(k bigint primary key)";
+String uniquetableName = generateUniqueName();
+String ddl = "create table " + uniquetableName + "(k bigint primary key)";
 conn.createStatement().execute(ddl);
-conn.close();
 
-props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
30));
-conn = DriverManager.getConnection(getUrl(), props);
-PreparedStatement stmt = conn.prepareStatement("upsert into round_test 
values(1380603308885)");
+PreparedStatement stmt = conn.prepareStatement("upsert into " + 
uniquetableName + " values(1380603308885)");
 stmt.execute();
 conn.commit();
-conn.close();
-
 
-props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
40));
-conn = DriverManager.getConnection(getUrl(), props);
 ResultSet rs;
-stmt = conn.prepareStatement("select round(k/100,0) from round_test");
+stmt = conn.prepareStatement("select round(k/100,0) from " + 
uniquetableName);
 rs = stmt.executeQuery();
 assertTrue(rs.next());
 assertEquals(1380603, rs.getLong(1));
 
-props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
40));
-conn = DriverManager.getConnection(getUrl(), props);
-stmt = conn.prepareStatement("select round(k/100,0) x from round_test 
group by x");
+stmt = conn.prepareStatement("select round(k/100,0) x from " + 
uniquetableName + " group by x");
 rs = stmt.executeQuery();
 assertTrue(rs.next());
 assertEquals(1380603, rs.getLong(1));

http://git-wip-us.apache.org/repos/asf/phoenix/blob/1407a5ec/phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorIT.java
index b7d67f2..df7603a 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorIT.java
@@ -22,8 +22,6 @@ import static org.apache.phoenix.util.TestUtil.ENTITYHISTID1;
 import static org.apache.phoenix.util.TestUtil.ENTITYHISTID3;
 import static org.apache.phoenix.util.TestUtil.ENTITYHISTID7;
 import static 

[1/2] phoenix git commit: PHOENIX-4194 Modify RoundFloorCeilFuncIT, RowValueConstructorIT, SaltedTableIT, TenantIdTypeIT, StoreNullsIT and RebuildIndexConnectionPropsIT to not use CurrentSCN

2017-09-13 Thread mujtaba
Repository: phoenix
Updated Branches:
  refs/heads/master 586cdab9f -> 1407a5ec8


http://git-wip-us.apache.org/repos/asf/phoenix/blob/1407a5ec/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
--
diff --git a/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java 
b/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
index ac9624b..33193ff 100644
--- a/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
+++ b/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
@@ -1249,27 +1249,31 @@ public abstract class BaseTest {
 }
 
 
-protected static void initEntityHistoryTableValues(String tenantId, 
byte[][] splits, Date date, Long ts) throws Exception {
-initEntityHistoryTableValues(tenantId, splits, date, ts, getUrl());
+protected static String initEntityHistoryTableValues(String tenantId, 
byte[][] splits, Date date, Long ts) throws Exception {
+return initEntityHistoryTableValues(ENTITY_HISTORY_TABLE_NAME, 
tenantId, splits, date, ts, getUrl());
 }
 
-protected static void initSaltedEntityHistoryTableValues(String tenantId, 
byte[][] splits, Date date, Long ts) throws Exception {
-initSaltedEntityHistoryTableValues(tenantId, splits, date, ts, 
getUrl());
-}
-
-protected static void initEntityHistoryTableValues(String tenantId, 
byte[][] splits, String url) throws Exception {
-initEntityHistoryTableValues(tenantId, splits, null, null, url);
+protected static String initEntityHistoryTableValues(String tableName, 
String tenantId, byte[][] splits, Date date, Long ts) throws Exception {
+return initEntityHistoryTableValues(tableName, tenantId, splits, date, 
ts, getUrl());
 }
 
-protected static void initEntityHistoryTableValues(String tenantId, 
byte[][] splits, Date date, String url) throws Exception {
-initEntityHistoryTableValues(tenantId, splits, date, null, url);
+protected static String initSaltedEntityHistoryTableValues(String 
tableName, String tenantId, byte[][] splits, Date date, Long ts) throws 
Exception {
+return initSaltedEntityHistoryTableValues(tableName, tenantId, splits, 
date, ts, getUrl());
+}
+
+protected static String initEntityHistoryTableValues(String tableName, 
String tenantId, byte[][] splits, String url) throws Exception {
+return initEntityHistoryTableValues(tableName, tenantId, splits, null, 
null, url);
 }
 
-private static void initEntityHistoryTableValues(String tenantId, byte[][] 
splits, Date date, Long ts, String url) throws Exception {
+private static String initEntityHistoryTableValues(String tableName, 
String tenantId, byte[][] splits, Date date, Long ts, String url) throws 
Exception {
+   if (tableName == null) {
+   tableName = generateUniqueName();
+   }
+   
 if (ts == null) {
-ensureTableCreated(url, ENTITY_HISTORY_TABLE_NAME, 
ENTITY_HISTORY_TABLE_NAME, splits, null);
+ensureTableCreated(url, tableName, ENTITY_HISTORY_TABLE_NAME, 
splits, null);
 } else {
-ensureTableCreated(url, ENTITY_HISTORY_TABLE_NAME, 
ENTITY_HISTORY_TABLE_NAME, splits, ts-2, null);
+ensureTableCreated(url, tableName, ENTITY_HISTORY_TABLE_NAME, 
splits, ts-2, null);
 }
 
 Properties props = new Properties();
@@ -1281,7 +1285,7 @@ public abstract class BaseTest {
 // Insert all rows at ts
 PreparedStatement stmt = conn.prepareStatement(
 "upsert into " +
-ENTITY_HISTORY_TABLE_NAME+
+tableName +
 "(" +
 "ORGANIZATION_ID, " +
 "PARENT_ID, " +
@@ -1367,13 +1371,19 @@ public abstract class BaseTest {
 } finally {
 conn.close();
 }
+
+return tableName;
 }
 
-protected static void initSaltedEntityHistoryTableValues(String tenantId, 
byte[][] splits, Date date, Long ts, String url) throws Exception {
+protected static String initSaltedEntityHistoryTableValues(String 
tableName, String tenantId, byte[][] splits, Date date, Long ts, String url) 
throws Exception {
+   if (tableName == null) {
+   tableName = generateUniqueName();
+   }
+   
 if (ts == null) {
-ensureTableCreated(url, ENTITY_HISTORY_SALTED_TABLE_NAME, 
ENTITY_HISTORY_SALTED_TABLE_NAME, splits, null);
+ensureTableCreated(url, tableName, 
ENTITY_HISTORY_SALTED_TABLE_NAME, splits, null);
 } else {
-ensureTableCreated(url, ENTITY_HISTORY_SALTED_TABLE_NAME, 
ENTITY_HISTORY_SALTED_TABLE_NAME, splits, ts-2, null);
+ensureTableCreated(url, tableName, 
ENTITY_HISTORY_SALTED_TABLE_NAME, splits, ts-2, null);
 }
 
 Properties props = new 

[1/2] phoenix git commit: PHOENIX-4194 Modify RoundFloorCeilFuncIT, RowValueConstructorIT, SaltedTableIT, TenantIdTypeIT, StoreNullsIT and RebuildIndexConnectionPropsIT to not use CurrentSCN

2017-09-13 Thread mujtaba
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-0.98 458973fd3 -> 67aa5da88


http://git-wip-us.apache.org/repos/asf/phoenix/blob/67aa5da8/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
--
diff --git a/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java 
b/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
index afcaeef..4341fd5 100644
--- a/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
+++ b/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
@@ -1237,27 +1237,31 @@ public abstract class BaseTest {
 }
 
 
-protected static void initEntityHistoryTableValues(String tenantId, 
byte[][] splits, Date date, Long ts) throws Exception {
-initEntityHistoryTableValues(tenantId, splits, date, ts, getUrl());
+protected static String initEntityHistoryTableValues(String tenantId, 
byte[][] splits, Date date, Long ts) throws Exception {
+return initEntityHistoryTableValues(ENTITY_HISTORY_TABLE_NAME, 
tenantId, splits, date, ts, getUrl());
 }
 
-protected static void initSaltedEntityHistoryTableValues(String tenantId, 
byte[][] splits, Date date, Long ts) throws Exception {
-initSaltedEntityHistoryTableValues(tenantId, splits, date, ts, 
getUrl());
-}
-
-protected static void initEntityHistoryTableValues(String tenantId, 
byte[][] splits, String url) throws Exception {
-initEntityHistoryTableValues(tenantId, splits, null, null, url);
+protected static String initEntityHistoryTableValues(String tableName, 
String tenantId, byte[][] splits, Date date, Long ts) throws Exception {
+return initEntityHistoryTableValues(tableName, tenantId, splits, date, 
ts, getUrl());
 }
 
-protected static void initEntityHistoryTableValues(String tenantId, 
byte[][] splits, Date date, String url) throws Exception {
-initEntityHistoryTableValues(tenantId, splits, date, null, url);
+protected static String initSaltedEntityHistoryTableValues(String 
tableName, String tenantId, byte[][] splits, Date date, Long ts) throws 
Exception {
+return initSaltedEntityHistoryTableValues(tableName, tenantId, splits, 
date, ts, getUrl());
+}
+
+protected static String initEntityHistoryTableValues(String tableName, 
String tenantId, byte[][] splits, String url) throws Exception {
+return initEntityHistoryTableValues(tableName, tenantId, splits, null, 
null, url);
 }
 
-private static void initEntityHistoryTableValues(String tenantId, byte[][] 
splits, Date date, Long ts, String url) throws Exception {
+private static String initEntityHistoryTableValues(String tableName, 
String tenantId, byte[][] splits, Date date, Long ts, String url) throws 
Exception {
+   if (tableName == null) {
+   tableName = generateUniqueName();
+   }
+   
 if (ts == null) {
-ensureTableCreated(url, ENTITY_HISTORY_TABLE_NAME, 
ENTITY_HISTORY_TABLE_NAME, splits, null);
+ensureTableCreated(url, tableName, ENTITY_HISTORY_TABLE_NAME, 
splits, null);
 } else {
-ensureTableCreated(url, ENTITY_HISTORY_TABLE_NAME, 
ENTITY_HISTORY_TABLE_NAME, splits, ts-2, null);
+ensureTableCreated(url, tableName, ENTITY_HISTORY_TABLE_NAME, 
splits, ts-2, null);
 }
 
 Properties props = new Properties();
@@ -1269,7 +1273,7 @@ public abstract class BaseTest {
 // Insert all rows at ts
 PreparedStatement stmt = conn.prepareStatement(
 "upsert into " +
-ENTITY_HISTORY_TABLE_NAME+
+tableName +
 "(" +
 "ORGANIZATION_ID, " +
 "PARENT_ID, " +
@@ -1355,13 +1359,19 @@ public abstract class BaseTest {
 } finally {
 conn.close();
 }
+
+return tableName;
 }
 
-protected static void initSaltedEntityHistoryTableValues(String tenantId, 
byte[][] splits, Date date, Long ts, String url) throws Exception {
+protected static String initSaltedEntityHistoryTableValues(String 
tableName, String tenantId, byte[][] splits, Date date, Long ts, String url) 
throws Exception {
+   if (tableName == null) {
+   tableName = generateUniqueName();
+   }
+   
 if (ts == null) {
-ensureTableCreated(url, ENTITY_HISTORY_SALTED_TABLE_NAME, 
ENTITY_HISTORY_SALTED_TABLE_NAME, splits, null);
+ensureTableCreated(url, tableName, 
ENTITY_HISTORY_SALTED_TABLE_NAME, splits, null);
 } else {
-ensureTableCreated(url, ENTITY_HISTORY_SALTED_TABLE_NAME, 
ENTITY_HISTORY_SALTED_TABLE_NAME, splits, ts-2, null);
+ensureTableCreated(url, tableName, 
ENTITY_HISTORY_SALTED_TABLE_NAME, splits, ts-2, null);
 }
 
 Properties 

[2/2] phoenix git commit: PHOENIX-4194 Modify RoundFloorCeilFuncIT, RowValueConstructorIT, SaltedTableIT, TenantIdTypeIT, StoreNullsIT and RebuildIndexConnectionPropsIT to not use CurrentSCN

2017-09-13 Thread mujtaba
PHOENIX-4194 Modify RoundFloorCeilFuncIT, RowValueConstructorIT, SaltedTableIT, 
TenantIdTypeIT, StoreNullsIT and RebuildIndexConnectionPropsIT to not use 
CurrentSCN


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

Branch: refs/heads/4.x-HBase-0.98
Commit: 67aa5da881aec450baecec8452cd8ee741487cd3
Parents: 458973f
Author: Mujtaba 
Authored: Wed Sep 13 10:51:24 2017 -0700
Committer: Mujtaba 
Committed: Wed Sep 13 10:51:24 2017 -0700

--
 .../phoenix/end2end/RoundFloorCeilFuncIT.java   |  21 +-
 .../phoenix/end2end/RowValueConstructorIT.java  | 365 ---
 .../apache/phoenix/end2end/StoreNullsIT.java|  27 +-
 .../apache/phoenix/end2end/TenantIdTypeIT.java  |   6 +-
 .../phoenix/end2end/salted/SaltedTableIT.java   | 101 +++--
 .../java/org/apache/phoenix/query/BaseTest.java |  48 ++-
 6 files changed, 242 insertions(+), 326 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/67aa5da8/phoenix-core/src/it/java/org/apache/phoenix/end2end/RoundFloorCeilFuncIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/RoundFloorCeilFuncIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/RoundFloorCeilFuncIT.java
index 423876f..b1e218b 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/RoundFloorCeilFuncIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/RoundFloorCeilFuncIT.java
@@ -59,7 +59,6 @@ public class RoundFloorCeilFuncIT extends 
ParallelStatsDisabledIT {
 private static final double unsignedDoubleUpserted = 1.264d;
 private static final float floatUpserted = 1.264f;
 private static final float unsignedFloatUpserted = 1.264f;
-
 private String tableName;
 
 @Before
@@ -647,33 +646,23 @@ public class RoundFloorCeilFuncIT extends 
ParallelStatsDisabledIT {
 
   @Test
   public void testRoundOffFunction() throws SQLException {
-long ts = nextTimestamp();
 Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
10));
 Connection conn = DriverManager.getConnection(getUrl(), props);
-String ddl = "create table round_test(k bigint primary key)";
+String uniquetableName = generateUniqueName();
+String ddl = "create table " + uniquetableName + "(k bigint primary key)";
 conn.createStatement().execute(ddl);
-conn.close();
 
-props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
30));
-conn = DriverManager.getConnection(getUrl(), props);
-PreparedStatement stmt = conn.prepareStatement("upsert into round_test 
values(1380603308885)");
+PreparedStatement stmt = conn.prepareStatement("upsert into " + 
uniquetableName + " values(1380603308885)");
 stmt.execute();
 conn.commit();
-conn.close();
-
 
-props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
40));
-conn = DriverManager.getConnection(getUrl(), props);
 ResultSet rs;
-stmt = conn.prepareStatement("select round(k/100,0) from round_test");
+stmt = conn.prepareStatement("select round(k/100,0) from " + 
uniquetableName);
 rs = stmt.executeQuery();
 assertTrue(rs.next());
 assertEquals(1380603, rs.getLong(1));
 
-props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts + 
40));
-conn = DriverManager.getConnection(getUrl(), props);
-stmt = conn.prepareStatement("select round(k/100,0) x from round_test 
group by x");
+stmt = conn.prepareStatement("select round(k/100,0) x from " + 
uniquetableName + " group by x");
 rs = stmt.executeQuery();
 assertTrue(rs.next());
 assertEquals(1380603, rs.getLong(1));

http://git-wip-us.apache.org/repos/asf/phoenix/blob/67aa5da8/phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorIT.java
index b7d67f2..df7603a 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/RowValueConstructorIT.java
@@ -22,8 +22,6 @@ import static org.apache.phoenix.util.TestUtil.ENTITYHISTID1;
 import static org.apache.phoenix.util.TestUtil.ENTITYHISTID3;
 import static org.apache.phoenix.util.TestUtil.ENTITYHISTID7;
 import static 

Build failed in Jenkins: Phoenix Compile Compatibility with HBase #405

2017-09-13 Thread Apache Jenkins Server
See 


--
Started by timer
[EnvInject] - Loading node environment variables.
Building remotely on H25 (couchdbtest ubuntu xenial) in workspace 

[Phoenix_Compile_Compat_wHBase] $ /bin/bash /tmp/jenkins8713101678094130356.sh
core file size  (blocks, -c) 0
data seg size   (kbytes, -d) unlimited
scheduling priority (-e) 0
file size   (blocks, -f) unlimited
pending signals (-i) 386417
max locked memory   (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files  (-n) 6
pipe size(512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority  (-r) 0
stack size  (kbytes, -s) 8192
cpu time   (seconds, -t) unlimited
max user processes  (-u) 10240
virtual memory  (kbytes, -v) unlimited
file locks  (-x) unlimited
core id : 0
core id : 1
core id : 2
core id : 3
core id : 4
core id : 5
physical id : 0
physical id : 1
MemTotal:   98958120 kB
MemFree:14889444 kB
Filesystem  Size  Used Avail Use% Mounted on
udev 48G 0   48G   0% /dev
tmpfs   9.5G  994M  8.5G  11% /run
/dev/sda1   364G  192G  154G  56% /
tmpfs48G  516K   48G   1% /dev/shm
tmpfs   5.0M 0  5.0M   0% /run/lock
tmpfs48G 0   48G   0% /sys/fs/cgroup
tmpfs   9.5G 0  9.5G   0% /run/user/10025
apache-maven-2.2.1
apache-maven-3.0.4
apache-maven-3.0.5
apache-maven-3.2.1
apache-maven-3.2.5
apache-maven-3.3.3
apache-maven-3.3.9
apache-maven-3.5.0
latest
latest2
latest3


===
Verifying compile level compatibility with HBase 0.98 with Phoenix 
4.x-HBase-0.98
===

Cloning into 'hbase'...
Switched to a new branch '0.98'
Branch 0.98 set up to track remote branch 0.98 from origin.

main:
 [exec] 
~/jenkins-slave/workspace/Phoenix_Compile_Compat_wHBase/hbase/hbase-common 
~/jenkins-slave/workspace/Phoenix_Compile_Compat_wHBase/hbase/hbase-common
 [exec] 
~/jenkins-slave/workspace/Phoenix_Compile_Compat_wHBase/hbase/hbase-common

main:
[mkdir] Created dir: 

 [exec] tar: hadoop-snappy-nativelibs.tar: Cannot open: No such file or 
directory
 [exec] tar: Error is not recoverable: exiting now
 [exec] Result: 2

main:
[mkdir] Created dir: 

 [copy] Copying 20 files to 

[mkdir] Created dir: 

[mkdir] Created dir: 


main:
[mkdir] Created dir: 

 [copy] Copying 17 files to 

[mkdir] Created dir: 


main:
[mkdir] Created dir: 

 [copy] Copying 1 file to 

[mkdir] Created dir: 


HBase pom.xml:

Got HBase version as 0.98.25-SNAPSHOT
Cloning into 'phoenix'...
Switched to a new branch '4.x-HBase-0.98'
Branch 4.x-HBase-0.98 set up to track remote branch 4.x-HBase-0.98 from origin.
ANTLR Parser Generator  Version 3.5.2
Output file 

 does not exist: must build 

PhoenixSQL.g


===
Verifying compile level compatibility with HBase branch-1.3 with Phoenix master