Apache-Phoenix | 4.0 | Hadoop1 | Build Successful

2014-07-24 Thread Apache Jenkins Server
4.0 branch build status Successful

Source repository https://git-wip-us.apache.org/repos/asf/incubator-phoenix.git

Compiled Artifacts https://builds.apache.org/job/Phoenix-4.0-hadoop1/lastSuccessfulBuild/artifact/

Test Report https://builds.apache.org/job/Phoenix-4.0-hadoop1/lastCompletedBuild/testReport/

Changes
[jtaylor] Better test coverage for IN list with RVC (KyleBuzsaki)



Apache-Phoenix | Master | Hadoop1 | Build Successful

2014-07-24 Thread Apache Jenkins Server
Master branch build status Successful
Source repository https://git-wip-us.apache.org/repos/asf/incubator-phoenix.git

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

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

Changes
[jtaylor] Better test coverage for IN list with RVC (KyleBuzsaki)



Build failed in Jenkins: Phoenix | 3.0 | Hadoop1 #148

2014-07-24 Thread Apache Jenkins Server
See 

Changes:

[jtaylor] Better test coverage for IN list with RVC (KyleBuzsaki)

--
[...truncated 2557 lines...]
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.05 sec - in 
org.apache.phoenix.iterate.AggregateResultScannerTest
Running org.apache.phoenix.iterate.SpoolingResultIteratorTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.075 sec - in 
org.apache.phoenix.iterate.SpoolingResultIteratorTest
Running org.apache.phoenix.hbase.index.util.TestIndexManagementUtil
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.008 sec - in 
org.apache.phoenix.hbase.index.util.TestIndexManagementUtil
Running org.apache.phoenix.hbase.index.parallel.TestThreadPoolBuilder
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec - in 
org.apache.phoenix.hbase.index.parallel.TestThreadPoolBuilder
Running org.apache.phoenix.hbase.index.parallel.TestThreadPoolManager
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec - in 
org.apache.phoenix.hbase.index.parallel.TestThreadPoolManager
Running 
org.apache.phoenix.hbase.index.write.recovery.TestPerRegionIndexWriteCache
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.03 sec - in 
org.apache.phoenix.hbase.index.write.recovery.TestPerRegionIndexWriteCache
Running org.apache.phoenix.hbase.index.write.TestCachingHTableFactory
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.041 sec - in 
org.apache.phoenix.hbase.index.write.TestCachingHTableFactory
Running org.apache.phoenix.hbase.index.write.TestParalleIndexWriter
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.327 sec - in 
org.apache.phoenix.hbase.index.write.TestParalleIndexWriter
Running org.apache.phoenix.hbase.index.write.TestWALRecoveryCaching
Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.01 sec - in 
org.apache.phoenix.hbase.index.write.TestWALRecoveryCaching
Running org.apache.phoenix.hbase.index.write.TestParalleWriterIndexCommitter
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.01 sec - in 
org.apache.phoenix.hbase.index.write.TestParalleWriterIndexCommitter
Running org.apache.phoenix.hbase.index.write.TestIndexWriter
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.05 sec - in 
org.apache.phoenix.hbase.index.write.TestIndexWriter
Running org.apache.phoenix.hbase.index.covered.TestLocalTableState
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.113 sec - in 
org.apache.phoenix.hbase.index.covered.TestLocalTableState
Running 
org.apache.phoenix.hbase.index.covered.example.TestCoveredIndexSpecifierBuilder
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 sec - in 
org.apache.phoenix.hbase.index.covered.example.TestCoveredIndexSpecifierBuilder
Running 
org.apache.phoenix.hbase.index.covered.example.TestCoveredColumnIndexCodec
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.008 sec - in 
org.apache.phoenix.hbase.index.covered.example.TestCoveredColumnIndexCodec
Running org.apache.phoenix.hbase.index.covered.example.TestColumnTracker
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec - in 
org.apache.phoenix.hbase.index.covered.example.TestColumnTracker
Running org.apache.phoenix.hbase.index.covered.update.TestIndexUpdateManager
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.022 sec - in 
org.apache.phoenix.hbase.index.covered.update.TestIndexUpdateManager
Running org.apache.phoenix.hbase.index.covered.TestCoveredColumns
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in 
org.apache.phoenix.hbase.index.covered.TestCoveredColumns
Running org.apache.phoenix.hbase.index.covered.filter.TestNewerTimestampFilter
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec - in 
org.apache.phoenix.hbase.index.covered.filter.TestNewerTimestampFilter
Running 
org.apache.phoenix.hbase.index.covered.filter.TestApplyAndFilterDeletesFilter
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec - in 
org.apache.phoenix.hbase.index.covered.filter.TestApplyAndFilterDeletesFilter
Running org.apache.phoenix.hbase.index.covered.filter.TestFamilyOnlyFilter
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec - in 
org.apache.phoenix.hbase.index.covered.filter.TestFamilyOnlyFilter
Running org.apache.phoenix.hbase.index.covered.data.TestIndexMemStore
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.024 sec - in 
org.apache.phoenix.hbase.index.covered.data.TestIndexMemStore
Running org.apache.phoenix.filter.SkipScanFilterTest
Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.052 sec - in 
org.apache.phoenix.filter.SkipScanFilterTest
Running org.apache.phoenix.filter.SkipScanFilterIntersectTest
Tests run: 17, Failures: 0, Errors: 0, Skipped: 0

git commit: Better test coverage for IN list with RVC (KyleBuzsaki)

2014-07-24 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/master 2f1ae8092 -> 3d3bbe219


Better test coverage for IN list with RVC (KyleBuzsaki)


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

Branch: refs/heads/master
Commit: 3d3bbe2197cacdb5baa1e0ff7c6719a93cfe497c
Parents: 2f1ae80
Author: James Taylor 
Authored: Thu Jul 24 22:48:23 2014 -0700
Committer: James Taylor 
Committed: Thu Jul 24 22:53:13 2014 -0700

--
 .../org/apache/phoenix/end2end/InListIT.java| 166 ++-
 1 file changed, 159 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/3d3bbe21/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
--
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
index 9789c46..19e5037 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
@@ -22,6 +22,7 @@ import org.junit.experimental.categories.Category;
 import com.google.common.base.Function;
 import com.google.common.base.Joiner;
 import com.google.common.collect.Lists;
+import java.util.Collections;
 
 @Category(ClientManagedTimeTest.class)
 public class InListIT extends BaseHBaseManagedTimeIT {
@@ -211,16 +212,87 @@ public class InListIT extends BaseHBaseManagedTimeIT {
 }
 });
 
+// test variations used:
+// 1. queries with no results
+// 2. queries with fully qualified row keys
+// 3. queries with partiall qualified row keys, starting from the beginning
+// 4. queries with partially qualified row keys, but not the beginning
+// 5. queries with partially qualified row keys with a "hole slot" in the 
middle
+
 @Test
-public void testLeadingPKWithTrailingRVC3() throws Exception {
-String whereClause = "WHERE pk1 = 2 AND (pk3, pk4, pk5) IN ((4, 5, 6), 
(5, 6, 4))";
+public void testPlainRVCNoResults() throws Exception {
+String whereClause = "WHERE (pk1, pk2, pk3, pk4, pk5) IN ((1, 2, 3, 4, 
5), (1, 2, 4, 5, 3))";
+List expecteds = Collections.emptyList();
+
+testWithIntegerTypesWithVariedSaltingAndTenancy(DEFAULT_UPSERT_BODIES, 
whereClause, expecteds);
+}
+
+@Test
+public void testPlainRVCFullyQualified() throws Exception {
+String whereClause = "WHERE (pk1, pk2, pk3, pk4, pk5) IN ((1, 2, 3, 4, 
5), (1, 2, 4, 5, 6))";
+List expecteds = singletonList("row1");
+
+testWithIntegerTypesWithVariedSaltingAndTenancy(DEFAULT_UPSERT_BODIES, 
whereClause, expecteds);
+}
+
+@Test
+public void testPlainRVCPartiallyQualifiedBegin() throws Exception {
+String whereClause = "WHERE (pk1, pk2, pk3, pk4) IN ((2, 3, 4, 5), (1, 
2, 4, 5))";
+List expecteds = Arrays.asList("row1", "row2");
+
+testWithIntegerTypesWithVariedSaltingAndTenancy(DEFAULT_UPSERT_BODIES, 
whereClause, expecteds);
+}
+
+@Test
+public void testPlainRVCPartiallyQualifiedEnd() throws Exception {
+String whereClause = "WHERE (pk2, pk3, pk4, pk5) IN ((2, 3, 4, 5), (2, 
4, 5, 6))";
+List expecteds = singletonList("row1");
+
+testWithIntegerTypesWithVariedSaltingAndTenancy(DEFAULT_UPSERT_BODIES, 
whereClause, expecteds);
+}
+
+@Test
+public void testPlainRVCSlotHole() throws Exception {
+String whereClause = "WHERE (pk1, pk2, pk4, pk5) IN ((1, 2, 4, 5), (6, 
5, 3, 2))";
+List expecteds = singletonList("row4");
+
+testWithIntegerTypesWithVariedSaltingAndTenancy(DEFAULT_UPSERT_BODIES, 
whereClause, expecteds);
+}
+
+@Test
+public void testLeadingPKWithTrailingRVCNoResults() throws Exception {
+String whereClause = "WHERE pk1 != 2 AND (pk3, pk4, pk5) IN ((6, 4, 
5), (5, 6, 4))";
+List expecteds = Collections.emptyList();
+
+testWithIntegerTypesWithVariedSaltingAndTenancy(DEFAULT_UPSERT_BODIES, 
whereClause, expecteds);
+}
+
+@Test
+public void testLeadingPKWithTrailingRVCFullyQualified() throws Exception {
+String whereClause = "WHERE pk1 = 2 AND (pk2, pk3, pk4, pk5) IN ((2, 
4, 5, 6), (3, 4, 5, 6))";
 List expecteds = singletonList("row2");
 
 testWithIntegerTypesWithVariedSaltingAndTenancy(DEFAULT_UPSERT_BODIES, 
whereClause, expecteds);
 }
 
 @Test
-public void testLeadingPKWithTrailingRVC4() throws Exception {
+public void testLeadingPKWithTrailing

git commit: Better test coverage for IN list with RVC (KyleBuzsaki)

2014-07-24 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.0 094513493 -> 9fad9b529


Better test coverage for IN list with RVC (KyleBuzsaki)


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

Branch: refs/heads/4.0
Commit: 9fad9b5291ee94eee2a9461e0fd7874415e9c6c1
Parents: 0945134
Author: James Taylor 
Authored: Thu Jul 24 22:48:23 2014 -0700
Committer: James Taylor 
Committed: Thu Jul 24 22:49:13 2014 -0700

--
 .../org/apache/phoenix/end2end/InListIT.java| 166 ++-
 1 file changed, 159 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/9fad9b52/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
--
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
index 9789c46..19e5037 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
@@ -22,6 +22,7 @@ import org.junit.experimental.categories.Category;
 import com.google.common.base.Function;
 import com.google.common.base.Joiner;
 import com.google.common.collect.Lists;
+import java.util.Collections;
 
 @Category(ClientManagedTimeTest.class)
 public class InListIT extends BaseHBaseManagedTimeIT {
@@ -211,16 +212,87 @@ public class InListIT extends BaseHBaseManagedTimeIT {
 }
 });
 
