git commit: PHOENIX-1104 Do not shutdown threadpool when initialization fails - added comment

2014-07-22 Thread mujtaba
Repository: phoenix
Updated Branches:
  refs/heads/4.0 ffe84c1dd - 6e523cfa9


PHOENIX-1104 Do not shutdown threadpool when initialization fails - added 
comment


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

Branch: refs/heads/4.0
Commit: 6e523cfa9a0fcbbd09b9676286cc89a30af34c2e
Parents: ffe84c1
Author: Mujtaba mujt...@apache.org
Authored: Tue Jul 22 10:13:58 2014 -0700
Committer: Mujtaba mujt...@apache.org
Committed: Tue Jul 22 10:13:58 2014 -0700

--
 .../main/java/org/apache/phoenix/query/BaseQueryServicesImpl.java  | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/6e523cfa/phoenix-core/src/main/java/org/apache/phoenix/query/BaseQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/BaseQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/BaseQueryServicesImpl.java
index 1e8fec7..222ea14 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/BaseQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/BaseQueryServicesImpl.java
@@ -69,6 +69,8 @@ public abstract class BaseQueryServicesImpl implements 
QueryServices {
 
 @Override
 public void close() {
+// Do not shutdown the executor as it prevents the Driver from being 
able
+// to attempt to open a connection in the future.
 }
 
 @Override



git commit: PHOENIX-1102 Query Finds No Rows When Using Multiple Column Families in where clause. (Anoop)

2014-07-22 Thread anoopsamjohn
Repository: phoenix
Updated Branches:
  refs/heads/4.0 6e523cfa9 - 3049fe222


PHOENIX-1102 Query Finds No Rows When Using Multiple Column Families in where 
clause. (Anoop)


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

Branch: refs/heads/4.0
Commit: 3049fe222796154ce71c3d79d0419874471d26f1
Parents: 6e523cf
Author: anoopsjohn anoopsamj...@gmail.com
Authored: Tue Jul 22 22:50:28 2014 +0530
Committer: anoopsjohn anoopsamj...@gmail.com
Committed: Tue Jul 22 22:50:28 2014 +0530

--
 .../end2end/ColumnProjectionOptimizationIT.java | 16 +
 .../MultiCFCQKeyValueComparisonFilter.java  | 19 +--
 .../filter/MultiCQKeyValueComparisonFilter.java | 19 ---
 .../filter/MultiKeyValueComparisonFilter.java   | 11 +++
 .../java/org/apache/phoenix/query/BaseTest.java | 34 ++--
 5 files changed, 66 insertions(+), 33 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/3049fe22/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 9261125..0f8f54a 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
@@ -37,6 +37,7 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
+import java.math.BigDecimal;
 import java.sql.Connection;
 import java.sql.DriverManager;
 import java.sql.PreparedStatement;
@@ -308,4 +309,19 @@ public class ColumnProjectionOptimizationIT extends 
BaseClientManagedTimeIT {
 admin.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());
+}
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/3049fe22/phoenix-core/src/main/java/org/apache/phoenix/filter/MultiCFCQKeyValueComparisonFilter.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/filter/MultiCFCQKeyValueComparisonFilter.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/filter/MultiCFCQKeyValueComparisonFilter.java
index 71aff46..9147f1a 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/filter/MultiCFCQKeyValueComparisonFilter.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/filter/MultiCFCQKeyValueComparisonFilter.java
@@ -18,12 +18,10 @@
 package org.apache.phoenix.filter;
 
 import java.io.IOException;
-import java.util.TreeSet;
 
 import org.apache.hadoop.hbase.exceptions.DeserializationException;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.Writables;
-
 import org.apache.phoenix.expression.Expression;
 
 
@@ -31,13 +29,12 @@ import org.apache.phoenix.expression.Expression;
  *
  * Filter that evaluates WHERE clause expression, used in the case where there
  * are references to multiple column qualifiers over multiple column families.
- *
+ * Also there same qualifier names in different families.
  * 
  * @since 0.1
  */
 public class MultiCFCQKeyValueComparisonFilter extends 
MultiKeyValueComparisonFilter {
 private final ImmutablePairBytesPtr ptr = new ImmutablePairBytesPtr();
-private TreeSetbyte[] cfSet;
 
 public MultiCFCQKeyValueComparisonFilter() {
 }
@@ -47,12 +44,6 @@ public class MultiCFCQKeyValueComparisonFilter extends 
MultiKeyValueComparisonFi
 }
 
 @Override
