Apache-Phoenix | 3.0 | Hadoop1 | Build Successful

2014-11-20 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-1466 Prevent multiple scans when query run serially

[jtaylor] PHOENIX-1463 phoenix.query.timeoutMs doesn't work as expected (Samarth Jain)



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

2014-11-20 Thread Apache Jenkins Server
See 



[1/2] phoenix git commit: PHOENIX-1466 Prevent multiple scans when query run serially

2014-11-20 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/3.0 b7cb3c836 -> b6de62c61


PHOENIX-1466 Prevent multiple scans when query run serially

Conflicts:
phoenix-core/src/main/java/org/apache/phoenix/execute/ScanPlan.java

phoenix-core/src/main/java/org/apache/phoenix/iterate/SerialIterators.java

phoenix-core/src/main/java/org/apache/phoenix/iterate/TableResultIterator.java

Conflicts:

phoenix-core/src/main/java/org/apache/phoenix/expression/aggregator/DistinctValueWithCountServerAggregator.java


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

Branch: refs/heads/3.0
Commit: b0dc509330c6455d6facfcd7268722e440c1109c
Parents: b7cb3c8
Author: James Taylor 
Authored: Tue Nov 18 10:37:28 2014 -0800
Committer: James Taylor 
Committed: Thu Nov 20 22:25:25 2014 -0800

--
 .../phoenix/end2end/QueryWithLimitIT.java   | 119 +++
 .../org/apache/phoenix/execute/ScanPlan.java|  80 +++--
 .../DistinctValueWithCountServerAggregator.java |   6 +-
 .../iterate/ParallelIteratorFactory.java|   7 ++
 .../apache/phoenix/iterate/SerialIterators.java |   7 +-
 .../phoenix/iterate/TableResultIterator.java|  44 +--
 6 files changed, 211 insertions(+), 52 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/b0dc5093/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryWithLimitIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryWithLimitIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryWithLimitIT.java