+// test variations used:
+// 1. queries with no results
+// 2. queries with fully qualified row keys
+// 3. queries with partiall qualified row keys, starting from the beginning
+// 4. queries with partially qualified row keys, but not the beginning
+// 5. queries with partially qualified row keys with a "hole slot" in the 
middle
+
 @Test
-public void testLeadingPKWithTrailingRVC3() throws Exception {
-String whereClause = "WHERE pk1 = 2 AND (pk3, pk4, pk5) IN ((4, 5, 6), 
(5, 6, 4))";
+public void testPlainRVCNoResults() throws Exception {
+String whereClause = "WHERE (pk1, pk2, pk3, pk4, pk5) IN ((1, 2, 3, 4, 
5), (1, 2, 4, 5, 3))";
+List expecteds = Collections.emptyList();
+
+testWithIntegerTypesWithVariedSaltingAndTenancy(DEFAULT_UPSERT_BODIES, 
whereClause, expecteds);
+}
+
+@Test
+public void testPlainRVCFullyQualified() throws Exception {
+String whereClause = "WHERE (pk1, pk2, pk3, pk4, pk5) IN ((1, 2, 3, 4, 
5), (1, 2, 4, 5, 6))";
+List expecteds = singletonList("row1");
+
+testWithIntegerTypesWithVariedSaltingAndTenancy(DEFAULT_UPSERT_BODIES, 
whereClause, expecteds);
+}
+
+@Test
+public void testPlainRVCPartiallyQualifiedBegin() throws Exception {
+String whereClause = "WHERE (pk1, pk2, pk3, pk4) IN ((2, 3, 4, 5), (1, 
2, 4, 5))";
+List expecteds = Arrays.asList("row1", "row2");
+
+testWithIntegerTypesWithVariedSaltingAndTenancy(DEFAULT_UPSERT_BODIES, 
whereClause, expecteds);
+}
+
+@Test
+public void testPlainRVCPartiallyQualifiedEnd() throws Exception {
+String whereClause = "WHERE (pk2, pk3, pk4, pk5) IN ((2, 3, 4, 5), (2, 
4, 5, 6))";
+List expecteds = singletonList("row1");
+
+testWithIntegerTypesWithVariedSaltingAndTenancy(DEFAULT_UPSERT_BODIES, 
whereClause, expecteds);
+}
+
+@Test
+public void testPlainRVCSlotHole() throws Exception {
+String whereClause = "WHERE (pk1, pk2, pk4, pk5) IN ((1, 2, 4, 5), (6, 
5, 3, 2))";
+List expecteds = singletonList("row4");
+
+testWithIntegerTypesWithVariedSaltingAndTenancy(DEFAULT_UPSERT_BODIES, 
whereClause, expecteds);
+}
+
+@Test
+public void testLeadingPKWithTrailingRVCNoResults() throws Exception {
+String whereClause = "WHERE pk1 != 2 AND (pk3, pk4, pk5) IN ((6, 4, 
5), (5, 6, 4))";
+List expecteds = Collections.emptyList();
+
+testWithIntegerTypesWithVariedSaltingAndTenancy(DEFAULT_UPSERT_BODIES, 
whereClause, expecteds);
+}
+
+@Test
+public void testLeadingPKWithTrailingRVCFullyQualified() throws Exception {
+String whereClause = "WHERE pk1 = 2 AND (pk2, pk3, pk4, pk5) IN ((2, 
4, 5, 6), (3, 4, 5, 6))";
 List expecteds = singletonList("row2");
 
 testWithIntegerTypesWithVariedSaltingAndTenancy(DEFAULT_UPSERT_BODIES, 
whereClause, expecteds);
 }
 
 @Test
-public void testLeadingPKWithTrailingRVC4() throws Exception {
+public void testLeadingPKWithTrailingRVCPar

git commit: Better test coverage for IN list with RVC (KyleBuzsaki)

2014-07-24 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/3.0 e5b1835fb -> 0d9c398fe


Better test coverage for IN list with RVC (KyleBuzsaki)


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

Branch: refs/heads/3.0
Commit: 0d9c398fef52c172b7fd260c76f36948cd5c42ab
Parents: e5b1835
Author: James Taylor 
Authored: Thu Jul 24 22:48:23 2014 -0700
Committer: James Taylor 
Committed: Thu Jul 24 22:48:23 2014 -0700

--
 .../org/apache/phoenix/end2end/InListIT.java| 166 ++-
 1 file changed, 159 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/0d9c398f/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
--
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
index 9789c46..19e5037 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
@@ -22,6 +22,7 @@ import org.junit.experimental.categories.Category;
 import com.google.common.base.Function;
 import com.google.common.base.Joiner;
 import com.google.common.collect.Lists;
+import java.util.Collections;
 
 @Category(ClientManagedTimeTest.class)
 public class InListIT extends BaseHBaseManagedTimeIT {
@@ -211,16 +212,87 @@ public class InListIT extends BaseHBaseManagedTimeIT {
 }
 });
 
+// test variations used:
+// 1. queries with no results
+// 2. queries with fully qualified row keys
+// 3. queries with partiall qualified row keys, starting from the beginning
+// 4. queries with partially qualified row keys, but not the beginning
+// 5. queries with partially qualified row keys with a "hole slot" in the 
middle
+
 @Test
-public void testLeadingPKWithTrailingRVC3() throws Exception {
-String whereClause = "WHERE pk1 = 2 AND (pk3, pk4, pk5) IN ((4, 5, 6), 
(5, 6, 4))";
+public void testPlainRVCNoResults() throws Exception {
+String whereClause = "WHERE (pk1, pk2, pk3, pk4, pk5) IN ((1, 2, 3, 4, 
5), (1, 2, 4, 5, 3))";
+List expecteds = Collections.emptyList();
+
+testWithIntegerTypesWithVariedSaltingAndTenancy(DEFAULT_UPSERT_BODIES, 
whereClause, expecteds);
+}
+
+@Test
+public void testPlainRVCFullyQualified() throws Exception {
+String whereClause = "WHERE (pk1, pk2, pk3, pk4, pk5) IN ((1, 2, 3, 4, 
5), (1, 2, 4, 5, 6))";
+List expecteds = singletonList("row1");
+
+testWithIntegerTypesWithVariedSaltingAndTenancy(DEFAULT_UPSERT_BODIES, 
whereClause, expecteds);
+}
+
+@Test
+public void testPlainRVCPartiallyQualifiedBegin() throws Exception {
+String whereClause = "WHERE (pk1, pk2, pk3, pk4) IN ((2, 3, 4, 5), (1, 
2, 4, 5))";
+List expecteds = Arrays.asList("row1", "row2");
+
+testWithIntegerTypesWithVariedSaltingAndTenancy(DEFAULT_UPSERT_BODIES, 
whereClause, expecteds);
+}
+
+@Test
+public void testPlainRVCPartiallyQualifiedEnd() throws Exception {
+String whereClause = "WHERE (pk2, pk3, pk4, pk5) IN ((2, 3, 4, 5), (2, 
4, 5, 6))";
+List expecteds = singletonList("row1");
+
+testWithIntegerTypesWithVariedSaltingAndTenancy(DEFAULT_UPSERT_BODIES, 
whereClause, expecteds);
+}
+
+@Test
+public void testPlainRVCSlotHole() throws Exception {
+String whereClause = "WHERE (pk1, pk2, pk4, pk5) IN ((1, 2, 4, 5), (6, 
5, 3, 2))";
+List expecteds = singletonList("row4");
+
+testWithIntegerTypesWithVariedSaltingAndTenancy(DEFAULT_UPSERT_BODIES, 
whereClause, expecteds);
+}
+
+@Test
+public void testLeadingPKWithTrailingRVCNoResults() throws Exception {
+String whereClause = "WHERE pk1 != 2 AND (pk3, pk4, pk5) IN ((6, 4, 
5), (5, 6, 4))";
+List expecteds = Collections.emptyList();
+
+testWithIntegerTypesWithVariedSaltingAndTenancy(DEFAULT_UPSERT_BODIES, 
whereClause, expecteds);
+}
+
+@Test
+public void testLeadingPKWithTrailingRVCFullyQualified() throws Exception {
+String whereClause = "WHERE pk1 = 2 AND (pk2, pk3, pk4, pk5) IN ((2, 
4, 5, 6), (3, 4, 5, 6))";
 List expecteds = singletonList("row2");
 
 testWithIntegerTypesWithVariedSaltingAndTenancy(DEFAULT_UPSERT_BODIES, 
whereClause, expecteds);
 }
 
 @Test