-protected void init() {
-cfSet = new TreeSetbyte[](Bytes.BYTES_COMPARATOR);
-super.init();
-}
-
-@Override
 protected Object setColumnKey(byte[] cf, int cfOffset, int cfLength,
 byte[] cq, int cqOffset, int cqLength) {
 ptr.set(cf, cfOffset, cfLength, cq, cqOffset, cqLength);
@@ -125,14 +116,6 

git commit: PHOENIX-1102 Query Finds No Rows When Using Multiple Column Families in where clause. (Anoop)

2014-07-22 Thread anoopsamjohn
Repository: phoenix
Updated Branches:
  refs/heads/3.0 38de8fd56 - 343d9262c


PHOENIX-1102 Query Finds No Rows When Using Multiple Column Families in where 
clause. (Anoop)


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

Branch: refs/heads/3.0
Commit: 343d9262cda3a10461bb301ee0089e6df3867d99
Parents: 38de8fd
Author: anoopsjohn anoopsamj...@gmail.com
Authored: Tue Jul 22 22:51:49 2014 +0530
Committer: anoopsjohn anoopsamj...@gmail.com
Committed: Tue Jul 22 22:51:49 2014 +0530

--
 .../end2end/ColumnProjectionOptimizationIT.java | 16 +++
 .../MultiCFCQKeyValueComparisonFilter.java  | 20 +
 .../filter/MultiCQKeyValueComparisonFilter.java | 19 -
 .../filter/MultiKeyValueComparisonFilter.java   | 11 +++
 .../java/org/apache/phoenix/query/BaseTest.java | 30 
 5 files changed, 64 insertions(+), 32 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/343d9262/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 6fe7aec..ccdc7b7 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
@@ -37,6 +37,7 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
+import java.math.BigDecimal;
 import java.sql.Connection;
 import java.sql.DriverManager;
 import java.sql.PreparedStatement;
@@ -307,4 +308,19 @@ public class ColumnProjectionOptimizationIT extends 
BaseClientManagedTimeIT {
 admin.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());
+}
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/343d9262/phoenix-core/src/main/java/org/apache/phoenix/filter/MultiCFCQKeyValueComparisonFilter.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/filter/MultiCFCQKeyValueComparisonFilter.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/filter/MultiCFCQKeyValueComparisonFilter.java
index 4f0e0eb..0b158c7 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/filter/MultiCFCQKeyValueComparisonFilter.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/filter/MultiCFCQKeyValueComparisonFilter.java
@@ -17,10 +17,7 @@
  */
 package org.apache.phoenix.filter;
 
-import java.util.TreeSet;
-
 import org.apache.hadoop.hbase.util.Bytes;
-
 import org.apache.phoenix.expression.Expression;
 
 
@@ -28,13 +25,12 @@ import org.apache.phoenix.expression.Expression;
  *
  * Filter that evaluates WHERE clause expression, used in the case where there
  * are references to multiple column qualifiers over multiple column families.
- *
+ * Also there same qualifier names in different families.
  * 
  * @since 0.1
  */
 public class MultiCFCQKeyValueComparisonFilter extends 
MultiKeyValueComparisonFilter {
 private final ImmutablePairBytesPtr ptr = new ImmutablePairBytesPtr();
-private TreeSetbyte[] cfSet;
 
 public MultiCFCQKeyValueComparisonFilter() {
 }
@@ -44,12 +40,6 @@ public class MultiCFCQKeyValueComparisonFilter extends 
MultiKeyValueComparisonFi
 }
 
 @Override
-protected void init() {
-cfSet = new TreeSetbyte[](Bytes.BYTES_COMPARATOR);
-super.init();
-}
-
-@Override
 protected Object setColumnKey(byte[] cf, int cfOffset, int cfLength,
 byte[] cq, int cqOffset, int cqLength) {
 ptr.set(cf, cfOffset, cfLength, cq, cqOffset, cqLength);
@@ -121,12 +111,4 @@ public class MultiCFCQKeyValueComparisonFilter extends 
MultiKeyValueComparisonFi
 return true;
 }
 }
-
-
-  

Apache-Phoenix | 3.0 | Hadoop1 | Build Successful

2014-07-22 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
[mujtaba] PHOENIX-1104 Do not shutdown threadpool when initialization fails - added comment



Apache-Phoenix | 3.0 | Hadoop1 | Build Successful

2014-07-22 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
[anoopsamjohn] PHOENIX-1102 Query Finds No Rows When Using Multiple Column Families in where clause. (Anoop)



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

2014-07-22 Thread Apache Jenkins Server
See https://builds.apache.org/job/Phoenix-master-hadoop1/286/changes