new file mode 100644
index 000..2df9514
--- /dev/null
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryWithLimitIT.java
@@ -0,0 +1,119 @@
+/*
+ * Copyright 2010 The Apache Software Foundation
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ *distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you maynot use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicablelaw or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.phoenix.end2end;
+
+import static org.apache.phoenix.util.TestUtil.KEYONLY_NAME;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.Map;
+import java.util.Properties;
+import java.util.concurrent.RejectedExecutionException;
+
+import org.apache.phoenix.query.QueryServices;
+import org.apache.phoenix.util.PropertiesUtil;
+import org.apache.phoenix.util.QueryUtil;
+import org.apache.phoenix.util.ReadOnlyProps;
+import org.apache.phoenix.util.TestUtil;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import com.google.common.collect.Maps;
+
+@Category(NeedsOwnMiniClusterTest.class)
+public class QueryWithLimitIT extends BaseOwnClusterHBaseManagedTimeIT {
+
+@BeforeClass
+public static void doSetup() throws Exception {
+Map props = Maps.newHashMapWithExpectedSize(3);
+// Must update config before starting server
+props.put(QueryServices.STATS_GUIDEPOST_WIDTH_BYTES_ATTRIB, 
Long.toString(50));
+props.put(QueryServices.QUEUE_SIZE_ATTRIB, Integer.toString(1));
+props.put(QueryServices.DROP_METADATA_ATTRIB, Boolean.TRUE.toString());
+props.put(QueryServices.SEQUENCE_SALT_BUCKETS_ATTRIB, 
Integer.toString(0)); // Prevents RejectedExecutionException when deleting 
sequences
+setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
+}
+
+@Test
+public void testQueryWithLimitAndStats() throws Exception {
+Properties props = PropertiesUtil.deepCopy(TestUtil.TEST_PROPERTIES);
+Connection conn = DriverManager.getConnection(getUrl(), props);
+try {
+ensureTableCreated(getUrl(),KEYONLY_NAME)

[2/2] phoenix git commit: PHOENIX-1463 phoenix.query.timeoutMs doesn't work as expected (Samarth Jain)

2014-11-20 Thread jamestaylor
PHOENIX-1463 phoenix.query.timeoutMs doesn't work as expected (Samarth Jain)


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

Branch: refs/heads/3.0
Commit: b6de62c613fc0dd7eb9b2f70242f5bf965f0b0b7
Parents: b0dc509
Author: James Taylor 
Authored: Thu Nov 20 20:57:22 2014 -0800
Committer: James Taylor 
Committed: Thu Nov 20 22:26:11 2014 -0800

--
 .../phoenix/exception/SQLExceptionCode.java |  1 +
 .../phoenix/iterate/BaseResultIterators.java| 53 ++--
 2 files changed, 38 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/b6de62c6/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java 
b/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java
index 6c86a59..1471830 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java
@@ -287,6 +287,7 @@ public enum SQLExceptionCode {
 OUTDATED_JARS(2007, "INT09", "Outdated jars."),
 INDEX_METADATA_NOT_FOUND(2008, "INT10", "Unable to find cached index 
metadata. "),
 UNKNOWN_ERROR_CODE(2009, "INT11", "Unknown error code"),
+OPERATION_TIMED_OUT(6000, "TIM01", "Operation timed out")
 ;
 
 private final int errorCode;

http://git-wip-us.apache.org/repos/asf/phoenix/blob/b6de62c6/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
index 293063e..0ce7689 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
@@ -33,6 +33,7 @@ import java.util.UUID;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
 
 import org.apache.hadoop.hbase.HRegionInfo;
 import org.apache.hadoop.hbase.HRegionLocation;
@@ -45,6 +46,8 @@ import org.apache.phoenix.compile.QueryPlan;
 import org.apache.phoenix.compile.RowProjector;
 import org.apache.phoenix.compile.ScanRanges;
 import org.apache.phoenix.compile.StatementContext;
+import org.apache.phoenix.exception.SQLExceptionCode;
+import org.apache.phoenix.exception.SQLExceptionInfo;
 import org.apache.phoenix.filter.ColumnProjectionFilter;
 import org.apache.phoenix.hbase.index.util.ImmutableBytesPtr;
 import org.apache.phoenix.parse.FilterableStatement;
@@ -490,20 +493,26 @@ public abstract class BaseResultIterators extends 
ExplainTable implements Result
 final List>>> futures = 
Lists.newArrayListWithExpectedSize(numScans);
 allFutures.add(futures);
 SQLException toThrow = null;
+int queryTimeOut = 
props.getInt(QueryServices.THREAD_TIMEOUT_MS_ATTRIB, DEFAULT_THREAD_TIMEOUT_MS);
+long maxQueryEndTime = System.currentTimeMillis() + queryTimeOut;
 try {
 submitWork(scans, futures, allIterators, splits.size());
-int timeoutMs = 
props.getInt(QueryServices.THREAD_TIMEOUT_MS_ATTRIB, DEFAULT_THREAD_TIMEOUT_MS);
 boolean clearedCache = false;
 for (List>> future : 
reverseIfNecessary(futures,isReverse)) {
 List concatIterators = 
Lists.newArrayListWithExpectedSize(future.size());
 for (Pair> scanPair : 
reverseIfNecessary(future,isReverse)) {
 try {
-PeekingResultIterator iterator = 
scanPair.getSecond().get(timeoutMs, TimeUnit.MILLISECONDS);
+long timeOutForScan = maxQueryEndTime - 
System.currentTimeMillis();
+if (timeOutForScan < 0) {
+throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.OPERATION_TIMED_OUT).setMessage(". 
Query couldn't be completed in the alloted time: " + queryTimeOut + " 
ms").build().buildException(); 
+}
+PeekingResultIterator iterator = 
scanPair.getSecond().get(timeOutForScan, TimeUnit.MILLISECONDS);
 concatIterators.add(iterator);
 } catch (ExecutionException e) {
 try { // Rethrow as SQLException
   

[1/2] phoenix git commit: PHOENIX-1466 Prevent multiple scans when query run serially

2014-11-20 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/3.2 b459c7ec2 -> 7f52d2789


PHOENIX-1466 Prevent multiple scans when query run serially

Conflicts:
phoenix-core/src/main/java/org/apache/phoenix/execute/ScanPlan.java

phoenix-core/src/main/java/org/apache/phoenix/iterate/SerialIterators.java

phoenix-core/src/main/java/org/apache/phoenix/iterate/TableResultIterator.java


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

Branch: refs/heads/3.2
Commit: 42d8a2fba70f3cb083880c25add1e2ddd0843c2b
Parents: b459c7e
Author: James Taylor 
Authored: Tue Nov 18 10:37:28 2014 -0800
Committer: James Taylor 
Committed: Thu Nov 20 22:18:56 2014 -0800

--
 .../phoenix/end2end/QueryWithLimitIT.java   | 119 +++
 .../org/apache/phoenix/execute/ScanPlan.java|  80 +++--
 .../DistinctValueWithCountServerAggregator.java |   5 -
 .../iterate/ParallelIteratorFactory.java|   7 ++
 .../apache/phoenix/iterate/SerialIterators.java |   7 +-
 .../phoenix/iterate/TableResultIterator.java|  44 +--
 6 files changed, 208 insertions(+), 54 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/42d8a2fb/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryWithLimitIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryWithLimitIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryWithLimitIT.java
new file mode 100644
index 000..2df9514
--- /dev/null
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryWithLimitIT.java
@@ -0,0 +1,119 @@
+/*
+ * Copyright 2010 The Apache Software Foundation
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ *distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you maynot use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicablelaw or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.phoenix.end2end;
+
+import static org.apache.phoenix.util.TestUtil.KEYONLY_NAME;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.Map;
+import java.util.Properties;
+import java.util.concurrent.RejectedExecutionException;
+
+import org.apache.phoenix.query.QueryServices;
+import org.apache.phoenix.util.PropertiesUtil;
+import org.apache.phoenix.util.QueryUtil;
+import org.apache.phoenix.util.ReadOnlyProps;
+import org.apache.phoenix.util.TestUtil;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import com.google.common.collect.Maps;
+
+@Category(NeedsOwnMiniClusterTest.class)
+public class QueryWithLimitIT extends BaseOwnClusterHBaseManagedTimeIT {
+
+@BeforeClass
+public static void doSetup() throws Exception {
+Map props = Maps.newHashMapWithExpectedSize(3);
+// Must update config before starting server
+props.put(QueryServices.STATS_GUIDEPOST_WIDTH_BYTES_ATTRIB, 
Long.toString(50));
+props.put(QueryServices.QUEUE_SIZE_ATTRIB, Integer.toString(1));
+props.put(QueryServices.DROP_METADATA_ATTRIB, Boolean.TRUE.toString());
+props.put(QueryServices.SEQUENCE_SALT_BUCKETS_ATTRIB, 
Integer.toString(0)); // Prevents RejectedExecutionException when deleting 
sequences
+setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
+}
+
+@Test
+public void testQueryWithLimitAndStats() throws Exception {
+Properties props = PropertiesUtil.deepCopy(TestUtil.TEST_PROPERTIES);
+Connection conn = DriverManager.getConnection(getUrl(), props);
+try {
+ensureTableCreated(getUrl(),KEYONLY_NAME);
+initTableValues(conn, 100);
+
+String query = "SELECT i1 FROM KEYONLY LIMIT 1";
+Re

[2/2] phoenix git commit: PHOENIX-1463 phoenix.query.timeoutMs doesn't work as expected (Samarth Jain)

2014-11-20 Thread jamestaylor
PHOENIX-1463 phoenix.query.timeoutMs doesn't work as expected (Samarth Jain)


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

Branch: refs/heads/3.2
Commit: 7f52d27892ef8e2856ec0f86cc0f664a5feb3f31
Parents: 42d8a2f
Author: James Taylor 
Authored: Thu Nov 20 20:57:22 2014 -0800
Committer: James Taylor 
Committed: Thu Nov 20 22:19:15 2014 -0800

--
 .../phoenix/exception/SQLExceptionCode.java |  1 +
 .../phoenix/iterate/BaseResultIterators.java| 53 ++--
 2 files changed, 38 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/7f52d278/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java 
b/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java
index 571f0c7..1b9eac6 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java
@@ -286,6 +286,7 @@ public enum SQLExceptionCode {
 OUTDATED_JARS(2007, "INT09", "Outdated jars."),
 INDEX_METADATA_NOT_FOUND(2008, "INT10", "Unable to find cached index 
metadata. "),
 UNKNOWN_ERROR_CODE(2009, "INT11", "Unknown error code"),
+OPERATION_TIMED_OUT(6000, "TIM01", "Operation timed out")
 ;
 
 private final int errorCode;

http://git-wip-us.apache.org/repos/asf/phoenix/blob/7f52d278/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
index 293063e..0ce7689 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
@@ -33,6 +33,7 @@ import java.util.UUID;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
 
 import org.apache.hadoop.hbase.HRegionInfo;
 import org.apache.hadoop.hbase.HRegionLocation;
@@ -45,6 +46,8 @@ import org.apache.phoenix.compile.QueryPlan;
 import org.apache.phoenix.compile.RowProjector;
 import org.apache.phoenix.compile.ScanRanges;
 import org.apache.phoenix.compile.StatementContext;
+import org.apache.phoenix.exception.SQLExceptionCode;
+import org.apache.phoenix.exception.SQLExceptionInfo;
 import org.apache.phoenix.filter.ColumnProjectionFilter;
 import org.apache.phoenix.hbase.index.util.ImmutableBytesPtr;
 import org.apache.phoenix.parse.FilterableStatement;
@@ -490,20 +493,26 @@ public abstract class BaseResultIterators extends 
ExplainTable implements Result
 final List>>> futures = 
Lists.newArrayListWithExpectedSize(numScans);
 allFutures.add(futures);
 SQLException toThrow = null;
+int queryTimeOut = 
props.getInt(QueryServices.THREAD_TIMEOUT_MS_ATTRIB, DEFAULT_THREAD_TIMEOUT_MS);
+long maxQueryEndTime = System.currentTimeMillis() + queryTimeOut;
 try {
 submitWork(scans, futures, allIterators, splits.size());
-int timeoutMs = 
props.getInt(QueryServices.THREAD_TIMEOUT_MS_ATTRIB, DEFAULT_THREAD_TIMEOUT_MS);
 boolean clearedCache = false;
 for (List>> future : 
reverseIfNecessary(futures,isReverse)) {
 List concatIterators = 
Lists.newArrayListWithExpectedSize(future.size());
 for (Pair> scanPair : 
reverseIfNecessary(future,isReverse)) {
 try {
-PeekingResultIterator iterator = 
scanPair.getSecond().get(timeoutMs, TimeUnit.MILLISECONDS);
+long timeOutForScan = maxQueryEndTime - 
System.currentTimeMillis();
+if (timeOutForScan < 0) {
+throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.OPERATION_TIMED_OUT).setMessage(". 
Query couldn't be completed in the alloted time: " + queryTimeOut + " 
ms").build().buildException(); 
+}
+PeekingResultIterator iterator = 
scanPair.getSecond().get(timeOutForScan, TimeUnit.MILLISECONDS);
 concatIterators.add(iterator);
 } catch (ExecutionException e) {
 try { // Rethrow as SQLException
   

[1/2] phoenix git commit: PHOENIX-1466 Prevent multiple scans when query run serially

2014-11-20 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/master 46aa58216 -> b39f44bd9


PHOENIX-1466 Prevent multiple scans when query run serially


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

Branch: refs/heads/master
Commit: 273e83c6e19097e0aa651e05c7d937bdc1dad0d6
Parents: 46aa582
Author: James Taylor 
Authored: Tue Nov 18 10:37:28 2014 -0800
Committer: James Taylor 
Committed: Thu Nov 20 22:10:48 2014 -0800

--
 .../phoenix/end2end/QueryWithLimitIT.java   | 119 +++
 .../org/apache/phoenix/execute/ScanPlan.java|  81 +++--
 .../DistinctValueWithCountServerAggregator.java |   5 -
 .../iterate/ParallelIteratorFactory.java|   7 ++
 .../apache/phoenix/iterate/SerialIterators.java |   9 +-
 .../phoenix/iterate/TableResultIterator.java|  42 +--
 6 files changed, 206 insertions(+), 57 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/273e83c6/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryWithLimitIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryWithLimitIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryWithLimitIT.java
new file mode 100644
index 000..2df9514
--- /dev/null
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryWithLimitIT.java
@@ -0,0 +1,119 @@
+/*
+ * Copyright 2010 The Apache Software Foundation
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ *distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you maynot use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicablelaw or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.phoenix.end2end;
+
+import static org.apache.phoenix.util.TestUtil.KEYONLY_NAME;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.Map;
+import java.util.Properties;
+import java.util.concurrent.RejectedExecutionException;
+
+import org.apache.phoenix.query.QueryServices;
+import org.apache.phoenix.util.PropertiesUtil;
+import org.apache.phoenix.util.QueryUtil;
+import org.apache.phoenix.util.ReadOnlyProps;
+import org.apache.phoenix.util.TestUtil;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import com.google.common.collect.Maps;
+
+@Category(NeedsOwnMiniClusterTest.class)
+public class QueryWithLimitIT extends BaseOwnClusterHBaseManagedTimeIT {
+
+@BeforeClass
+public static void doSetup() throws Exception {
+Map props = Maps.newHashMapWithExpectedSize(3);
+// Must update config before starting server
+props.put(QueryServices.STATS_GUIDEPOST_WIDTH_BYTES_ATTRIB, 
Long.toString(50));
+props.put(QueryServices.QUEUE_SIZE_ATTRIB, Integer.toString(1));
+props.put(QueryServices.DROP_METADATA_ATTRIB, Boolean.TRUE.toString());
+props.put(QueryServices.SEQUENCE_SALT_BUCKETS_ATTRIB, 
Integer.toString(0)); // Prevents RejectedExecutionException when deleting 
sequences
+setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
+}
+
+@Test
+public void testQueryWithLimitAndStats() throws Exception {
+Properties props = PropertiesUtil.deepCopy(TestUtil.TEST_PROPERTIES);
+Connection conn = DriverManager.getConnection(getUrl(), props);
+try {
+ensureTableCreated(getUrl(),KEYONLY_NAME);
+initTableValues(conn, 100);
+
+String query = "SELECT i1 FROM KEYONLY LIMIT 1";
+ResultSet rs = conn.createStatement().executeQuery(query);
+assertTrue(rs.next());
+assertEquals(0, rs.getInt(1));
+assertFalse(rs.next());
+
+rs = conn.createStatement().executeQuery("EXPLAIN " +

[2/2] phoenix git commit: PHOENIX-1463 phoenix.query.timeoutMs doesn't work as expected (Samarth Jain)

2014-11-20 Thread jamestaylor
PHOENIX-1463 phoenix.query.timeoutMs doesn't work as expected (Samarth Jain)


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

Branch: refs/heads/master
Commit: b39f44bd95c56e4e59bf2f189220772fd967c768
Parents: 273e83c
Author: James Taylor 
Authored: Thu Nov 20 20:57:22 2014 -0800
Committer: James Taylor 
Committed: Thu Nov 20 22:10:56 2014 -0800

--
 .../phoenix/exception/SQLExceptionCode.java |  1 +
 .../phoenix/iterate/BaseResultIterators.java| 53 ++--
 2 files changed, 38 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/b39f44bd/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java 
b/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java
index 5c6018d..b776007 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java
@@ -290,6 +290,7 @@ public enum SQLExceptionCode {
 OUTDATED_JARS(2007, "INT09", "Outdated jars."),
 INDEX_METADATA_NOT_FOUND(2008, "INT10", "Unable to find cached index 
metadata. "),
 UNKNOWN_ERROR_CODE(2009, "INT11", "Unknown error code"),
+OPERATION_TIMED_OUT(6000, "TIM01", "Operation timed out")
 ;
 
 private final int errorCode;

http://git-wip-us.apache.org/repos/asf/phoenix/blob/b39f44bd/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
index c873494..446a182 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
@@ -34,6 +34,7 @@ import java.util.UUID;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
 
 import org.apache.hadoop.hbase.HRegionInfo;
 import org.apache.hadoop.hbase.HRegionLocation;
@@ -46,6 +47,8 @@ import org.apache.phoenix.compile.QueryPlan;
 import org.apache.phoenix.compile.RowProjector;
 import org.apache.phoenix.compile.ScanRanges;
 import org.apache.phoenix.compile.StatementContext;
+import org.apache.phoenix.exception.SQLExceptionCode;
+import org.apache.phoenix.exception.SQLExceptionInfo;
 import org.apache.phoenix.filter.ColumnProjectionFilter;
 import org.apache.phoenix.hbase.index.util.ImmutableBytesPtr;
 import org.apache.phoenix.parse.FilterableStatement;
@@ -513,20 +516,26 @@ public abstract class BaseResultIterators extends 
ExplainTable implements Result
 final List>>> futures = 
Lists.newArrayListWithExpectedSize(numScans);
 allFutures.add(futures);
 SQLException toThrow = null;
+int queryTimeOut = 
props.getInt(QueryServices.THREAD_TIMEOUT_MS_ATTRIB, DEFAULT_THREAD_TIMEOUT_MS);
+long maxQueryEndTime = System.currentTimeMillis() + queryTimeOut;
 try {
 submitWork(scans, futures, allIterators, splits.size());
-int timeoutMs = 
props.getInt(QueryServices.THREAD_TIMEOUT_MS_ATTRIB, DEFAULT_THREAD_TIMEOUT_MS);
 boolean clearedCache = false;
 for (List>> future : 
reverseIfNecessary(futures,isReverse)) {
 List concatIterators = 
Lists.newArrayListWithExpectedSize(future.size());
 for (Pair> scanPair : 
reverseIfNecessary(future,isReverse)) {
 try {
-PeekingResultIterator iterator = 
scanPair.getSecond().get(timeoutMs, TimeUnit.MILLISECONDS);
+long timeOutForScan = maxQueryEndTime - 
System.currentTimeMillis();
+if (timeOutForScan < 0) {
+throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.OPERATION_TIMED_OUT).setMessage(". 
Query couldn't be completed in the alloted time: " + queryTimeOut + " 
ms").build().buildException(); 
+}
+PeekingResultIterator iterator = 
scanPair.getSecond().get(timeOutForScan, TimeUnit.MILLISECONDS);
 concatIterators.add(iterator);
 } catch (ExecutionException e) {
 try { // Rethrow as SQLException

[2/2] phoenix git commit: PHOENIX-1463 phoenix.query.timeoutMs doesn't work as expected (Samarth Jain)

2014-11-20 Thread jamestaylor
PHOENIX-1463 phoenix.query.timeoutMs doesn't work as expected (Samarth Jain)


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

Branch: refs/heads/4.0
Commit: a5867237706f1388086c0e4a986cc990ff838023
Parents: 3434655
Author: James Taylor 
Authored: Thu Nov 20 20:57:22 2014 -0800
Committer: James Taylor 
Committed: Thu Nov 20 22:06:51 2014 -0800

--
 .../phoenix/exception/SQLExceptionCode.java |  1 +
 .../phoenix/iterate/BaseResultIterators.java| 53 ++--
 2 files changed, 38 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/a5867237/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java 
b/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java
index 5c6018d..b776007 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java
@@ -290,6 +290,7 @@ public enum SQLExceptionCode {
 OUTDATED_JARS(2007, "INT09", "Outdated jars."),
 INDEX_METADATA_NOT_FOUND(2008, "INT10", "Unable to find cached index 
metadata. "),
 UNKNOWN_ERROR_CODE(2009, "INT11", "Unknown error code"),
+OPERATION_TIMED_OUT(6000, "TIM01", "Operation timed out")
 ;
 
 private final int errorCode;

http://git-wip-us.apache.org/repos/asf/phoenix/blob/a5867237/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
index c873494..446a182 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
@@ -34,6 +34,7 @@ import java.util.UUID;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
 
 import org.apache.hadoop.hbase.HRegionInfo;
 import org.apache.hadoop.hbase.HRegionLocation;
@@ -46,6 +47,8 @@ import org.apache.phoenix.compile.QueryPlan;
 import org.apache.phoenix.compile.RowProjector;
 import org.apache.phoenix.compile.ScanRanges;
 import org.apache.phoenix.compile.StatementContext;
+import org.apache.phoenix.exception.SQLExceptionCode;
+import org.apache.phoenix.exception.SQLExceptionInfo;
 import org.apache.phoenix.filter.ColumnProjectionFilter;
 import org.apache.phoenix.hbase.index.util.ImmutableBytesPtr;
 import org.apache.phoenix.parse.FilterableStatement;
@@ -513,20 +516,26 @@ public abstract class BaseResultIterators extends 
ExplainTable implements Result
 final List>>> futures = 
Lists.newArrayListWithExpectedSize(numScans);
 allFutures.add(futures);
 SQLException toThrow = null;
+int queryTimeOut = 
props.getInt(QueryServices.THREAD_TIMEOUT_MS_ATTRIB, DEFAULT_THREAD_TIMEOUT_MS);
+long maxQueryEndTime = System.currentTimeMillis() + queryTimeOut;
 try {
 submitWork(scans, futures, allIterators, splits.size());
-int timeoutMs = 
props.getInt(QueryServices.THREAD_TIMEOUT_MS_ATTRIB, DEFAULT_THREAD_TIMEOUT_MS);
 boolean clearedCache = false;
 for (List>> future : 
reverseIfNecessary(futures,isReverse)) {
 List concatIterators = 
Lists.newArrayListWithExpectedSize(future.size());
 for (Pair> scanPair : 
reverseIfNecessary(future,isReverse)) {
 try {
-PeekingResultIterator iterator = 
scanPair.getSecond().get(timeoutMs, TimeUnit.MILLISECONDS);
+long timeOutForScan = maxQueryEndTime - 
System.currentTimeMillis();
+if (timeOutForScan < 0) {
+throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.OPERATION_TIMED_OUT).setMessage(". 
Query couldn't be completed in the alloted time: " + queryTimeOut + " 
ms").build().buildException(); 
+}
+PeekingResultIterator iterator = 
scanPair.getSecond().get(timeOutForScan, TimeUnit.MILLISECONDS);
 concatIterators.add(iterator);
 } catch (ExecutionException e) {
 try { // Rethrow as SQLException
   

[1/2] phoenix git commit: PHOENIX-1466 Prevent multiple scans when query run serially

2014-11-20 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.0 77cb9aceb -> a58672377


PHOENIX-1466 Prevent multiple scans when query run serially

Conflicts:

phoenix-core/src/main/java/org/apache/phoenix/expression/aggregator/DistinctValueWithCountServerAggregator.java


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

Branch: refs/heads/4.0
Commit: 3434655e5eac1eccfa37e56646c1f57898023da1
Parents: 77cb9ac
Author: James Taylor 
Authored: Tue Nov 18 10:37:28 2014 -0800
Committer: James Taylor 
Committed: Thu Nov 20 22:06:11 2014 -0800

--
 .../phoenix/end2end/QueryWithLimitIT.java   | 119 +++
 .../org/apache/phoenix/execute/ScanPlan.java|  81 +++--
 .../DistinctValueWithCountServerAggregator.java |   5 +-
 .../iterate/ParallelIteratorFactory.java|   7 ++
 .../apache/phoenix/iterate/SerialIterators.java |   9 +-
 .../phoenix/iterate/TableResultIterator.java|  42 +--
 6 files changed, 208 insertions(+), 55 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/3434655e/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryWithLimitIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryWithLimitIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryWithLimitIT.java
new file mode 100644
index 000..2df9514
--- /dev/null
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryWithLimitIT.java
@@ -0,0 +1,119 @@
+/*
+ * Copyright 2010 The Apache Software Foundation
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ *distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you maynot use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicablelaw or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.phoenix.end2end;
+
+import static org.apache.phoenix.util.TestUtil.KEYONLY_NAME;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.Map;
+import java.util.Properties;
+import java.util.concurrent.RejectedExecutionException;
+
+import org.apache.phoenix.query.QueryServices;
+import org.apache.phoenix.util.PropertiesUtil;
+import org.apache.phoenix.util.QueryUtil;
+import org.apache.phoenix.util.ReadOnlyProps;
+import org.apache.phoenix.util.TestUtil;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import com.google.common.collect.Maps;
+
+@Category(NeedsOwnMiniClusterTest.class)
+public class QueryWithLimitIT extends BaseOwnClusterHBaseManagedTimeIT {
+
+@BeforeClass
+public static void doSetup() throws Exception {
+Map props = Maps.newHashMapWithExpectedSize(3);
+// Must update config before starting server
+props.put(QueryServices.STATS_GUIDEPOST_WIDTH_BYTES_ATTRIB, 
Long.toString(50));
+props.put(QueryServices.QUEUE_SIZE_ATTRIB, Integer.toString(1));
+props.put(QueryServices.DROP_METADATA_ATTRIB, Boolean.TRUE.toString());
+props.put(QueryServices.SEQUENCE_SALT_BUCKETS_ATTRIB, 
Integer.toString(0)); // Prevents RejectedExecutionException when deleting 
sequences
+setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
+}
+
+@Test
+public void testQueryWithLimitAndStats() throws Exception {
+Properties props = PropertiesUtil.deepCopy(TestUtil.TEST_PROPERTIES);
+Connection conn = DriverManager.getConnection(getUrl(), props);
+try {
+ensureTableCreated(getUrl(),KEYONLY_NAME);
+initTableValues(conn, 100);
+
+String query = "SELECT i1 FROM KEYONLY LIMIT 1";
+ResultSet rs = conn.createStatement().executeQuery(query);
+assertTrue(rs.next());
+assertEquals(0, rs.g

[2/2] phoenix git commit: PHOENIX-1466 Prevent multiple scans when query run serially

2014-11-20 Thread jamestaylor
PHOENIX-1466 Prevent multiple scans when query run serially


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

Branch: refs/heads/4.2
Commit: a1ba9bace1f44ed418bc01467a10ab2b3eea848b
Parents: 4c47b0e
Author: James Taylor 
Authored: Tue Nov 18 10:37:28 2014 -0800
Committer: James Taylor 
Committed: Thu Nov 20 21:48:57 2014 -0800

--
 .../phoenix/end2end/QueryWithLimitIT.java   | 119 +++
 .../org/apache/phoenix/execute/ScanPlan.java|  81 +++--
 .../DistinctValueWithCountServerAggregator.java |   5 -
 .../iterate/ParallelIteratorFactory.java|   7 ++
 .../apache/phoenix/iterate/SerialIterators.java |   9 +-
 .../phoenix/iterate/TableResultIterator.java|  42 +--
 6 files changed, 206 insertions(+), 57 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/a1ba9bac/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryWithLimitIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryWithLimitIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryWithLimitIT.java
new file mode 100644
index 000..2df9514
--- /dev/null
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryWithLimitIT.java
@@ -0,0 +1,119 @@
+/*
+ * Copyright 2010 The Apache Software Foundation
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ *distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you maynot use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicablelaw or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.phoenix.end2end;
+
+import static org.apache.phoenix.util.TestUtil.KEYONLY_NAME;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.Map;
+import java.util.Properties;
+import java.util.concurrent.RejectedExecutionException;
+
+import org.apache.phoenix.query.QueryServices;
+import org.apache.phoenix.util.PropertiesUtil;
+import org.apache.phoenix.util.QueryUtil;
+import org.apache.phoenix.util.ReadOnlyProps;
+import org.apache.phoenix.util.TestUtil;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import com.google.common.collect.Maps;
+
+@Category(NeedsOwnMiniClusterTest.class)
+public class QueryWithLimitIT extends BaseOwnClusterHBaseManagedTimeIT {
+
+@BeforeClass
+public static void doSetup() throws Exception {
+Map props = Maps.newHashMapWithExpectedSize(3);
+// Must update config before starting server
+props.put(QueryServices.STATS_GUIDEPOST_WIDTH_BYTES_ATTRIB, 
Long.toString(50));
+props.put(QueryServices.QUEUE_SIZE_ATTRIB, Integer.toString(1));
+props.put(QueryServices.DROP_METADATA_ATTRIB, Boolean.TRUE.toString());
+props.put(QueryServices.SEQUENCE_SALT_BUCKETS_ATTRIB, 
Integer.toString(0)); // Prevents RejectedExecutionException when deleting 
sequences
+setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
+}
+
+@Test
+public void testQueryWithLimitAndStats() throws Exception {
+Properties props = PropertiesUtil.deepCopy(TestUtil.TEST_PROPERTIES);
+Connection conn = DriverManager.getConnection(getUrl(), props);
+try {
+ensureTableCreated(getUrl(),KEYONLY_NAME);
+initTableValues(conn, 100);
+
+String query = "SELECT i1 FROM KEYONLY LIMIT 1";
+ResultSet rs = conn.createStatement().executeQuery(query);
+assertTrue(rs.next());
+assertEquals(0, rs.getInt(1));
+assertFalse(rs.next());
+
+rs = conn.createStatement().executeQuery("EXPLAIN " + query);
+assertEquals("CLIENT SERIAL 1-WAY FULL SCAN OVER KEYONLY\n" + 
+

[1/2] phoenix git commit: PHOENIX-1463 phoenix.query.timeoutMs doesn't work as expected (Samarth Jain)

2014-11-20 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.2 4c47b0e40 -> 1a4c4300a


PHOENIX-1463 phoenix.query.timeoutMs doesn't work as expected (Samarth Jain)


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

Branch: refs/heads/4.2
Commit: 1a4c4300a7a9f4c52eef2ba6dba264ec8385c8e0
Parents: a1ba9ba
Author: James Taylor 
Authored: Thu Nov 20 20:57:22 2014 -0800
Committer: James Taylor 
Committed: Thu Nov 20 21:48:57 2014 -0800

--
 .../phoenix/exception/SQLExceptionCode.java |  1 +
 .../phoenix/iterate/BaseResultIterators.java| 53 ++--
 2 files changed, 38 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/1a4c4300/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java 
b/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java
index bf13eec..9fb456b 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java
@@ -289,6 +289,7 @@ public enum SQLExceptionCode {
 OUTDATED_JARS(2007, "INT09", "Outdated jars."),
 INDEX_METADATA_NOT_FOUND(2008, "INT10", "Unable to find cached index 
metadata. "),
 UNKNOWN_ERROR_CODE(2009, "INT11", "Unknown error code"),
+OPERATION_TIMED_OUT(6000, "TIM01", "Operation timed out")
 ;
 
 private final int errorCode;

http://git-wip-us.apache.org/repos/asf/phoenix/blob/1a4c4300/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
index c873494..446a182 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
@@ -34,6 +34,7 @@ import java.util.UUID;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
 
 import org.apache.hadoop.hbase.HRegionInfo;
 import org.apache.hadoop.hbase.HRegionLocation;
@@ -46,6 +47,8 @@ import org.apache.phoenix.compile.QueryPlan;
 import org.apache.phoenix.compile.RowProjector;
 import org.apache.phoenix.compile.ScanRanges;
 import org.apache.phoenix.compile.StatementContext;
+import org.apache.phoenix.exception.SQLExceptionCode;
+import org.apache.phoenix.exception.SQLExceptionInfo;
 import org.apache.phoenix.filter.ColumnProjectionFilter;
 import org.apache.phoenix.hbase.index.util.ImmutableBytesPtr;
 import org.apache.phoenix.parse.FilterableStatement;
@@ -513,20 +516,26 @@ public abstract class BaseResultIterators extends 
ExplainTable implements Result
 final List>>> futures = 
Lists.newArrayListWithExpectedSize(numScans);
 allFutures.add(futures);
 SQLException toThrow = null;
+int queryTimeOut = 
props.getInt(QueryServices.THREAD_TIMEOUT_MS_ATTRIB, DEFAULT_THREAD_TIMEOUT_MS);
+long maxQueryEndTime = System.currentTimeMillis() + queryTimeOut;
 try {
 submitWork(scans, futures, allIterators, splits.size());
-int timeoutMs = 
props.getInt(QueryServices.THREAD_TIMEOUT_MS_ATTRIB, DEFAULT_THREAD_TIMEOUT_MS);
 boolean clearedCache = false;
 for (List>> future : 
reverseIfNecessary(futures,isReverse)) {
 List concatIterators = 
Lists.newArrayListWithExpectedSize(future.size());
 for (Pair> scanPair : 
reverseIfNecessary(future,isReverse)) {
 try {
-PeekingResultIterator iterator = 
scanPair.getSecond().get(timeoutMs, TimeUnit.MILLISECONDS);
+long timeOutForScan = maxQueryEndTime - 
System.currentTimeMillis();
+if (timeOutForScan < 0) {
+throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.OPERATION_TIMED_OUT).setMessage(". 
Query couldn't be completed in the alloted time: " + queryTimeOut + " 
ms").build().buildException(); 
+}
+PeekingResultIterator iterator = 
scanPair.getSecond().get(timeOutForScan, TimeUnit.MILLISECONDS);
 concatIterators.add(iterator);
 } catch (Execution

Build failed in Jenkins: Phoenix | Master #494

2014-11-20 Thread Apache Jenkins Server
See 

Changes:

[jeffreyz] PHOENIX-1395: ResultSpooler spill files are left behind in /tmp 
folder (Alicia Ying Shu)

--
[...truncated 358 lines...]
Running org.apache.phoenix.end2end.ScanQueryIT
Tests run: 77, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 61.372 sec - 
in org.apache.phoenix.end2end.NotQueryIT
Running org.apache.phoenix.end2end.DynamicUpsertIT
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.216 sec - in 
org.apache.phoenix.end2end.DynamicUpsertIT
Running org.apache.phoenix.end2end.CreateTableIT
Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 24.172 sec - 
in org.apache.phoenix.end2end.UpsertSelectIT
Running org.apache.phoenix.end2end.DynamicColumnIT
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.035 sec - in 
org.apache.phoenix.end2end.DynamicColumnIT
Running org.apache.phoenix.end2end.DerivedTableIT
Tests run: 50, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 23.098 sec - 
in org.apache.phoenix.end2end.VariableLengthPKIT
Running org.apache.phoenix.end2end.UpsertValuesIT
Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 14.3 sec - in 
org.apache.phoenix.end2end.DerivedTableIT
Running org.apache.phoenix.end2end.GroupByIT
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 21.484 sec - 
in org.apache.phoenix.end2end.CreateTableIT
Running org.apache.phoenix.end2end.SequenceIT
Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 15.398 sec - 
in org.apache.phoenix.end2end.UpsertValuesIT
Running org.apache.phoenix.end2end.ArrayIT
Tests run: 50, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 28.801 sec - 
in org.apache.phoenix.end2end.SequenceIT
Running org.apache.phoenix.end2end.RowValueConstructorIT
Tests run: 48, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 22.895 sec - 
in org.apache.phoenix.end2end.ArrayIT
Running org.apache.phoenix.end2end.ExtendedQueryExecIT
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.602 sec - in 
org.apache.phoenix.end2end.ExtendedQueryExecIT
Running org.apache.phoenix.end2end.QueryIT
Tests run: 119, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 88.657 sec - 
in org.apache.phoenix.end2end.ScanQueryIT
Running org.apache.phoenix.end2end.IsNullIT
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.394 sec - in 
org.apache.phoenix.end2end.IsNullIT
Running org.apache.phoenix.end2end.ToCharFunctionIT
Tests run: 36, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 33.908 sec - 
in org.apache.phoenix.end2end.RowValueConstructorIT
Running org.apache.phoenix.end2end.FunkyNamesIT
Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.938 sec - in 
org.apache.phoenix.end2end.ToCharFunctionIT
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.119 sec - in 
org.apache.phoenix.end2end.FunkyNamesIT
Running org.apache.phoenix.end2end.salted.SaltedTableIT
Running org.apache.phoenix.end2end.NativeHBaseTypesIT
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.749 sec - in 
org.apache.phoenix.end2end.NativeHBaseTypesIT
Running org.apache.phoenix.end2end.CompareDecimalToLongIT
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.146 sec - in 
org.apache.phoenix.end2end.salted.SaltedTableIT
Running org.apache.phoenix.end2end.TruncateFunctionIT
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.788 sec - in 
org.apache.phoenix.end2end.TruncateFunctionIT
Running org.apache.phoenix.end2end.QueryDatabaseMetaDataIT
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.21 sec - in 
org.apache.phoenix.end2end.CompareDecimalToLongIT
Running org.apache.phoenix.end2end.PercentileIT
Tests run: 91, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 76.165 sec - 
in org.apache.phoenix.end2end.GroupByIT
Running org.apache.phoenix.end2end.ToNumberFunctionIT
Tests run: 18, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.038 sec - in 
org.apache.phoenix.end2end.ToNumberFunctionIT
Running org.apache.phoenix.end2end.OrderByIT
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.946 sec - in 
org.apache.phoenix.end2end.OrderByIT
Running org.apache.phoenix.end2end.GroupByCaseIT
Tests run: 17, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 10.984 sec - 
in org.apache.phoenix.end2end.PercentileIT
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.663 sec - in 
org.apache.phoenix.end2end.GroupByCaseIT
Tests run: 210, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 166.217 sec - 
in org.apache.phoenix.end2end.ClientTimeArithmeticQueryIT
Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 33.97 sec - in 
org.apache.phoenix.end2end.QueryDatabaseMetaDataIT
Tests run: 182, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 193.779 sec - 
in org.apache.phoenix.end2end.QueryIT

Results :

Tests run: 1224, Failures: 0, Errors: 0, Skipped: 0

[INFO] 
[

Apache-Phoenix | Master | Build Successful

2014-11-20 Thread Apache Jenkins Server
Master 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-master/lastSuccessfulBuild/artifact/

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

Changes
[jeffreyz] PHOENIX-1380: Potential null dereference in PerformanceLog#getFileOutputStream() (Alicia Ying Shu)



phoenix git commit: PHOENIX-1395: ResultSpooler spill files are left behind in /tmp folder (Alicia Ying Shu)

2014-11-20 Thread jeffreyz
Repository: phoenix
Updated Branches:
  refs/heads/master 2d5acb4e9 -> 46aa58216


PHOENIX-1395: ResultSpooler spill files are left behind in /tmp folder (Alicia 
Ying Shu)


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

Branch: refs/heads/master
Commit: 46aa582165825d215ba7f94ee28b1b957885c11d
Parents: 2d5acb4
Author: Jeffrey Zhong 
Authored: Thu Nov 20 15:39:05 2014 -0800
Committer: Jeffrey Zhong 
Committed: Thu Nov 20 15:39:05 2014 -0800

--
 .../phoenix/iterate/SpoolingResultIterator.java |   3 +
 .../iterate/SpooledTmpFileDeleteTest.java   | 127 +++
 2 files changed, 130 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/46aa5821/phoenix-core/src/main/java/org/apache/phoenix/iterate/SpoolingResultIterator.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/SpoolingResultIterator.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/SpoolingResultIterator.java
index 87ed241..71ad7d7 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/SpoolingResultIterator.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/SpoolingResultIterator.java
@@ -116,6 +116,9 @@ public class SpoolingResultIterator implements 
PeekingResultIterator {
 spoolFrom = new InMemoryResultIterator(data, chunk);
 } else {
 spoolFrom = new OnDiskResultIterator(spoolTo.getFile());
+if (spoolTo.getFile() != null) {
+spoolTo.getFile().deleteOnExit();
+}
 }
 success = true;
 } catch (IOException e) {

http://git-wip-us.apache.org/repos/asf/phoenix/blob/46aa5821/phoenix-core/src/test/java/org/apache/phoenix/iterate/SpooledTmpFileDeleteTest.java
--
diff --git 
a/phoenix-core/src/test/java/org/apache/phoenix/iterate/SpooledTmpFileDeleteTest.java
 
b/phoenix-core/src/test/java/org/apache/phoenix/iterate/SpooledTmpFileDeleteTest.java
new file mode 100644
index 000..4a205f9
--- /dev/null
+++ 
b/phoenix-core/src/test/java/org/apache/phoenix/iterate/SpooledTmpFileDeleteTest.java
@@ -0,0 +1,127 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
+ * agreements. See the NOTICE file distributed with this work for additional 
information regarding
+ * copyright ownership. The ASF licenses this file to you under the Apache 
License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the 
License. You may obtain a
+ * copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless 
required by applicable
+ * law or agreed to in writing, software distributed under the License is 
distributed on an "AS IS"
+ * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied. See the License
+ * for the specific language governing permissions and limitations under the 
License.
+ */
+package org.apache.phoenix.iterate;
+
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertFalse;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import org.apache.phoenix.end2end.BaseClientManagedTimeIT;
+import org.apache.phoenix.end2end.ClientManagedTimeTest;
+import org.apache.phoenix.query.QueryServices;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+
+@Category(ClientManagedTimeTest.class)
+public class SpooledTmpFileDeleteTest extends BaseClientManagedTimeIT {
+   private Connection conn = null;
+   private Properties props = null;
+
+   @Before 
+   public void setup() throws SQLException {
+   props = new Properties();
+   props.put(QueryServices.SPOOL_DIRECTORY, "/tmp"); 
+   props.setProperty(QueryServices.SPOOL_THRESHOLD_BYTES_ATTRIB, 
Integer.toString(1));
+   conn = DriverManager.getConnection(getUrl(), props);
+   Statement stmt = conn.createStatement();
+   stmt.execute("CREATE TABLE test (ID varchar NOT NULL PRIMARY 
KEY) SPLIT ON ('EA','EZ')");
+   stmt.execute("UPSERT INTO test VALUES ('AA')");
+   stmt.execute("UPSERT INTO test VALUES ('EB')");
+   stmt.execute("

phoenix git commit: PHOENIX-1380: Potential null dereference in PerformanceLog#getFileOutputStream() (Alicia Ying Shu)

2014-11-20 Thread jeffreyz
Repository: phoenix
Updated Branches:
  refs/heads/master d448417d9 -> 2d5acb4e9


PHOENIX-1380: Potential null dereference in 
PerformanceLog#getFileOutputStream() (Alicia Ying Shu)


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

Branch: refs/heads/master
Commit: 2d5acb4e93edf8901952238c31fcf12892db8725
Parents: d448417
Author: Jeffrey Zhong 
Authored: Thu Nov 20 15:29:49 2014 -0800
Committer: Jeffrey Zhong 
Committed: Thu Nov 20 15:29:49 2014 -0800

--
 .../apache/phoenix/logging/PerformanceLog.java  | 117 ---
 1 file changed, 117 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/2d5acb4e/phoenix-core/src/test/java/org/apache/phoenix/logging/PerformanceLog.java
--
diff --git 
a/phoenix-core/src/test/java/org/apache/phoenix/logging/PerformanceLog.java 
b/phoenix-core/src/test/java/org/apache/phoenix/logging/PerformanceLog.java
deleted file mode 100644
index 0f7158e..000
--- a/phoenix-core/src/test/java/org/apache/phoenix/logging/PerformanceLog.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.logging;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import org.apache.commons.lang.time.StopWatch;
-
-/**
- * Performance data logging  
- * 
- */
-public class PerformanceLog {
-   private StopWatch stopWatch = null; 
-   private static FileOutputStream fostream = null;
-
-   public PerformanceLog(String startMessage) throws IOException {
-   getStopWatch().start();
-   instanceLog("START: " + startMessage);
-   }
-   
-   public static void startLog() throws FileNotFoundException {
-   getFileOutputStream();
-   }
-   
-   public static void startLog(String fileName) throws 
FileNotFoundException {
-   getFileOutputStream(fileName);
-   }
-
-   public static void stopLog() throws FileNotFoundException, IOException {
-   getFileOutputStream().close();
-   fostream = null;
-   }
-
-   public void stopStopWatch() throws IOException {
-   getStopWatch().stop();
-   instanceLog("STOP");
-   }
-   
-   public void stopStopWatch(String message) throws IOException {
-   getStopWatch().stop();
-   instanceLog("STOP: " + message);
-   }
-   
-   /**
-* Log a message to persistent storage. Elapsed time since start is 
added.
-* @param message
-* @throws IOException
-*/
-   public void instanceLog(String message) throws IOException {
-   long elapsedMs = getStopWatch().getTime();
-   String displayTime = elapsedMs < 1000 ? elapsedMs + " ms" : 
elapsedMs / 1000 + " sec";
-   message = getDateTime() + " (" + displayTime + ") : " + message 
+ "\n";
-   System.out.println(message);
-   getFileOutputStream().write(message.getBytes());
-   }
-   
-   public static void log(String message) throws IOException {
-   message = getDateTime() + ": " + message + "\n";
-   System.out.println(message);
-   getFileOutputStream().write(message.getBytes());
-   }
-   
-   private static FileOutputStream getFileOutputStream() throws 
FileNotFoundException {
-   return getFileOutputStream(null);
-   }
-
-   private static FileOutputStream getFileOutputStream(String fileName) 
throws FileNotFoundException {
-   if (fostream == null) {
-   String folderName = "results";
-   

phoenix git commit: Set version to 4.2.2-SNAPSHOT after release

2014-11-20 Thread mujtaba
Repository: phoenix
Updated Branches:
  refs/heads/4.2 4cf13def1 -> 4c47b0e40


Set version to 4.2.2-SNAPSHOT after release


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

Branch: refs/heads/4.2
Commit: 4c47b0e4092343665cc3995f00dc632d3dad9520
Parents: 4cf13de
Author: Mujtaba 
Authored: Thu Nov 20 11:08:35 2014 -0800
Committer: Mujtaba 
Committed: Thu Nov 20 11:08:35 2014 -0800

--
 phoenix-assembly/pom.xml | 2 +-
 phoenix-core/pom.xml | 2 +-
 phoenix-flume/pom.xml| 2 +-
 phoenix-pig/pom.xml  | 2 +-
 pom.xml  | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/4c47b0e4/phoenix-assembly/pom.xml
--
diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml
index ef02729..e7da5a2 100644
--- a/phoenix-assembly/pom.xml
+++ b/phoenix-assembly/pom.xml
@@ -26,7 +26,7 @@
   
 org.apache.phoenix
 phoenix
-4.2.1
+4.2.2-SNAPSHOT
   
   phoenix-assembly
   Phoenix Assembly

http://git-wip-us.apache.org/repos/asf/phoenix/blob/4c47b0e4/phoenix-core/pom.xml
--
diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml
index 146f709..9592bd7 100644
--- a/phoenix-core/pom.xml
+++ b/phoenix-core/pom.xml
@@ -4,7 +4,7 @@
   
 org.apache.phoenix
 phoenix
-4.2.1
+4.2.2-SNAPSHOT
   
   phoenix-core
   Phoenix Core

http://git-wip-us.apache.org/repos/asf/phoenix/blob/4c47b0e4/phoenix-flume/pom.xml
--
diff --git a/phoenix-flume/pom.xml b/phoenix-flume/pom.xml
index 3084faa..1c564ec 100644
--- a/phoenix-flume/pom.xml
+++ b/phoenix-flume/pom.xml
@@ -26,7 +26,7 @@
   
 org.apache.phoenix
 phoenix
-4.2.1
+4.2.2-SNAPSHOT
   
   phoenix-flume
   Phoenix - Flume

http://git-wip-us.apache.org/repos/asf/phoenix/blob/4c47b0e4/phoenix-pig/pom.xml
--
diff --git a/phoenix-pig/pom.xml b/phoenix-pig/pom.xml
index 7ce885b..fbca029 100644
--- a/phoenix-pig/pom.xml
+++ b/phoenix-pig/pom.xml
@@ -26,7 +26,7 @@
   
 org.apache.phoenix
 phoenix
-4.2.1
+4.2.2-SNAPSHOT
   
   phoenix-pig
   Phoenix - Pig

http://git-wip-us.apache.org/repos/asf/phoenix/blob/4c47b0e4/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 2fc08a3..331cddc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
   4.0.0
   org.apache.phoenix
   phoenix
-  4.2.1
+  4.2.2-SNAPSHOT
   pom
   Apache Phoenix
   A SQL layer over HBase



phoenix git commit: Set version to 3.2.2-SNAPSHOT after release

2014-11-20 Thread mujtaba
Repository: phoenix
Updated Branches:
  refs/heads/3.2 4d3a5278a -> b459c7ec2


Set version to 3.2.2-SNAPSHOT after release


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

Branch: refs/heads/3.2
Commit: b459c7ec279d17108c83c6ec486597dd95162079
Parents: 4d3a527
Author: Mujtaba 
Authored: Thu Nov 20 11:06:16 2014 -0800
Committer: Mujtaba 
Committed: Thu Nov 20 11:06:16 2014 -0800

--
 phoenix-assembly/pom.xml   | 2 +-
 phoenix-core/pom.xml   | 2 +-
 phoenix-flume/pom.xml  | 2 +-
 phoenix-hadoop-compat/pom.xml  | 2 +-
 phoenix-hadoop1-compat/pom.xml | 2 +-
 phoenix-hadoop2-compat/pom.xml | 2 +-
 phoenix-pig/pom.xml| 2 +-
 pom.xml| 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/b459c7ec/phoenix-assembly/pom.xml
--
diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml
index 5c2185e..ed2f8b2 100644
--- a/phoenix-assembly/pom.xml
+++ b/phoenix-assembly/pom.xml
@@ -26,7 +26,7 @@
   
 org.apache.phoenix
 phoenix
-3.2.1
+3.2.2-SNAPSHOT
   
   phoenix-assembly
   Phoenix Assembly

http://git-wip-us.apache.org/repos/asf/phoenix/blob/b459c7ec/phoenix-core/pom.xml
--
diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml
index 9c6d183..4c93c8c 100644
--- a/phoenix-core/pom.xml
+++ b/phoenix-core/pom.xml
@@ -4,7 +4,7 @@
   
 org.apache.phoenix
 phoenix
-3.2.1
+3.2.2-SNAPSHOT
   
   phoenix-core
   Phoenix Core

http://git-wip-us.apache.org/repos/asf/phoenix/blob/b459c7ec/phoenix-flume/pom.xml
--
diff --git a/phoenix-flume/pom.xml b/phoenix-flume/pom.xml
index 042fe59..1eaf140 100644
--- a/phoenix-flume/pom.xml
+++ b/phoenix-flume/pom.xml
@@ -26,7 +26,7 @@
   
 org.apache.phoenix
 phoenix
-3.2.1
+3.2.2-SNAPSHOT
   
   phoenix-flume
   Phoenix - Flume

http://git-wip-us.apache.org/repos/asf/phoenix/blob/b459c7ec/phoenix-hadoop-compat/pom.xml
--
diff --git a/phoenix-hadoop-compat/pom.xml b/phoenix-hadoop-compat/pom.xml
index eb098f9..6f8b264 100644
--- a/phoenix-hadoop-compat/pom.xml
+++ b/phoenix-hadoop-compat/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.phoenix
 phoenix
-3.2.1
+3.2.2-SNAPSHOT
   
   phoenix-hadoop-compat
   Phoenix Hadoop Compatibility

http://git-wip-us.apache.org/repos/asf/phoenix/blob/b459c7ec/phoenix-hadoop1-compat/pom.xml
--
diff --git a/phoenix-hadoop1-compat/pom.xml b/phoenix-hadoop1-compat/pom.xml
index aca7278..ec9397a 100644
--- a/phoenix-hadoop1-compat/pom.xml
+++ b/phoenix-hadoop1-compat/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.phoenix
 phoenix
-3.2.1
+3.2.2-SNAPSHOT
   
   phoenix-hadoop1-compat
   Phoenix Hadoop1 Compatibility

http://git-wip-us.apache.org/repos/asf/phoenix/blob/b459c7ec/phoenix-hadoop2-compat/pom.xml
--
diff --git a/phoenix-hadoop2-compat/pom.xml b/phoenix-hadoop2-compat/pom.xml
index 542c204..d7e1367 100644
--- a/phoenix-hadoop2-compat/pom.xml
+++ b/phoenix-hadoop2-compat/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.phoenix
 phoenix
-3.2.1
+3.2.2-SNAPSHOT
   
   phoenix-hadoop2-compat
   Phoenix Hadoop2 Compatibility

http://git-wip-us.apache.org/repos/asf/phoenix/blob/b459c7ec/phoenix-pig/pom.xml
--
diff --git a/phoenix-pig/pom.xml b/phoenix-pig/pom.xml
index 2a22da6..d50f82e 100644
--- a/phoenix-pig/pom.xml
+++ b/phoenix-pig/pom.xml
@@ -26,7 +26,7 @@
   
 org.apache.phoenix
 phoenix
-3.2.1
+3.2.2-SNAPSHOT
   
   phoenix-pig
   Phoenix - Pig

http://git-wip-us.apache.org/repos/asf/phoenix/blob/b459c7ec/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 3141bbb..cc2950d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
   4.0.0
   org.apache.phoenix
   phoenix
-  3.2.1
+  3.2.2-SNAPSHOT
   pom
   Apache Phoenix
   A SQL layer over HBase



Git Push Summary

2014-11-20 Thread mujtaba
Repository: phoenix
Updated Tags:  refs/tags/v3.2.1 [created] 685a58145


Git Push Summary

2014-11-20 Thread mujtaba
Repository: phoenix
Updated Tags:  refs/tags/v4.2.1 [created] 3f98da01b


svn commit: r7186 - in /release/phoenix: phoenix-4.2.0/ phoenix-4.2.1/ phoenix-4.2.1/bin/ phoenix-4.2.1/src/

2014-11-20 Thread mujtaba
Author: mujtaba
Date: Thu Nov 20 17:42:16 2014
New Revision: 7186

Log:
Push Phoenix 4.2.1 to release

Added:
release/phoenix/phoenix-4.2.1/
release/phoenix/phoenix-4.2.1/bin/
release/phoenix/phoenix-4.2.1/bin/phoenix-4.2.1-bin.tar.gz   (with props)
release/phoenix/phoenix-4.2.1/bin/phoenix-4.2.1-bin.tar.gz.asc
release/phoenix/phoenix-4.2.1/bin/phoenix-4.2.1-bin.tar.gz.md5
release/phoenix/phoenix-4.2.1/bin/phoenix-4.2.1-bin.tar.gz.sha
release/phoenix/phoenix-4.2.1/src/
release/phoenix/phoenix-4.2.1/src/phoenix-4.2.1-src.tar.gz   (with props)
release/phoenix/phoenix-4.2.1/src/phoenix-4.2.1-src.tar.gz.asc
release/phoenix/phoenix-4.2.1/src/phoenix-4.2.1-src.tar.gz.md5
release/phoenix/phoenix-4.2.1/src/phoenix-4.2.1-src.tar.gz.sha
Removed:
release/phoenix/phoenix-4.2.0/

Added: release/phoenix/phoenix-4.2.1/bin/phoenix-4.2.1-bin.tar.gz
==
Binary file - no diff available.

Propchange: release/phoenix/phoenix-4.2.1/bin/phoenix-4.2.1-bin.tar.gz
--
svn:mime-type = application/octet-stream

Added: release/phoenix/phoenix-4.2.1/bin/phoenix-4.2.1-bin.tar.gz.asc
==
--- release/phoenix/phoenix-4.2.1/bin/phoenix-4.2.1-bin.tar.gz.asc (added)
+++ release/phoenix/phoenix-4.2.1/bin/phoenix-4.2.1-bin.tar.gz.asc Thu Nov 20 
17:42:16 2014
@@ -0,0 +1,17 @@
+-BEGIN PGP SIGNATURE-
+Version: GnuPG v1.4.11 (GNU/Linux)
+
+iQIcBAABAgAGBQJUZNbvAAoJEDv8s5KUYReO7PIQAMooLCwvBRb+8tUPhDOxTNHc
+4ZgmnHfkAazPKb7OXHQbx087/xLX5XNR7hjrKcUyHKZ5PxbbudiSMTKePlzzae0d
+ueot4aeyfcqwkflUgSrJ2W0boUwsxmY4NCdZqsIlKiD4j3nXnnRTs1JZ/vfkeBrN
+BTRpzsKnRNKbsI1p9ypVmcSMTiwsjwghOIMzCNOJ+77xUe+jL9QFKyuLxmva+T27
+owscjCfBMF0g+Pl5gZ+fbSJ0mmNRVKKIqAlDwkMTuNgQmGxC7Xqsnt36pqNhe7II
+sA9DUlXOiqF5rSmgj0mRfhlFm51ZleZ9PeymYdSl/0UNws/ltv4rYv1HuFCQoNfG
+xCxEupMKQKWFoH9fyxsfkrC4k/p0liuXbhFJE+MQLDbBPv1+/G1bRLBep+CmS1LE
+Nl0N2vVv16Z+hM3kPVSD0OVUGrkhORGROZcpd872gxqz+pa8RhDFZphYzZt5iNie
+RvB3xqb+MSlxVHecerRk1n1p/PQAL3Vw2XK+EGDw0R8vPOpo+YqDyfFXcTxcWKIB
+cyqrpyc0hgDaDJMXl7w6lmtaJNcxLZwcZEb/SH7fQeTvvsakrX3sloxgLPGdBE+V
+v7DoHGAcu9tr2jwBUfj/wqFeY2uc80yOr04ObTO1M+cxKb40TC7a9YwOr7pUbBRY
+z0Xk0Kq+0DiCCIo14F3G
+=dw/F
+-END PGP SIGNATURE-

Added: release/phoenix/phoenix-4.2.1/bin/phoenix-4.2.1-bin.tar.gz.md5
==
--- release/phoenix/phoenix-4.2.1/bin/phoenix-4.2.1-bin.tar.gz.md5 (added)
+++ release/phoenix/phoenix-4.2.1/bin/phoenix-4.2.1-bin.tar.gz.md5 Thu Nov 20 
17:42:16 2014
@@ -0,0 +1 @@
+d949584a110f4942baac7d76dad63a73 *phoenix-4.2.1-bin.tar.gz

Added: release/phoenix/phoenix-4.2.1/bin/phoenix-4.2.1-bin.tar.gz.sha
==
--- release/phoenix/phoenix-4.2.1/bin/phoenix-4.2.1-bin.tar.gz.sha (added)
+++ release/phoenix/phoenix-4.2.1/bin/phoenix-4.2.1-bin.tar.gz.sha Thu Nov 20 
17:42:16 2014
@@ -0,0 +1,2 @@
+c6cc5bb324d9522fcaee0a85b08a030b2238e9f4bac07968b56f5eaff848cea07e3b5c234dbe2d2511e9dcf525d620f5ec503f4c5db381161d028a24e871562b
 *phoenix-4.2.1-bin.tar.gz
+40025176170e58fc81dcb56bab062102f7e4b9fe098b4366c4b9b15033e6be60 
*phoenix-4.2.1-bin.tar.gz

Added: release/phoenix/phoenix-4.2.1/src/phoenix-4.2.1-src.tar.gz
==
Binary file - no diff available.

Propchange: release/phoenix/phoenix-4.2.1/src/phoenix-4.2.1-src.tar.gz
--
svn:mime-type = application/octet-stream

Added: release/phoenix/phoenix-4.2.1/src/phoenix-4.2.1-src.tar.gz.asc
==
--- release/phoenix/phoenix-4.2.1/src/phoenix-4.2.1-src.tar.gz.asc (added)
+++ release/phoenix/phoenix-4.2.1/src/phoenix-4.2.1-src.tar.gz.asc Thu Nov 20 
17:42:16 2014
@@ -0,0 +1,17 @@
+-BEGIN PGP SIGNATURE-
+Version: GnuPG v1.4.11 (GNU/Linux)
+
+iQIcBAABAgAGBQJUZNb6AAoJEDv8s5KUYReOF+AP/0hX9XkLiBiJk0v4xRq0SMg+
+VnrDfvFIKKRAOih3MOKAGDTCwowgtNmY8l+s6YRmsB2Vq4jX/g19Ph1MV6QB5w9t
+jq+1TVIkRSH/aUN7UkVweWNpq65Ypil8muTg/PHhGZfjqSEOMXJnDNdAqzyWcBAY
+8WCBKDpwEJrPls29wHTIbMTl8Hux5S7YiAq/JosUaJ0opSGRXrq6ozXlBigQACfw
+A3JqUwt4O3AljfystxIpiTH6bxlJ3DDTdwgnUR3qyflprzt/wuF9mpZR5wP5z+bZ
+/xaPcxE8MjU+h6LT1Y5pvDxMIIWZIZkPicSe/O6CwqLQlRyaYDxsFhECLiXJREW+
+oR83/bSHyCxFr+8MiRe0dHa4vjlChdeptqFnQ9bayTRIQUxi2VArwUeeMLynvLzp
+zdnhq/MrlM2L5ssK+U+zbjFkckBBB8QtXt5FoNbM9ndBLeht8z9WPy/lk+g3HiqM
+8uzmFl8H2Yb880qA0dFyQhsy6JUApC3zzvlY2SWgU1a6ZkSyxGvWNzMynXPC91Yq
+I+q90RDxDgNvc8G13bknQan7y1kkC099JzwqOa7tZOAGrz1VuoCyVto1QraA4mnM
+adAGQYjtIKdeOvbBdSQtIkVqMASkdqOf+jhUsLVMJ7YPWpYTt/cU0TfEI6RybVT6
+wOoxolBgVm01nS8KoW4A
+=iO9Y
+-END PGP SIGNATURE-

Added: release/phoenix/phoenix-4.2.1/src/phoenix-4.2.1-src.tar.gz.md5
=