-public void testLeadingPKWithTrailingRVC4() throws Exception {
+public void testLeadingPKWithTrailingRVCPar

Apache-Phoenix | 3.0 | Hadoop1 | Build Successful

2014-07-24 Thread Apache Jenkins Server
3.0 branch build status Successful
Source repository https://git-wip-us.apache.org/repos/asf/phoenix.git

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

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

Changes
[jtaylor] PHOENIX-1083 IN list of RVC combined with AND doesn't return expected rows

[jtaylor] PHOENIX-1110 Fix flappy MultiCfQueryExecIT

[jtaylor] PHOENIX-1109 PhoenixTestDriver needs to call shutdown on executor (SamarthJain)

[jtaylor] Additonal query more tests (SamarthJain)

[jtaylor] Additonal tests for IN list (KyleBuzsaki)



Apache-Phoenix | Master | Hadoop1 | Build Successful

2014-07-24 Thread Apache Jenkins Server
Master branch build status Successful
Source repository https://git-wip-us.apache.org/repos/asf/incubator-phoenix.git

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

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

Changes
[jtaylor] Additonal tests for IN list (KyleBuzsaki)



Apache-Phoenix | 4.0 | Hadoop1 | Build Successful

2014-07-24 Thread Apache Jenkins Server
4.0 branch build status Successful

Source repository https://git-wip-us.apache.org/repos/asf/incubator-phoenix.git

Compiled Artifacts https://builds.apache.org/job/Phoenix-4.0-hadoop1/lastSuccessfulBuild/artifact/

Test Report https://builds.apache.org/job/Phoenix-4.0-hadoop1/lastCompletedBuild/testReport/

Changes
[jtaylor] Additonal tests for IN list (KyleBuzsaki)



Jenkins build is back to normal : Phoenix | Master | Hadoop1 #292

2014-07-24 Thread Apache Jenkins Server
See 



Apache-Phoenix | 4.0 | Hadoop1 | Build Successful

2014-07-24 Thread Apache Jenkins Server
4.0 branch build status Successful

Source repository https://git-wip-us.apache.org/repos/asf/incubator-phoenix.git

Compiled Artifacts https://builds.apache.org/job/Phoenix-4.0-hadoop1/lastSuccessfulBuild/artifact/

Test Report https://builds.apache.org/job/Phoenix-4.0-hadoop1/lastCompletedBuild/testReport/

Changes
[jtaylor] PHOENIX-1109 PhoenixTestDriver needs to call shutdown on executor (SamarthJain)

[jtaylor] Additonal query more tests (SamarthJain)



git commit: Additonal tests for IN list (KyleBuzsaki)

2014-07-24 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.0 efd848828 -> 094513493


Additonal tests for IN list (KyleBuzsaki)


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

Branch: refs/heads/4.0
Commit: 094513493bb9bfcfafc3839a914feb9345a2f667
Parents: efd8488
Author: James Taylor 
Authored: Thu Jul 24 15:32:46 2014 -0700
Committer: James Taylor 
Committed: Thu Jul 24 15:33:36 2014 -0700

--
 .../org/apache/phoenix/end2end/InListIT.java| 199 +++
 1 file changed, 199 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/09451349/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
--
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
index bd9aa1b..9789c46 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
@@ -1,5 +1,6 @@
 package org.apache.phoenix.end2end;
 
+import static java.util.Collections.singletonList;
 import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -8,11 +9,20 @@ import static org.junit.Assert.assertTrue;
 import java.sql.Connection;
 import java.sql.DriverManager;
 import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.Arrays;
+import java.util.List;
 import java.util.Properties;
 
+import org.apache.phoenix.schema.PDataType;
+import org.apache.phoenix.util.PhoenixRuntime;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
+import com.google.common.base.Function;
+import com.google.common.base.Joiner;
+import com.google.common.collect.Lists;
+
 @Category(ClientManagedTimeTest.class)
 public class InListIT extends BaseHBaseManagedTimeIT {
 
@@ -34,6 +44,8 @@ public class InListIT extends BaseHBaseManagedTimeIT {
 assertTrue(rs.next());
 assertEquals("c", rs.getString(1));
 assertFalse(rs.next());
+
+conn.close();
 }
 
 @Test
@@ -50,5 +62,192 @@ public class InListIT extends BaseHBaseManagedTimeIT {
 assertTrue(rs.next());
 assertEquals(1, rs.getInt(1));
 assertFalse(rs.next());
+
+conn.close();
+}
+
+/**
+ * Builds the DDL statement that will create a table with the given 
properties.
+ * Assumes 5 pk columns of the given type.
+ * Adds a non primary key column named "nonPk"
+ * @param tableName  the name to use for the table
+ * @param pkType  the data type of the primary key columns
+ * @param saltBuckets  the number of salt buckets if the table is salted, 
otherwise 0
+ * @param isMultiTenant  whether or not the table needs a tenant_id column
+ * @return  the final DDL statement
+ */
+private static String createTableDDL(String tableName, PDataType pkType, 
int saltBuckets, boolean isMultiTenant) {
+StringBuilder ddlBuilder = new StringBuilder();
+ddlBuilder.append("CREATE TABLE ").append(tableName).append(" ( ");
+
+// column declarations
+if(isMultiTenant) {
+ddlBuilder.append("tenantId VARCHAR(5) NOT NULL, ");
+}
+for(int i = 0; i < 5; i++) {
+ddlBuilder.append("pk").append(i + 1).append(" 
").append(pkType.getSqlTypeName()).append(" NOT NULL, ");
+}
+ddlBuilder.append("nonPk VARCHAR ");
+
+// primary key constraint declaration
+ddlBuilder.append("CONSTRAINT pk PRIMARY KEY (");
+if(isMultiTenant) {
+ddlBuilder.append("tenantId, ");
+}
+ddlBuilder.append("pk1, pk2, pk3, pk4, pk5) ) ");
+
+// modifier declarations
+if(saltBuckets != 0) {
+ddlBuilder.append("SALT_BUCKETS = ").append(saltBuckets);
+}
+if(saltBuckets != 0 && isMultiTenant) {
+ddlBuilder.append(", ");
+}
+if(isMultiTenant) {
+ddlBuilder.append("MULTI_TENANT=true");
+}
+
+return ddlBuilder.toString();
+}
+
+/**
+ * Creates a table with the given properties and returns its name. If the 
table is multi-tenant,
+ * also creates a tenant view for that table and returns the name of the 
view instead.
+ * @param baseConn  a non-tenant specific connection. Used to create the 
base tables
+ * @param conn  a tenant-specific connection, if necessary. Otherwise 
ignored.
+ * @param isMultiTenan

git commit: Additonal tests for IN list (KyleBuzsaki)

2014-07-24 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/master 6057e3e87 -> 2f1ae8092


Additonal tests for IN list (KyleBuzsaki)


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

Branch: refs/heads/master
Commit: 2f1ae80921a10befecf29f796091dc1103e049ea
Parents: 6057e3e
Author: James Taylor 
Authored: Thu Jul 24 15:32:46 2014 -0700
Committer: James Taylor 
Committed: Thu Jul 24 15:33:52 2014 -0700

--
 .../org/apache/phoenix/end2end/InListIT.java| 199 +++
 1 file changed, 199 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/2f1ae809/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
--
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
index bd9aa1b..9789c46 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
@@ -1,5 +1,6 @@
 package org.apache.phoenix.end2end;
 
+import static java.util.Collections.singletonList;
 import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -8,11 +9,20 @@ import static org.junit.Assert.assertTrue;
 import java.sql.Connection;
 import java.sql.DriverManager;
 import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.Arrays;
+import java.util.List;
 import java.util.Properties;
 
+import org.apache.phoenix.schema.PDataType;
+import org.apache.phoenix.util.PhoenixRuntime;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
+import com.google.common.base.Function;
+import com.google.common.base.Joiner;
+import com.google.common.collect.Lists;
+
 @Category(ClientManagedTimeTest.class)
 public class InListIT extends BaseHBaseManagedTimeIT {
 
@@ -34,6 +44,8 @@ public class InListIT extends BaseHBaseManagedTimeIT {
 assertTrue(rs.next());
 assertEquals("c", rs.getString(1));
 assertFalse(rs.next());
+
+conn.close();
 }
 
 @Test
@@ -50,5 +62,192 @@ public class InListIT extends BaseHBaseManagedTimeIT {
 assertTrue(rs.next());
 assertEquals(1, rs.getInt(1));
 assertFalse(rs.next());
+
+conn.close();
+}
+
+/**
+ * Builds the DDL statement that will create a table with the given 
properties.
+ * Assumes 5 pk columns of the given type.
+ * Adds a non primary key column named "nonPk"
+ * @param tableName  the name to use for the table
+ * @param pkType  the data type of the primary key columns
+ * @param saltBuckets  the number of salt buckets if the table is salted, 
otherwise 0
+ * @param isMultiTenant  whether or not the table needs a tenant_id column
+ * @return  the final DDL statement
+ */
+private static String createTableDDL(String tableName, PDataType pkType, 
int saltBuckets, boolean isMultiTenant) {
+StringBuilder ddlBuilder = new StringBuilder();
+ddlBuilder.append("CREATE TABLE ").append(tableName).append(" ( ");
+
+// column declarations
+if(isMultiTenant) {
+ddlBuilder.append("tenantId VARCHAR(5) NOT NULL, ");
+}
+for(int i = 0; i < 5; i++) {
+ddlBuilder.append("pk").append(i + 1).append(" 
").append(pkType.getSqlTypeName()).append(" NOT NULL, ");
+}
+ddlBuilder.append("nonPk VARCHAR ");
+
+// primary key constraint declaration
+ddlBuilder.append("CONSTRAINT pk PRIMARY KEY (");
+if(isMultiTenant) {
+ddlBuilder.append("tenantId, ");
+}
+ddlBuilder.append("pk1, pk2, pk3, pk4, pk5) ) ");
+
+// modifier declarations
+if(saltBuckets != 0) {
+ddlBuilder.append("SALT_BUCKETS = ").append(saltBuckets);
+}
+if(saltBuckets != 0 && isMultiTenant) {
+ddlBuilder.append(", ");
+}
+if(isMultiTenant) {
+ddlBuilder.append("MULTI_TENANT=true");
+}
+
+return ddlBuilder.toString();
+}
+
+/**
+ * Creates a table with the given properties and returns its name. If the 
table is multi-tenant,
+ * also creates a tenant view for that table and returns the name of the 
view instead.
+ * @param baseConn  a non-tenant specific connection. Used to create the 
base tables
+ * @param conn  a tenant-specific connection, if necessary. Otherwise 
ignored.
+ * @param isMult

git commit: Additonal tests for IN list (KyleBuzsaki)

2014-07-24 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/3.0 3b526970b -> e5b1835fb


Additonal tests for IN list (KyleBuzsaki)


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

Branch: refs/heads/3.0
Commit: e5b1835fb928fa5272b9960c6e7812c87e83da45
Parents: 3b52697
Author: James Taylor 
Authored: Thu Jul 24 15:32:46 2014 -0700
Committer: James Taylor 
Committed: Thu Jul 24 15:32:46 2014 -0700

--
 .../org/apache/phoenix/end2end/InListIT.java| 199 +++
 1 file changed, 199 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/e5b1835f/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
--
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
index bd9aa1b..9789c46 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
@@ -1,5 +1,6 @@
 package org.apache.phoenix.end2end;
 
+import static java.util.Collections.singletonList;
 import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -8,11 +9,20 @@ import static org.junit.Assert.assertTrue;
 import java.sql.Connection;
 import java.sql.DriverManager;
 import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.Arrays;
+import java.util.List;
 import java.util.Properties;
 
+import org.apache.phoenix.schema.PDataType;
+import org.apache.phoenix.util.PhoenixRuntime;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
+import com.google.common.base.Function;
+import com.google.common.base.Joiner;
+import com.google.common.collect.Lists;
+
 @Category(ClientManagedTimeTest.class)
 public class InListIT extends BaseHBaseManagedTimeIT {
 
@@ -34,6 +44,8 @@ public class InListIT extends BaseHBaseManagedTimeIT {
 assertTrue(rs.next());
 assertEquals("c", rs.getString(1));
 assertFalse(rs.next());
+
+conn.close();
 }
 
 @Test
@@ -50,5 +62,192 @@ public class InListIT extends BaseHBaseManagedTimeIT {
 assertTrue(rs.next());
 assertEquals(1, rs.getInt(1));
 assertFalse(rs.next());
+
+conn.close();
+}
+
+/**
+ * Builds the DDL statement that will create a table with the given 
properties.
+ * Assumes 5 pk columns of the given type.
+ * Adds a non primary key column named "nonPk"
+ * @param tableName  the name to use for the table
+ * @param pkType  the data type of the primary key columns
+ * @param saltBuckets  the number of salt buckets if the table is salted, 
otherwise 0
+ * @param isMultiTenant  whether or not the table needs a tenant_id column
+ * @return  the final DDL statement
+ */
+private static String createTableDDL(String tableName, PDataType pkType, 
int saltBuckets, boolean isMultiTenant) {
+StringBuilder ddlBuilder = new StringBuilder();
+ddlBuilder.append("CREATE TABLE ").append(tableName).append(" ( ");
+
+// column declarations
+if(isMultiTenant) {
+ddlBuilder.append("tenantId VARCHAR(5) NOT NULL, ");
+}
+for(int i = 0; i < 5; i++) {
+ddlBuilder.append("pk").append(i + 1).append(" 
").append(pkType.getSqlTypeName()).append(" NOT NULL, ");
+}
+ddlBuilder.append("nonPk VARCHAR ");
+
+// primary key constraint declaration
+ddlBuilder.append("CONSTRAINT pk PRIMARY KEY (");
+if(isMultiTenant) {
+ddlBuilder.append("tenantId, ");
+}
+ddlBuilder.append("pk1, pk2, pk3, pk4, pk5) ) ");
+
+// modifier declarations
+if(saltBuckets != 0) {
+ddlBuilder.append("SALT_BUCKETS = ").append(saltBuckets);
+}
+if(saltBuckets != 0 && isMultiTenant) {
+ddlBuilder.append(", ");
+}
+if(isMultiTenant) {
+ddlBuilder.append("MULTI_TENANT=true");
+}
+
+return ddlBuilder.toString();
+}
+
+/**
+ * Creates a table with the given properties and returns its name. If the 
table is multi-tenant,
+ * also creates a tenant view for that table and returns the name of the 
view instead.
+ * @param baseConn  a non-tenant specific connection. Used to create the 
base tables
+ * @param conn  a tenant-specific connection, if necessary. Otherwise 
ignored.
+ * @param isMultiTenan

git commit: Additonal query more tests (SamarthJain)

2014-07-24 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/master 7a16517b4 -> 6057e3e87


Additonal query more tests (SamarthJain)


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

Branch: refs/heads/master
Commit: 6057e3e87ecd6af19607ff20f6441b3fc9332bb9
Parents: 7a16517
Author: James Taylor 
Authored: Thu Jul 24 15:17:07 2014 -0700
Committer: James Taylor 
Committed: Thu Jul 24 15:18:33 2014 -0700

--
 .../org/apache/phoenix/end2end/QueryMoreIT.java | 16 ++--
 1 file changed, 14 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/6057e3e8/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
index e2dd1b8..50b3d47 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
@@ -41,18 +41,30 @@ import com.google.common.collect.Lists;
 @Category(HBaseManagedTimeTest.class)
 public class QueryMoreIT extends BaseHBaseManagedTimeIT {
 
-//Cursor table - salted/non-multi-tenant. Data table - 
salted/multi-tenant. 
+//Data table - multi-tenant = true, salted = true 
 @Test
 public void testQueryMore1() throws Exception {
 testQueryMore(true, true);
 }
 
-//Cursor table - salted/non-multi-tenant. Data table - salted/non 
multi-tenant. 
+//Data table - multi-tenant = false, salted = true 
 @Test
 public void testQueryMore2() throws Exception {
 testQueryMore(false, true);
 }
 
+//Data table - multi-tenant = false, salted = false
+@Test
+public void testQueryMore3() throws Exception {
+testQueryMore(false, false);
+}
+
+//Data table - multi-tenant = true, salted = false 
+@Test
+public void testQueryMore4() throws Exception {
+testQueryMore(true, false);
+}
+
 private void testQueryMore(boolean dataTableMultiTenant, boolean 
dataTableSalted) throws Exception {
 String[] tenantIds = new String[] {"00Dxtenant1", 
"00Dxtenant2", "00Dxtenant3"};
 int numRowsPerTenant = 10;



git commit: Additonal query more tests (SamarthJain)

2014-07-24 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.0 690d8c02e -> efd848828


Additonal query more tests (SamarthJain)


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

Branch: refs/heads/4.0
Commit: efd848828ecc1802fe7b1d9b616851ffb7cdff56
Parents: 690d8c0
Author: James Taylor 
Authored: Thu Jul 24 15:17:07 2014 -0700
Committer: James Taylor 
Committed: Thu Jul 24 15:18:16 2014 -0700

--
 .../org/apache/phoenix/end2end/QueryMoreIT.java | 16 ++--
 1 file changed, 14 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/efd84882/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
index e2dd1b8..50b3d47 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
@@ -41,18 +41,30 @@ import com.google.common.collect.Lists;
 @Category(HBaseManagedTimeTest.class)
 public class QueryMoreIT extends BaseHBaseManagedTimeIT {
 
-//Cursor table - salted/non-multi-tenant. Data table - 
salted/multi-tenant. 
+//Data table - multi-tenant = true, salted = true 
 @Test
 public void testQueryMore1() throws Exception {
 testQueryMore(true, true);
 }
 
-//Cursor table - salted/non-multi-tenant. Data table - salted/non 
multi-tenant. 
+//Data table - multi-tenant = false, salted = true 
 @Test
 public void testQueryMore2() throws Exception {
 testQueryMore(false, true);
 }
 
+//Data table - multi-tenant = false, salted = false
+@Test
+public void testQueryMore3() throws Exception {
+testQueryMore(false, false);
+}
+
+//Data table - multi-tenant = true, salted = false 
+@Test
+public void testQueryMore4() throws Exception {
+testQueryMore(true, false);
+}
+
 private void testQueryMore(boolean dataTableMultiTenant, boolean 
dataTableSalted) throws Exception {
 String[] tenantIds = new String[] {"00Dxtenant1", 
"00Dxtenant2", "00Dxtenant3"};
 int numRowsPerTenant = 10;



git commit: Additonal query more tests (SamarthJain)

2014-07-24 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/3.0 56d92bbd4 -> 3b526970b


Additonal query more tests (SamarthJain)


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

Branch: refs/heads/3.0
Commit: 3b526970b41015f42a139d4f714cb198fe896a2d
Parents: 56d92bb
Author: James Taylor 
Authored: Thu Jul 24 15:17:07 2014 -0700
Committer: James Taylor 
Committed: Thu Jul 24 15:17:07 2014 -0700

--
 .../org/apache/phoenix/end2end/QueryMoreIT.java | 16 ++--
 1 file changed, 14 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/3b526970/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
index e2dd1b8..50b3d47 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
@@ -41,18 +41,30 @@ import com.google.common.collect.Lists;
 @Category(HBaseManagedTimeTest.class)
 public class QueryMoreIT extends BaseHBaseManagedTimeIT {
 
-//Cursor table - salted/non-multi-tenant. Data table - 
salted/multi-tenant. 
+//Data table - multi-tenant = true, salted = true 
 @Test
 public void testQueryMore1() throws Exception {
 testQueryMore(true, true);
 }
 
-//Cursor table - salted/non-multi-tenant. Data table - salted/non 
multi-tenant. 
+//Data table - multi-tenant = false, salted = true 
 @Test
 public void testQueryMore2() throws Exception {
 testQueryMore(false, true);
 }
 
+//Data table - multi-tenant = false, salted = false
+@Test
+public void testQueryMore3() throws Exception {
+testQueryMore(false, false);
+}
+
+//Data table - multi-tenant = true, salted = false 
+@Test
+public void testQueryMore4() throws Exception {
+testQueryMore(true, false);
+}
+
 private void testQueryMore(boolean dataTableMultiTenant, boolean 
dataTableSalted) throws Exception {
 String[] tenantIds = new String[] {"00Dxtenant1", 
"00Dxtenant2", "00Dxtenant3"};
 int numRowsPerTenant = 10;



Apache-Phoenix | 4.0 | Hadoop1 | Build Successful

2014-07-24 Thread Apache Jenkins Server
4.0 branch build status Successful

Source repository https://git-wip-us.apache.org/repos/asf/incubator-phoenix.git

Compiled Artifacts https://builds.apache.org/job/Phoenix-4.0-hadoop1/lastSuccessfulBuild/artifact/

Test Report https://builds.apache.org/job/Phoenix-4.0-hadoop1/lastCompletedBuild/testReport/

Changes
[jtaylor] PHOENIX-1110 Fix flappy MultiCfQueryExecIT



git commit: PHOENIX-1109 PhoenixTestDriver needs to call shutdown on executor (SamarthJain)

2014-07-24 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/master 097312fcd -> 7a16517b4


PHOENIX-1109 PhoenixTestDriver needs to call shutdown on executor (SamarthJain)


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

Branch: refs/heads/master
Commit: 7a16517b4ef5769d0a4506a789db7d859ce44d45
Parents: 097312f
Author: James Taylor 
Authored: Thu Jul 24 15:03:56 2014 -0700
Committer: James Taylor 
Committed: Thu Jul 24 15:07:53 2014 -0700

--
 .../phoenix/end2end/ExecuteStatementsIT.java|  2 +-
 .../apache/phoenix/jdbc/PhoenixTestDriver.java  | 36 +---
 2 files changed, 32 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/7a16517b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExecuteStatementsIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExecuteStatementsIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExecuteStatementsIT.java
index c2bf5c5..0d64f2e 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExecuteStatementsIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExecuteStatementsIT.java
@@ -198,7 +198,7 @@ public class ExecuteStatementsIT extends 
BaseHBaseManagedTimeIT {
 
 // test upsert statement with padding
 String tenantId = getOrganizationId();
-initATableValues(tenantId, getDefaultSplits(tenantId), null, 
nextTimestamp()-1, getUrl());
+initATableValues(tenantId, getDefaultSplits(tenantId), getUrl());
 
 upsert = "UPSERT INTO " + tableName + "(a_id, a_string, b_string) 
" +
 "SELECT A_INTEGER, A_STRING, B_STRING FROM ATABLE WHERE 
a_string = ?";

http://git-wip-us.apache.org/repos/asf/phoenix/blob/7a16517b/phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixTestDriver.java
--
diff --git 
a/phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixTestDriver.java 
b/phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixTestDriver.java
index cfa8c4b..1184fdf 100644
--- a/phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixTestDriver.java
+++ b/phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixTestDriver.java
@@ -20,6 +20,7 @@ package org.apache.phoenix.jdbc;
 import java.sql.SQLException;
 import java.util.Properties;
 
+import javax.annotation.concurrent.GuardedBy;
 import javax.annotation.concurrent.ThreadSafe;
 
 import org.apache.phoenix.end2end.ConnectionQueryServicesTestImpl;
@@ -42,9 +43,16 @@ import org.apache.phoenix.util.ReadOnlyProps;
 @ThreadSafe
 public class PhoenixTestDriver extends PhoenixEmbeddedDriver {
 
+@GuardedBy("this")
 private ConnectionQueryServices connectionQueryServices;
 private final ReadOnlyProps overrideProps;
+
+@GuardedBy("this")
 private final QueryServices queryServices;
+
+//The only place it is modified is under a lock provided by "this". 
+//So ok to have it just as volatile.
+private volatile boolean closed = false;
 
 public PhoenixTestDriver() {
 this.overrideProps = ReadOnlyProps.EMPTY_PROPS;
@@ -58,18 +66,21 @@ public class PhoenixTestDriver extends 
PhoenixEmbeddedDriver {
 }
 
 @Override
-public QueryServices getQueryServices() {
+public synchronized QueryServices getQueryServices() {
+checkClosed();
 return queryServices;
 }
 
 @Override
 public boolean acceptsURL(String url) throws SQLException {
+checkClosed();
 // Accept the url only if test=true attribute set
 return super.acceptsURL(url) && isTestUrl(url);
 }
 
 @Override // public for testing
 public synchronized ConnectionQueryServices 
getConnectionQueryServices(String url, Properties info) throws SQLException {
+checkClosed();
 if (connectionQueryServices != null) { return connectionQueryServices; 
}
 ConnectionInfo connInfo = ConnectionInfo.create(url);
 if (connInfo.isConnectionless()) {
@@ -81,11 +92,26 @@ public class PhoenixTestDriver extends 
PhoenixEmbeddedDriver {
 return connectionQueryServices;
 }
 
+private void checkClosed() {
+if (closed) {
+throw new IllegalStateException("The Phoenix jdbc test driver has 
been closed.");
+}
+}
+
 @Override
 public synchronized void close() throws SQLException {
-connectionQueryServices.close();
-queryServices.close();
+if (closed) {
+return;
+  

Build failed in Jenkins: Phoenix | Master | Hadoop1 #291

2014-07-24 Thread Apache Jenkins Server
See 

Changes:

[jtaylor] PHOENIX-1110 Fix flappy MultiCfQueryExecIT

--
[...truncated 4031 lines...]
at 
org.apache.phoenix.query.BaseTest.ensureTableCreated(BaseTest.java:600)
at org.apache.phoenix.query.BaseTest.initATableValues(BaseTest.java:804)
at org.apache.phoenix.query.BaseTest.initATableValues(BaseTest.java:797)
at org.apache.phoenix.query.BaseTest.initATableValues(BaseTest.java:793)
at 
org.apache.phoenix.end2end.ExecuteStatementsIT.testExecuteStatements(ExecuteStatementsIT.java:57)
Caused by: org.apache.hadoop.hbase.DoNotRetryIOException: 
org.apache.hadoop.hbase.DoNotRetryIOException: ATABLE: Didn't find expected key 
values for table row in metadata row
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at 
org.apache.hadoop.ipc.RemoteException.instantiateException(RemoteException.java:95)
at 
org.apache.hadoop.ipc.RemoteException.unwrapRemoteException(RemoteException.java:79)
at 
org.apache.hadoop.hbase.protobuf.ProtobufUtil.getRemoteException(ProtobufUtil.java:285)
at 
org.apache.hadoop.hbase.protobuf.ProtobufUtil.execService(ProtobufUtil.java:1567)
at 
org.apache.hadoop.hbase.ipc.RegionCoprocessorRpcChannel$1.call(RegionCoprocessorRpcChannel.java:93)
at 
org.apache.hadoop.hbase.ipc.RegionCoprocessorRpcChannel$1.call(RegionCoprocessorRpcChannel.java:90)
at 
org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:114)
at 
org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:90)
at 
org.apache.hadoop.hbase.ipc.RegionCoprocessorRpcChannel.callExecService(RegionCoprocessorRpcChannel.java:96)
at 
org.apache.hadoop.hbase.ipc.CoprocessorRpcChannel.callMethod(CoprocessorRpcChannel.java:51)
at 
org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService$Stub.createTable(MetaDataProtos.java:6694)
at 
org.apache.phoenix.query.ConnectionQueryServicesImpl$4.call(ConnectionQueryServicesImpl.java:1195)
at 
org.apache.phoenix.query.ConnectionQueryServicesImpl$4.call(ConnectionQueryServicesImpl.java:1184)
at org.apache.hadoop.hbase.client.HTable$16.call(HTable.java:1542)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: org.apache.hadoop.hbase.ipc.RemoteWithExtrasException: 
org.apache.hadoop.hbase.DoNotRetryIOException: ATABLE: Didn't find expected key 
values for table row in metadata row
at 
org.apache.phoenix.util.ServerUtil.createIOException(ServerUtil.java:77)
at 
org.apache.phoenix.coprocessor.MetaDataEndpointImpl.createTable(MetaDataEndpointImpl.java:840)
at 
org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService.callMethod(MetaDataProtos.java:6560)
at 
org.apache.hadoop.hbase.regionserver.HRegion.execService(HRegion.java:5639)
at 
org.apache.hadoop.hbase.regionserver.HRegionServer.execServiceOnRegion(HRegionServer.java:3321)
at 
org.apache.hadoop.hbase.regionserver.HRegionServer.execService(HRegionServer.java:3303)
at 
org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:29501)
at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2027)
at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:98)
at 
org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:114)
at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:94)
at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.IllegalStateException: Didn't find expected key values for 
table row in metadata row
at 
org.apache.phoenix.coprocessor.MetaDataEndpointImpl.getTable(MetaDataEndpointImpl.java:584)
at 
org.apache.phoenix.coprocessor.MetaDataEndpointImpl.buildTable(MetaDataEndpointImpl.java:420)
at 
org.apache.phoenix.coprocessor.MetaDataEndpointImpl.loadTable(MetaDataEndpointImpl.java:711)
at 
org.apache.phoenix.coprocessor.MetaDataEndpointImpl.createTable(MetaDataEndpointImpl.java:789)
... 10 more

at org.apache.hadoop.hbase.ipc.RpcClient.call(RpcClient.java:1452)
at 
org.apache.hadoop.hbase.ipc.RpcCl

git commit: PHOENIX-1109 PhoenixTestDriver needs to call shutdown on executor (SamarthJain)

2014-07-24 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.0 d644365ca -> 690d8c02e


PHOENIX-1109 PhoenixTestDriver needs to call shutdown on executor (SamarthJain)


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

Branch: refs/heads/4.0
Commit: 690d8c02e6fbdd618f54e5c4fe913be9358242ad
Parents: d644365
Author: James Taylor 
Authored: Thu Jul 24 15:03:56 2014 -0700
Committer: James Taylor 
Committed: Thu Jul 24 15:04:57 2014 -0700

--
 .../phoenix/end2end/ExecuteStatementsIT.java|  2 +-
 .../apache/phoenix/jdbc/PhoenixTestDriver.java  | 36 +---
 2 files changed, 32 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/690d8c02/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExecuteStatementsIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExecuteStatementsIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExecuteStatementsIT.java
index c2bf5c5..0d64f2e 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExecuteStatementsIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExecuteStatementsIT.java
@@ -198,7 +198,7 @@ public class ExecuteStatementsIT extends 
BaseHBaseManagedTimeIT {
 
 // test upsert statement with padding
 String tenantId = getOrganizationId();
-initATableValues(tenantId, getDefaultSplits(tenantId), null, 
nextTimestamp()-1, getUrl());
+initATableValues(tenantId, getDefaultSplits(tenantId), getUrl());
 
 upsert = "UPSERT INTO " + tableName + "(a_id, a_string, b_string) 
" +
 "SELECT A_INTEGER, A_STRING, B_STRING FROM ATABLE WHERE 
a_string = ?";

http://git-wip-us.apache.org/repos/asf/phoenix/blob/690d8c02/phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixTestDriver.java
--
diff --git 
a/phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixTestDriver.java 
b/phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixTestDriver.java
index cfa8c4b..1184fdf 100644
--- a/phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixTestDriver.java
+++ b/phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixTestDriver.java
@@ -20,6 +20,7 @@ package org.apache.phoenix.jdbc;
 import java.sql.SQLException;
 import java.util.Properties;
 
+import javax.annotation.concurrent.GuardedBy;
 import javax.annotation.concurrent.ThreadSafe;
 
 import org.apache.phoenix.end2end.ConnectionQueryServicesTestImpl;
@@ -42,9 +43,16 @@ import org.apache.phoenix.util.ReadOnlyProps;
 @ThreadSafe
 public class PhoenixTestDriver extends PhoenixEmbeddedDriver {
 
+@GuardedBy("this")
 private ConnectionQueryServices connectionQueryServices;
 private final ReadOnlyProps overrideProps;
+
+@GuardedBy("this")
 private final QueryServices queryServices;
+
+//The only place it is modified is under a lock provided by "this". 
+//So ok to have it just as volatile.
+private volatile boolean closed = false;
 
 public PhoenixTestDriver() {
 this.overrideProps = ReadOnlyProps.EMPTY_PROPS;
@@ -58,18 +66,21 @@ public class PhoenixTestDriver extends 
PhoenixEmbeddedDriver {
 }
 
 @Override
-public QueryServices getQueryServices() {
+public synchronized QueryServices getQueryServices() {
+checkClosed();
 return queryServices;
 }
 
 @Override
 public boolean acceptsURL(String url) throws SQLException {
+checkClosed();
 // Accept the url only if test=true attribute set
 return super.acceptsURL(url) && isTestUrl(url);
 }
 
 @Override // public for testing
 public synchronized ConnectionQueryServices 
getConnectionQueryServices(String url, Properties info) throws SQLException {
+checkClosed();
 if (connectionQueryServices != null) { return connectionQueryServices; 
}
 ConnectionInfo connInfo = ConnectionInfo.create(url);
 if (connInfo.isConnectionless()) {
@@ -81,11 +92,26 @@ public class PhoenixTestDriver extends 
PhoenixEmbeddedDriver {
 return connectionQueryServices;
 }
 
+private void checkClosed() {
+if (closed) {
+throw new IllegalStateException("The Phoenix jdbc test driver has 
been closed.");
+}
+}
+
 @Override
 public synchronized void close() throws SQLException {
-connectionQueryServices.close();
-queryServices.close();
+if (closed) {
+return;
+

git commit: PHOENIX-1109 PhoenixTestDriver needs to call shutdown on executor (SamarthJain)

2014-07-24 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/3.0 b2e4cd0ab -> 56d92bbd4


PHOENIX-1109 PhoenixTestDriver needs to call shutdown on executor (SamarthJain)


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

Branch: refs/heads/3.0
Commit: 56d92bbd4b51e951211569a43c60f52d74230805
Parents: b2e4cd0
Author: James Taylor 
Authored: Thu Jul 24 15:03:56 2014 -0700
Committer: James Taylor 
Committed: Thu Jul 24 15:03:56 2014 -0700

--
 .../phoenix/end2end/ExecuteStatementsIT.java|  2 +-
 .../apache/phoenix/jdbc/PhoenixTestDriver.java  | 36 +---
 2 files changed, 32 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/56d92bbd/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExecuteStatementsIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExecuteStatementsIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExecuteStatementsIT.java
index c2bf5c5..0d64f2e 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExecuteStatementsIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ExecuteStatementsIT.java
@@ -198,7 +198,7 @@ public class ExecuteStatementsIT extends 
BaseHBaseManagedTimeIT {
 
 // test upsert statement with padding
 String tenantId = getOrganizationId();
-initATableValues(tenantId, getDefaultSplits(tenantId), null, 
nextTimestamp()-1, getUrl());
+initATableValues(tenantId, getDefaultSplits(tenantId), getUrl());
 
 upsert = "UPSERT INTO " + tableName + "(a_id, a_string, b_string) 
" +
 "SELECT A_INTEGER, A_STRING, B_STRING FROM ATABLE WHERE 
a_string = ?";

http://git-wip-us.apache.org/repos/asf/phoenix/blob/56d92bbd/phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixTestDriver.java
--
diff --git 
a/phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixTestDriver.java 
b/phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixTestDriver.java
index cfa8c4b..1184fdf 100644
--- a/phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixTestDriver.java
+++ b/phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixTestDriver.java
@@ -20,6 +20,7 @@ package org.apache.phoenix.jdbc;
 import java.sql.SQLException;
 import java.util.Properties;
 
+import javax.annotation.concurrent.GuardedBy;
 import javax.annotation.concurrent.ThreadSafe;
 
 import org.apache.phoenix.end2end.ConnectionQueryServicesTestImpl;
@@ -42,9 +43,16 @@ import org.apache.phoenix.util.ReadOnlyProps;
 @ThreadSafe
 public class PhoenixTestDriver extends PhoenixEmbeddedDriver {
 
+@GuardedBy("this")
 private ConnectionQueryServices connectionQueryServices;
 private final ReadOnlyProps overrideProps;
+
+@GuardedBy("this")
 private final QueryServices queryServices;
+
+//The only place it is modified is under a lock provided by "this". 
+//So ok to have it just as volatile.
+private volatile boolean closed = false;
 
 public PhoenixTestDriver() {
 this.overrideProps = ReadOnlyProps.EMPTY_PROPS;
@@ -58,18 +66,21 @@ public class PhoenixTestDriver extends 
PhoenixEmbeddedDriver {
 }
 
 @Override
-public QueryServices getQueryServices() {
+public synchronized QueryServices getQueryServices() {
+checkClosed();
 return queryServices;
 }
 
 @Override
 public boolean acceptsURL(String url) throws SQLException {
+checkClosed();
 // Accept the url only if test=true attribute set
 return super.acceptsURL(url) && isTestUrl(url);
 }
 
 @Override // public for testing
 public synchronized ConnectionQueryServices 
getConnectionQueryServices(String url, Properties info) throws SQLException {
+checkClosed();
 if (connectionQueryServices != null) { return connectionQueryServices; 
}
 ConnectionInfo connInfo = ConnectionInfo.create(url);
 if (connInfo.isConnectionless()) {
@@ -81,11 +92,26 @@ public class PhoenixTestDriver extends 
PhoenixEmbeddedDriver {
 return connectionQueryServices;
 }
 
+private void checkClosed() {
+if (closed) {
+throw new IllegalStateException("The Phoenix jdbc test driver has 
been closed.");
+}
+}
+
 @Override
 public synchronized void close() throws SQLException {
-connectionQueryServices.close();
-queryServices.close();
+if (closed) {
+return;
+

git commit: PHOENIX-1110 Fix flappy MultiCfQueryExecIT

2014-07-24 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/master 17397dcb8 -> 097312fcd


PHOENIX-1110 Fix flappy MultiCfQueryExecIT


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

Branch: refs/heads/master
Commit: 097312fcd77a301341893ee9f4d9c37909e817a0
Parents: 17397dc
Author: James Taylor 
Authored: Thu Jul 24 14:28:39 2014 -0700
Committer: James Taylor 
Committed: Thu Jul 24 14:40:00 2014 -0700

--
 .../org/apache/phoenix/end2end/ArrayIT.java |  79 ++
 .../end2end/ColumnProjectionOptimizationIT.java |  65 +--
 .../java/org/apache/phoenix/query/BaseTest.java | 109 ---
 3 files changed, 133 insertions(+), 120 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/097312fc/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 47d7265..77eaa2e 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,6 +17,7 @@
  */
 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.TABLE_WITH_ARRAY;
@@ -53,6 +54,84 @@ public class ArrayIT extends BaseClientManagedTimeIT {
 
private static final String SIMPLE_TABLE_WITH_ARRAY = 
"SIMPLE_TABLE_WITH_ARRAY";
 
+private static void initTablesWithArrays(String tenantId, Date date, Long 
ts, 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
+PreparedStatement stmt = conn.prepareStatement(
+"upsert into " +
+"TABLE_WITH_ARRAY(" +
+"ORGANIZATION_ID, " +
+"ENTITY_ID, " +
+"a_string_array, " +
+"B_STRING, " +
+"A_INTEGER, " +
+"A_DATE, " +
+"X_DECIMAL, " +
+"x_long_array, " +
+"X_INTEGER," +
+"a_byte_array," +
+"A_SHORT," +
+"A_FLOAT," +
+"a_double_array," +
+"A_UNSIGNED_FLOAT," +
+"A_UNSIGNED_DOUBLE)" +
+"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
+stmt.setString(1, tenantId);
+stmt.setString(2, ROW1);
+// Need to support primitive
+String[] strArr =  new String[4];
+strArr[0] = "ABC";
+if (useNull) {
+strArr[1] = null;
+} else {
+strArr[1] = "CEDF";
+}
+strArr[2] = "XYZWER";
+strArr[3] = "AB";
+Array array = conn.createArrayOf("VARCHAR", strArr);
+stmt.setArray(3, array);
+stmt.setString(4, B_VALUE);
+stmt.setInt(5, 1);
+stmt.setDate(6, date);
+stmt.setBigDecimal(7, null);
+// Need to support primitive
+Long[] longArr =  new Long[2];
+longArr[0] = 25l;
+longArr[1] = 36l;
+array = conn.createArrayOf("BIGINT", longArr);
+stmt.setArray(8, array);
+stmt.setNull(9, Types.INTEGER);
+// Need to support primitive
+Byte[] byteArr =  new Byte[2];
+byteArr[0] = 25;
+byteArr[1] = 36;
+array = conn.createArrayOf("TINYINT", byteArr);
+stmt.setArray(10, array);
+stmt.setShort(11, (short) 128);
+stmt.setFloat(12, 0.01f);
+// Need to support primitive
+Double[] doubleArr =  new Double[4];
+doubleArr[0] = 25.343;
+doubleArr[1] = 36.763;
+doubleArr[2] = 37.56;
+doubleArr[3] = 386.63;
+array = conn.createArrayOf("DOUBLE", doubleArr);
+

git commit: PHOENIX-1110 Fix flappy MultiCfQueryExecIT

2014-07-24 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.0 3e77dcc55 -> d644365ca


PHOENIX-1110 Fix flappy MultiCfQueryExecIT


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

Branch: refs/heads/4.0
Commit: d644365ca1f2c28938b576fa140de82e31fc6d1e
Parents: 3e77dcc
Author: James Taylor 
Authored: Thu Jul 24 14:28:39 2014 -0700
Committer: James Taylor 
Committed: Thu Jul 24 14:37:49 2014 -0700

--
 .../org/apache/phoenix/end2end/ArrayIT.java |  79 ++
 .../end2end/ColumnProjectionOptimizationIT.java |  65 +--
 .../java/org/apache/phoenix/query/BaseTest.java | 109 ---
 3 files changed, 133 insertions(+), 120 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/d644365c/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 47d7265..77eaa2e 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,6 +17,7 @@
  */
 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.TABLE_WITH_ARRAY;
@@ -53,6 +54,84 @@ public class ArrayIT extends BaseClientManagedTimeIT {
 
private static final String SIMPLE_TABLE_WITH_ARRAY = 
"SIMPLE_TABLE_WITH_ARRAY";
 
+private static void initTablesWithArrays(String tenantId, Date date, Long 
ts, 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
+PreparedStatement stmt = conn.prepareStatement(
+"upsert into " +
+"TABLE_WITH_ARRAY(" +
+"ORGANIZATION_ID, " +
+"ENTITY_ID, " +
+"a_string_array, " +
+"B_STRING, " +
+"A_INTEGER, " +
+"A_DATE, " +
+"X_DECIMAL, " +
+"x_long_array, " +
+"X_INTEGER," +
+"a_byte_array," +
+"A_SHORT," +
+"A_FLOAT," +
+"a_double_array," +
+"A_UNSIGNED_FLOAT," +
+"A_UNSIGNED_DOUBLE)" +
+"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
+stmt.setString(1, tenantId);
+stmt.setString(2, ROW1);
+// Need to support primitive
+String[] strArr =  new String[4];
+strArr[0] = "ABC";
+if (useNull) {
+strArr[1] = null;
+} else {
+strArr[1] = "CEDF";
+}
+strArr[2] = "XYZWER";
+strArr[3] = "AB";
+Array array = conn.createArrayOf("VARCHAR", strArr);
+stmt.setArray(3, array);
+stmt.setString(4, B_VALUE);
+stmt.setInt(5, 1);
+stmt.setDate(6, date);
+stmt.setBigDecimal(7, null);
+// Need to support primitive
+Long[] longArr =  new Long[2];
+longArr[0] = 25l;
+longArr[1] = 36l;
+array = conn.createArrayOf("BIGINT", longArr);
+stmt.setArray(8, array);
+stmt.setNull(9, Types.INTEGER);
+// Need to support primitive
+Byte[] byteArr =  new Byte[2];
+byteArr[0] = 25;
+byteArr[1] = 36;
+array = conn.createArrayOf("TINYINT", byteArr);
+stmt.setArray(10, array);
+stmt.setShort(11, (short) 128);
+stmt.setFloat(12, 0.01f);
+// Need to support primitive
+Double[] doubleArr =  new Double[4];
+doubleArr[0] = 25.343;
+doubleArr[1] = 36.763;
+doubleArr[2] = 37.56;
+doubleArr[3] = 386.63;
+array = conn.createArrayOf("DOUBLE", doubleArr);
+st

git commit: PHOENIX-1110 Fix flappy MultiCfQueryExecIT

2014-07-24 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/3.0 d38c9f99a -> b2e4cd0ab


PHOENIX-1110 Fix flappy MultiCfQueryExecIT


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

Branch: refs/heads/3.0
Commit: b2e4cd0ab78f247645507e4a1bff30376421d339
Parents: d38c9f9
Author: James Taylor 
Authored: Thu Jul 24 14:28:39 2014 -0700
Committer: James Taylor 
Committed: Thu Jul 24 14:28:39 2014 -0700

--
 .../end2end/ColumnProjectionOptimizationIT.java | 65 
 .../java/org/apache/phoenix/query/BaseTest.java | 30 -
 2 files changed, 54 insertions(+), 41 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/b2e4cd0a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ColumnProjectionOptimizationIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ColumnProjectionOptimizationIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ColumnProjectionOptimizationIT.java
index ccdc7b7..f0f8a65 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ColumnProjectionOptimizationIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ColumnProjectionOptimizationIT.java
@@ -23,6 +23,7 @@ import static org.apache.phoenix.util.TestUtil.C_VALUE;
 import static org.apache.phoenix.util.TestUtil.E_VALUE;
 import static org.apache.phoenix.util.TestUtil.MDTEST_NAME;
 import static org.apache.phoenix.util.TestUtil.MDTEST_SCHEMA_NAME;
+import static org.apache.phoenix.util.TestUtil.MULTI_CF_NAME;
 import static org.apache.phoenix.util.TestUtil.ROW1;
 import static org.apache.phoenix.util.TestUtil.ROW2;
 import static org.apache.phoenix.util.TestUtil.ROW3;
@@ -309,18 +310,60 @@ public class ColumnProjectionOptimizationIT extends 
BaseClientManagedTimeIT {
 }
 }
 
+
+private static void initMultiCFTable(long ts) throws Exception {
+String url = getUrl();
+ensureTableCreated(url, MULTI_CF_NAME, ts);
+
+Properties props = new Properties();
+props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts 
+ 2));
+Connection conn = DriverManager.getConnection(url, props);
+try {
+PreparedStatement stmt = conn.prepareStatement(
+"upsert into " +
+"MULTI_CF(" +
+"id, " +
+"a.unique_user_count, " +
+"b.unique_org_count, " +
+"c.db_cpu_utilization) " +
+"VALUES (?, ?, ?, ?)");
+stmt.setString(1, "id1");
+stmt.setInt(2, 1);
+stmt.setInt(3, 1);
+stmt.setBigDecimal(4, BigDecimal.valueOf(40.1));
+stmt.execute();
+
+stmt.setString(1, "id2");
+stmt.setInt(2, 2);
+stmt.setInt(3, 2);
+stmt.setBigDecimal(4, BigDecimal.valueOf(20.9));
+stmt.execute();
+conn.commit();
+} finally {
+conn.close();
+}
+}
+
 @Test
 public void testSelectWithConditionOnMultiCF() throws Exception {
-initMultiCFTable(getUrl());
-Connection conn = DriverManager.getConnection(getUrl());
-String query = "SELECT c.db_cpu_utilization FROM MULTI_CF WHERE 
a.unique_user_count = ? and b.unique_org_count = ?";
-PreparedStatement statement = conn.prepareStatement(query);
-statement.setInt(1, 1);
-statement.setInt(2, 1);
-ResultSet rs = statement.executeQuery();
-boolean b = rs.next();
-assertTrue(b);
-assertEquals(BigDecimal.valueOf(40.1), rs.getBigDecimal(1));
-assertFalse(rs.next());
+long ts = nextTimestamp();
+initMultiCFTable(ts);
+
+Properties props = new Properties();
+props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts 
+ 5));
+Connection conn = DriverManager.getConnection(getUrl(), props);
+try {
+String query = "SELECT c.db_cpu_utilization FROM MULTI_CF WHERE 
a.unique_user_count = ? and b.unique_org_count = ?";
+PreparedStatement statement = conn.prepareStatement(query);
+statement.setInt(1, 1);
+statement.setInt(2, 1);
+ResultSet rs = statement.executeQuery();
+boolean b = rs.next();
+assertTrue(b);
+assertEquals(BigDecimal.valueOf(40.1), rs.getBigDecimal(1));
+assertFalse(rs.next());
+} finally {
+conn.close();
+}
 }
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blo

Jenkins build is back to normal : Phoenix | 4.0 | Hadoop1 #221

2014-07-24 Thread Apache Jenkins Server
See 



Build failed in Jenkins: Phoenix | Master | Hadoop1 #290

2014-07-24 Thread Apache Jenkins Server
See 

Changes:

[jtaylor] PHOENIX-1083 IN list of RVC combined with AND doesn't return expected 
rows

--
[...truncated 512 lines...]
at 
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:238)
at 
org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:54)
at 
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:237)
at 
org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:191)
at 
org.apache.phoenix.jdbc.PhoenixPreparedStatement.execute(PhoenixPreparedStatement.java:147)
at 
org.apache.phoenix.jdbc.PhoenixPreparedStatement.execute(PhoenixPreparedStatement.java:152)
at 
org.apache.phoenix.end2end.MultiCfQueryExecIT.initTableValues(MultiCfQueryExecIT.java:66)
at 
org.apache.phoenix.end2end.MultiCfQueryExecIT.testCFToDisambiguate1(MultiCfQueryExecIT.java:144)

testCFToDisambiguate2(org.apache.phoenix.end2end.MultiCfQueryExecIT)  Time 
elapsed: 0.051 sec  <<< ERROR!
org.apache.phoenix.schema.TableNotFoundException: ERROR 1012 (42M03): Table 
undefined. tableName=MULTI_CF
at 
org.apache.phoenix.compile.FromCompiler$BaseColumnResolver.createTableRef(FromCompiler.java:283)
at 
org.apache.phoenix.compile.FromCompiler$SingleTableColumnResolver.(FromCompiler.java:200)
at 
org.apache.phoenix.compile.FromCompiler.getResolverForMutation(FromCompiler.java:173)
at 
org.apache.phoenix.compile.UpsertCompiler.compile(UpsertCompiler.java:210)
at 
org.apache.phoenix.jdbc.PhoenixStatement$ExecutableUpsertStatement.compilePlan(PhoenixStatement.java:438)
at 
org.apache.phoenix.jdbc.PhoenixStatement$ExecutableUpsertStatement.compilePlan(PhoenixStatement.java:429)
at 
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:246)
at 
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:238)
at 
org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:54)
at 
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:237)
at 
org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:191)
at 
org.apache.phoenix.jdbc.PhoenixPreparedStatement.execute(PhoenixPreparedStatement.java:147)
at 
org.apache.phoenix.jdbc.PhoenixPreparedStatement.execute(PhoenixPreparedStatement.java:152)
at 
org.apache.phoenix.end2end.MultiCfQueryExecIT.initTableValues(MultiCfQueryExecIT.java:66)
at 
org.apache.phoenix.end2end.MultiCfQueryExecIT.testCFToDisambiguate2(MultiCfQueryExecIT.java:164)