Changes:

[mujtaba] PHOENIX-1104 Do not shutdown threadpool when initialization fails - 
added comment

--
[...truncated 196 lines...]
Tests run: 20, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.028 sec - in 
org.apache.phoenix.util.ScanUtilTest
Running org.apache.phoenix.util.Base62EncoderTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec - in 
org.apache.phoenix.util.Base62EncoderTest
Running org.apache.phoenix.util.PhoenixContextExecutorTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec - in 
org.apache.phoenix.util.PhoenixContextExecutorTest
Running org.apache.phoenix.util.LikeExpressionTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec - in 
org.apache.phoenix.util.LikeExpressionTest
Running org.apache.phoenix.util.ByteUtilTest
Tests run: 89, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.329 sec - in 
org.apache.phoenix.compile.WhereOptimizerTest
Running org.apache.phoenix.util.QueryUtilTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.027 sec - in 
org.apache.phoenix.util.ByteUtilTest
Running org.apache.phoenix.util.DateUtilTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec - in 
org.apache.phoenix.util.QueryUtilTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec - in 
org.apache.phoenix.util.DateUtilTest
Running org.apache.phoenix.util.csv.StringToArrayConverterTest
Running org.apache.phoenix.util.csv.CsvUpsertExecutorTest
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.23 sec - in 
org.apache.phoenix.mapreduce.CsvToKeyValueMapperTest
Running org.apache.phoenix.util.PhoenixRuntimeTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.075 sec - in 
org.apache.phoenix.util.PhoenixRuntimeTest
Running org.apache.phoenix.util.ColumnInfoTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec - in 
org.apache.phoenix.util.ColumnInfoTest
Running org.apache.phoenix.util.SequenceUtilTest
Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 sec - in 
org.apache.phoenix.util.SequenceUtilTest
Running org.apache.phoenix.util.PropertiesUtilTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec - in 
org.apache.phoenix.util.PropertiesUtilTest
Running org.apache.phoenix.expression.ColumnExpressionTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec - in 
org.apache.phoenix.expression.ColumnExpressionTest
Running org.apache.phoenix.expression.LikeExpressionTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.097 sec - in 
org.apache.phoenix.util.csv.StringToArrayConverterTest
Running org.apache.phoenix.expression.function.ExternalSqlTypeIdFunctionTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec - in 
org.apache.phoenix.expression.LikeExpressionTest
Running org.apache.phoenix.expression.CoerceExpressionTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec - in 
org.apache.phoenix.expression.function.ExternalSqlTypeIdFunctionTest
Running org.apache.phoenix.expression.SortOrderExpressionTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec - in 
org.apache.phoenix.expression.CoerceExpressionTest
Running org.apache.phoenix.query.HBaseFactoryProviderTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec - in 
org.apache.phoenix.query.HBaseFactoryProviderTest
Running org.apache.phoenix.query.ConnectionlessUpsertTest
Tests run: 24, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.02 sec - in 
org.apache.phoenix.expression.SortOrderExpressionTest
Running org.apache.phoenix.index.IndexMaintainerTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.094 sec - in 
org.apache.phoenix.query.ConnectionlessUpsertTest
Running org.apache.phoenix.filter.SkipScanFilterTest
Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.065 sec - in 
org.apache.phoenix.filter.SkipScanFilterTest
Running org.apache.phoenix.filter.SkipScanFilterIntersectTest
Tests run: 17, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.034 sec - in 
org.apache.phoenix.filter.SkipScanFilterIntersectTest
Running org.apache.phoenix.iterate.AggregateResultScannerTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.337 sec - in 
org.apache.phoenix.util.csv.CsvUpsertExecutorTest
Running org.apache.phoenix.iterate.ConcatResultIteratorTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec - in 
org.apache.phoenix.iterate.ConcatResultIteratorTest
Running org.apache.phoenix.iterate.SpoolingResultIteratorTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.102 sec - in 
org.apache.phoenix.iterate.AggregateResultScannerTest
Running 

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

2014-07-22 Thread Apache Jenkins Server
See https://builds.apache.org/job/Phoenix-master-hadoop1/287/changes



Apache-Phoenix | 4.0 | Hadoop1 | Build Successful

2014-07-22 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
[anoopsamjohn] PHOENIX-1102 Query Finds No Rows When Using Multiple Column Families in where clause. (Anoop)



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

2014-07-22 Thread Apache Jenkins Server
See https://builds.apache.org/job/Phoenix-4.0-hadoop1/218/changes