Running org.apache.phoenix.end2end.GroupByCaseIT
Tests run: 30, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 22.692 sec - 
in org.apache.phoenix.end2end.RowValueConstructorIT
Running org.apache.phoenix.end2end.ToCharFunctionIT
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.38 sec - in 
org.apache.phoenix.end2end.GroupByCaseIT
Running org.apache.phoenix.end2end.salted.SaltedTableVarLengthRowKeyIT
Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.193 sec - in 
org.apache.phoenix.end2end.ToCharFunctionIT
Running org.apache.phoenix.end2end.salted.SaltedTableIT
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.63 sec - in 
org.apache.phoenix.end2end.salted.SaltedTableVarLengthRowKeyIT
Running org.apache.phoenix.end2end.FunkyNamesIT
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.882 sec - in 
org.apache.phoenix.end2end.FunkyNamesIT
Running org.apache.phoenix.end2end.DefaultParallelIteratorsRegionSplitterIT
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.82 sec - in 
org.apache.phoenix.end2end.salted.SaltedTableIT
Running org.apache.phoenix.end2end.TenantSpecificTablesDDLIT
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.367 sec - in 
org.apache.phoenix.end2end.DefaultParallelIteratorsRegionSplitterIT
Running org.apache.phoenix.end2end.ProductMetricsIT
Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 26.889 sec - 
in org.apache.phoenix.end2end.UpsertSelectIT
Running org.apache.phoenix.end2end.ScanQueryIT
Tests run: 61, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 24.053 sec - 
in org.apache.phoenix.end2end.ProductMetricsIT
Running org.apache.phoenix.end2end.ClientTimeArithmeticQueryIT
Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 39.774 sec - 
in org.apache.phoenix.end2end.TenantSpecificTablesDDLIT
Running org.apache.phoenix.end2end.GroupByIT
Tests run: 170, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 112.48 sec - 
in org.apache.phoenix.end2end.CaseStatementIT
Tests run: 210, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 135.804 sec - 
in org.apache.phoenix.end2end.ScanQueryIT
Tests run: 190, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 125.496 sec - 
in o

git commit: PHOENIX-1083 IN list of RVC combined with AND doesn't return expected rows

2014-07-24 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/master 1954c717a -> 17397dcb8


PHOENIX-1083 IN list of RVC combined with AND doesn't return expected rows


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

Branch: refs/heads/master
Commit: 17397dcb85b0ae8dc0562c9b6ce4ed2a7b4f2eeb
Parents: 1954c71
Author: James Taylor 
Authored: Thu Jul 24 01:31:53 2014 -0700
Committer: James Taylor 
Committed: Thu Jul 24 01:58:42 2014 -0700

--
 .../org/apache/phoenix/end2end/InListIT.java|  54 +++
 .../org/apache/phoenix/end2end/QueryMoreIT.java | 264 +++
 ...ipRangeParallelIteratorRegionSplitterIT.java |   3 +-
 .../phoenix/end2end/index/IndexHandlerIT.java   |   2 +-
 .../hbase/ipc/PhoenixIndexRpcScheduler.java |   7 +-
 .../org/apache/phoenix/compile/ScanRanges.java  |  33 +-
 .../apache/phoenix/compile/WhereOptimizer.java  | 325 +--
 .../apache/phoenix/filter/SkipScanFilter.java   |   5 +-
 .../phoenix/index/PhoenixIndexBuilder.java  |   3 +-
 .../java/org/apache/phoenix/query/KeyRange.java |  21 ++
 .../java/org/apache/phoenix/util/IndexUtil.java |   2 +-
 .../java/org/apache/phoenix/util/ScanUtil.java  |  47 ++-
 .../PhoenixIndexRpcSchedulerFactoryTest.java|   2 +-
 .../apache/phoenix/compile/ScanRangesTest.java  |   3 +-
 .../phoenix/compile/WhereOptimizerTest.java |  72 +++-
 .../org/apache/phoenix/util/ScanUtilTest.java   |   2 +-
 16 files changed, 710 insertions(+), 135 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/17397dcb/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
--
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
new file mode 100644
index 000..bd9aa1b
--- /dev/null
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
@@ -0,0 +1,54 @@
+package org.apache.phoenix.end2end;
+
+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 java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.util.Properties;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+@Category(ClientManagedTimeTest.class)
+public class InListIT extends BaseHBaseManagedTimeIT {
+
+@Test
+public void testLeadingPKWithTrailingRVC() throws Exception {
+Properties props = new Properties(TEST_PROPERTIES);
+Connection conn = DriverManager.getConnection(getUrl(), props);
+conn.createStatement().execute("CREATE TABLE in_test "
++ "( col1 VARCHAR NOT NULL,"
++ "  col2 VARCHAR NOT NULL, "
++ "  id VARCHAR NOT NULL,"
++ "  CONSTRAINT pk PRIMARY KEY (col1, col2, id))");
+
+conn.createStatement().execute("upsert into in_test (col1, col2, id) 
values ('a', 'b', 'c')");
+conn.createStatement().execute("upsert into in_test (col1, col2, id) 
values ('a', 'b', 'd')");
+conn.commit();
+
+ResultSet rs = conn.createStatement().executeQuery("select id from 
in_test WHERE col1 = 'a' and ((col2, id) IN (('b', 'c'),('b', 'e')))");
+assertTrue(rs.next());
+assertEquals("c", rs.getString(1));
+assertFalse(rs.next());
+}
+
+@Test
+public void testLeadingPKWithTrailingRVC2() throws Exception {
+Properties props = new Properties(TEST_PROPERTIES);
+Connection conn = DriverManager.getConnection(getUrl(), props);
+conn.createStatement().execute("CREATE TABLE in_test ( user VARCHAR, 
tenant_id VARCHAR(5) NOT NULL,tenant_type_id VARCHAR(3) NOT NULL,  id INTEGER 
NOT NULL CONSTRAINT pk PRIMARY KEY (tenant_id, tenant_type_id, id))");
+
+conn.createStatement().execute("upsert into in_test (tenant_id, 
tenant_type_id, id, user) values ('a', 'a', 1, 'BonA')");
+conn.createStatement().execute("upsert into in_test (tenant_id, 
tenant_type_id, id, user) values ('a', 'a', 2, 'BonB')");
+conn.commit();
+
+ResultSet rs = conn.createStatement().executeQuery("select id from 
in_test WHERE tenant_id = 'a' and tenant_type_id = 'a' and ((id, user) IN ((1, 
'BonA'),(1, 'BonB')))");
+assertTrue(rs.next());
+assertEquals(1, rs.getInt(1));
+assertFalse(rs.next());
+}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/phoenix/blob/17397dcb/phoenix-core/src/it/java/org/apache/phoenix/end2

git commit: PHOENIX-1083 IN list of RVC combined with AND doesn't return expected rows

2014-07-24 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.0 463dabdcb -> 3e77dcc55


PHOENIX-1083 IN list of RVC combined with AND doesn't return expected rows


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

Branch: refs/heads/4.0
Commit: 3e77dcc5533f3ee7db1bd373057908059ea25fad
Parents: 463dabd
Author: James Taylor 
Authored: Thu Jul 24 01:31:53 2014 -0700
Committer: James Taylor 
Committed: Thu Jul 24 01:49:51 2014 -0700

--
 .../org/apache/phoenix/end2end/InListIT.java|  54 +++
 .../org/apache/phoenix/end2end/QueryMoreIT.java | 264 +++
 ...ipRangeParallelIteratorRegionSplitterIT.java |   3 +-
 .../phoenix/end2end/index/IndexHandlerIT.java   |   2 +-
 .../hbase/ipc/PhoenixIndexRpcScheduler.java |   7 +-
 .../org/apache/phoenix/compile/ScanRanges.java  |  33 +-
 .../apache/phoenix/compile/WhereOptimizer.java  | 325 +--
 .../apache/phoenix/filter/SkipScanFilter.java   |   5 +-
 .../phoenix/index/PhoenixIndexBuilder.java  |   3 +-
 .../java/org/apache/phoenix/query/KeyRange.java |  21 ++
 .../java/org/apache/phoenix/util/IndexUtil.java |   2 +-
 .../java/org/apache/phoenix/util/ScanUtil.java  |  47 ++-
 .../PhoenixIndexRpcSchedulerFactoryTest.java|   2 +-
 .../apache/phoenix/compile/ScanRangesTest.java  |   3 +-
 .../phoenix/compile/WhereOptimizerTest.java |  72 +++-
 .../org/apache/phoenix/util/ScanUtilTest.java   |   2 +-
 16 files changed, 710 insertions(+), 135 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/3e77dcc5/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
--
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
new file mode 100644
index 000..bd9aa1b
--- /dev/null
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
@@ -0,0 +1,54 @@
+package org.apache.phoenix.end2end;
+
+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 java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.util.Properties;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+@Category(ClientManagedTimeTest.class)
+public class InListIT extends BaseHBaseManagedTimeIT {
+
+@Test
+public void testLeadingPKWithTrailingRVC() throws Exception {
+Properties props = new Properties(TEST_PROPERTIES);
+Connection conn = DriverManager.getConnection(getUrl(), props);
+conn.createStatement().execute("CREATE TABLE in_test "
++ "( col1 VARCHAR NOT NULL,"
++ "  col2 VARCHAR NOT NULL, "
++ "  id VARCHAR NOT NULL,"
++ "  CONSTRAINT pk PRIMARY KEY (col1, col2, id))");
+
+conn.createStatement().execute("upsert into in_test (col1, col2, id) 
values ('a', 'b', 'c')");
+conn.createStatement().execute("upsert into in_test (col1, col2, id) 
values ('a', 'b', 'd')");
+conn.commit();
+
+ResultSet rs = conn.createStatement().executeQuery("select id from 
in_test WHERE col1 = 'a' and ((col2, id) IN (('b', 'c'),('b', 'e')))");
+assertTrue(rs.next());
+assertEquals("c", rs.getString(1));
+assertFalse(rs.next());
+}
+
+@Test
+public void testLeadingPKWithTrailingRVC2() throws Exception {
+Properties props = new Properties(TEST_PROPERTIES);
+Connection conn = DriverManager.getConnection(getUrl(), props);
+conn.createStatement().execute("CREATE TABLE in_test ( user VARCHAR, 
tenant_id VARCHAR(5) NOT NULL,tenant_type_id VARCHAR(3) NOT NULL,  id INTEGER 
NOT NULL CONSTRAINT pk PRIMARY KEY (tenant_id, tenant_type_id, id))");
+
+conn.createStatement().execute("upsert into in_test (tenant_id, 
tenant_type_id, id, user) values ('a', 'a', 1, 'BonA')");
+conn.createStatement().execute("upsert into in_test (tenant_id, 
tenant_type_id, id, user) values ('a', 'a', 2, 'BonB')");
+conn.commit();
+
+ResultSet rs = conn.createStatement().executeQuery("select id from 
in_test WHERE tenant_id = 'a' and tenant_type_id = 'a' and ((id, user) IN ((1, 
'BonA'),(1, 'BonB')))");
+assertTrue(rs.next());
+assertEquals(1, rs.getInt(1));
+assertFalse(rs.next());
+}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/phoenix/blob/3e77dcc5/phoenix-core/src/it/java/org/apache/phoenix/end2end/Qu

git commit: PHOENIX-1083 IN list of RVC combined with AND doesn't return expected rows

2014-07-24 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/3.0 f714932f0 -> d38c9f99a


PHOENIX-1083 IN list of RVC combined with AND doesn't return expected rows


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

Branch: refs/heads/3.0
Commit: d38c9f99a66f9beb97b43ec8974e9c1ffd1025f0
Parents: f714932
Author: James Taylor 
Authored: Thu Jul 24 01:31:53 2014 -0700
Committer: James Taylor 
Committed: Thu Jul 24 01:31:53 2014 -0700

--
 .../org/apache/phoenix/end2end/InListIT.java|  54 +++
 .../org/apache/phoenix/end2end/QueryMoreIT.java | 264 +++
 ...ipRangeParallelIteratorRegionSplitterIT.java |   3 +-
 .../org/apache/phoenix/compile/ScanRanges.java  |  33 +-
 .../apache/phoenix/compile/WhereOptimizer.java  | 325 +--
 .../apache/phoenix/filter/SkipScanFilter.java   |   5 +-
 .../phoenix/index/PhoenixIndexBuilder.java  |   7 +-
 .../java/org/apache/phoenix/query/KeyRange.java |  21 ++
 .../java/org/apache/phoenix/util/IndexUtil.java |   2 +-
 .../java/org/apache/phoenix/util/ScanUtil.java  |  47 ++-
 .../apache/phoenix/compile/ScanRangesTest.java  |   3 +-
 .../phoenix/compile/WhereOptimizerTest.java |  72 +++-
 .../org/apache/phoenix/util/ScanUtilTest.java   |   2 +-
 13 files changed, 709 insertions(+), 129 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/d38c9f99/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
--
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
new file mode 100644
index 000..bd9aa1b
--- /dev/null
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/InListIT.java
@@ -0,0 +1,54 @@
+package org.apache.phoenix.end2end;
+
+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 java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.util.Properties;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+@Category(ClientManagedTimeTest.class)
+public class InListIT extends BaseHBaseManagedTimeIT {
+
+@Test
+public void testLeadingPKWithTrailingRVC() throws Exception {
+Properties props = new Properties(TEST_PROPERTIES);
+Connection conn = DriverManager.getConnection(getUrl(), props);
+conn.createStatement().execute("CREATE TABLE in_test "
++ "( col1 VARCHAR NOT NULL,"
++ "  col2 VARCHAR NOT NULL, "
++ "  id VARCHAR NOT NULL,"
++ "  CONSTRAINT pk PRIMARY KEY (col1, col2, id))");
+
+conn.createStatement().execute("upsert into in_test (col1, col2, id) 
values ('a', 'b', 'c')");
+conn.createStatement().execute("upsert into in_test (col1, col2, id) 
values ('a', 'b', 'd')");
+conn.commit();
+
+ResultSet rs = conn.createStatement().executeQuery("select id from 
in_test WHERE col1 = 'a' and ((col2, id) IN (('b', 'c'),('b', 'e')))");
+assertTrue(rs.next());
+assertEquals("c", rs.getString(1));
+assertFalse(rs.next());
+}
+
+@Test
+public void testLeadingPKWithTrailingRVC2() throws Exception {
+Properties props = new Properties(TEST_PROPERTIES);
+Connection conn = DriverManager.getConnection(getUrl(), props);
+conn.createStatement().execute("CREATE TABLE in_test ( user VARCHAR, 
tenant_id VARCHAR(5) NOT NULL,tenant_type_id VARCHAR(3) NOT NULL,  id INTEGER 
NOT NULL CONSTRAINT pk PRIMARY KEY (tenant_id, tenant_type_id, id))");
+
+conn.createStatement().execute("upsert into in_test (tenant_id, 
tenant_type_id, id, user) values ('a', 'a', 1, 'BonA')");
+conn.createStatement().execute("upsert into in_test (tenant_id, 
tenant_type_id, id, user) values ('a', 'a', 2, 'BonB')");
+conn.commit();
+
+ResultSet rs = conn.createStatement().executeQuery("select id from 
in_test WHERE tenant_id = 'a' and tenant_type_id = 'a' and ((id, user) IN ((1, 
'BonA'),(1, 'BonB')))");
+assertTrue(rs.next());
+assertEquals(1, rs.getInt(1));
+assertFalse(rs.next());
+}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d38c9f99/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java 
b/ph