[2/2] git commit: PHOENIX-1390 Stats not updated on client after major compaction

2014-10-28 Thread jamestaylor
PHOENIX-1390 Stats not updated on client after major compaction


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

Branch: refs/heads/4.0
Commit: 7a8a023a3d2bdb694f02fc1560a0f5eb35294a96
Parents: 851f57a
Author: James Taylor jtay...@salesforce.com
Authored: Tue Oct 28 12:44:37 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Tue Oct 28 12:44:37 2014 -0700

--
 .../end2end/BaseClientManagedTimeIT.java| 15 +++-
 .../org/apache/phoenix/end2end/BaseQueryIT.java |  3 +-
 .../end2end/ClientTimeArithmeticQueryIT.java| 43 +++
 .../phoenix/end2end/InMemoryOrderByIT.java  |  4 +-
 .../org/apache/phoenix/end2end/QueryIT.java | 24 --
 .../apache/phoenix/end2end/ReverseScanIT.java   |  2 +-
 .../org/apache/phoenix/end2end/SequenceIT.java  |  7 +-
 .../phoenix/end2end/SpooledOrderByIT.java   |  4 +-
 .../phoenix/end2end/StatsCollectorIT.java   | 55 +-
 .../apache/phoenix/end2end/UpsertSelectIT.java  |  4 +-
 .../phoenix/compile/ExpressionCompiler.java |  2 +-
 .../coprocessor/MetaDataEndpointImpl.java   | 35 ++---
 .../UngroupedAggregateRegionObserver.java   | 21 --
 .../org/apache/phoenix/query/QueryServices.java |  1 +
 .../phoenix/query/QueryServicesOptions.java |  5 +-
 .../apache/phoenix/schema/MetaDataClient.java   |  4 +-
 .../org/apache/phoenix/schema/PTableImpl.java   |  2 +-
 .../phoenix/schema/stats/PTableStats.java   |  7 ++
 .../phoenix/schema/stats/PTableStatsImpl.java   | 12 ++-
 .../schema/stats/StatisticsCollector.java   | 79 
 .../phoenix/schema/stats/StatisticsScanner.java |  1 -
 .../phoenix/schema/stats/StatisticsUtil.java|  6 +-
 .../phoenix/schema/stats/StatisticsWriter.java  | 39 ++
 23 files changed, 259 insertions(+), 116 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/7a8a023a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseClientManagedTimeIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseClientManagedTimeIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseClientManagedTimeIT.java
index 14dffcb..1acd5b3 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseClientManagedTimeIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseClientManagedTimeIT.java
@@ -17,16 +17,21 @@
  */
 package org.apache.phoenix.end2end;
 
+import java.util.Map;
+
 import javax.annotation.concurrent.NotThreadSafe;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.phoenix.query.BaseTest;
+import org.apache.phoenix.query.QueryServices;
 import org.apache.phoenix.util.ReadOnlyProps;
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.experimental.categories.Category;
 
+import com.google.common.collect.Maps;
+
 /**
  * Base class for tests that manage their own time stamps
  * We need to separate these from tests that rely on hbase to set
@@ -54,9 +59,17 @@ public abstract class BaseClientManagedTimeIT extends 
BaseTest {
 deletePriorTables(ts - 1, getUrl());
 }
 
+public static MapString,String getDefaultProps() {
+MapString,String props = Maps.newHashMapWithExpectedSize(5);
+// Must update config before starting server
+props.put(QueryServices.STATS_USE_CURRENT_TIME_ATTRIB, 
Boolean.FALSE.toString());
+return props;
+}
+
 @BeforeClass
 public static void doSetup() throws Exception {
-setUpTestDriver(ReadOnlyProps.EMPTY_PROPS);
+MapString,String props = getDefaultProps();
+setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
 }
 
 @AfterClass

http://git-wip-us.apache.org/repos/asf/phoenix/blob/7a8a023a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseQueryIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseQueryIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseQueryIT.java
index 7a3e86e..f3031f4 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseQueryIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseQueryIT.java
@@ -48,7 +48,6 @@ import org.junit.runners.Parameterized;
 import org.junit.runners.Parameterized.Parameters;
 
 import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
 
 
 
@@ -70,7 +69,7 @@ public abstract class BaseQueryIT extends 
BaseClientManagedTimeIT {
 @BeforeClass
 

[1/2] git commit: Remove unused imports and local variables

2014-10-28 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/master a1685c4f5 - f3ac84780


Remove unused imports and local variables


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

Branch: refs/heads/master
Commit: 5ae7f4d276d9719bd0127ac9db40da6810f95175
Parents: a1685c4
Author: James Taylor jtay...@salesforce.com
Authored: Tue Oct 28 12:43:48 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Tue Oct 28 12:45:28 2014 -0700

--
 .../apache/phoenix/trace/BaseTracingTestIT.java | 24 ++--
 .../apache/phoenix/trace/PhoenixTagImpl.java|  9 
 .../org/apache/phoenix/trace/TracingUtils.java  |  5 
 3 files changed, 12 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/5ae7f4d2/phoenix-core/src/it/java/org/apache/phoenix/trace/BaseTracingTestIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/trace/BaseTracingTestIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/trace/BaseTracingTestIT.java
index f504d12..99c8bc3 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/trace/BaseTracingTestIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/trace/BaseTracingTestIT.java
@@ -17,8 +17,18 @@
  */
 package org.apache.phoenix.trace;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import static org.apache.phoenix.util.PhoenixRuntime.ANNOTATION_ATTRIB_PREFIX;
+import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
 import org.apache.hadoop.metrics2.AbstractMetric;
 import org.apache.hadoop.metrics2.MetricsInfo;
 import org.apache.hadoop.metrics2.MetricsRecord;
@@ -38,22 +48,12 @@ import org.apache.phoenix.util.PropertiesUtil;
 import org.junit.Before;
 import org.junit.experimental.categories.Category;
 
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.SQLException;
-import java.util.*;
-
-import static org.apache.phoenix.util.PhoenixRuntime.ANNOTATION_ATTRIB_PREFIX;
-import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
-
 /**
  * Base test for tracing tests - helps manage getting tracing/non-tracing
  * connections, as well as any supporting utils.
  */
 @Category(HBaseManagedTimeTest.class)
 public class BaseTracingTestIT extends BaseHBaseManagedTimeIT {
-private static final Log LOG = LogFactory.getLog(BaseTracingTestIT.class);
-
 @Before
 public void resetTracingTableIfExists() throws Exception {
 Connection conn = getConnectionWithoutTracing();

http://git-wip-us.apache.org/repos/asf/phoenix/blob/5ae7f4d2/phoenix-core/src/it/java/org/apache/phoenix/trace/PhoenixTagImpl.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/trace/PhoenixTagImpl.java 
b/phoenix-core/src/it/java/org/apache/phoenix/trace/PhoenixTagImpl.java
index a911a2c..0d2def3 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/trace/PhoenixTagImpl.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/trace/PhoenixTagImpl.java
@@ -17,22 +17,13 @@
  */
 package org.apache.phoenix.trace;
 
-import org.apache.hadoop.metrics2.MetricsInfo;
 import org.apache.hadoop.metrics2.MetricsTag;
 
 /**
  * Simple Tag implementation for testing
  */
 public class PhoenixTagImpl extends MetricsTag {
-
-private final String name;
-private final String description;
-private final String value;
-
 public PhoenixTagImpl(String name, String description, String value) {
 super(new MetricsInfoImpl(name, description), value);
-this.name = name;
-this.description = description;
-this.value = value;
 }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/phoenix/blob/5ae7f4d2/phoenix-core/src/main/java/org/apache/phoenix/trace/TracingUtils.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/trace/TracingUtils.java 
b/phoenix-core/src/main/java/org/apache/phoenix/trace/TracingUtils.java
index 6ae52d8..cee3b95 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/trace/TracingUtils.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/trace/TracingUtils.java
@@ -17,8 +17,6 @@
  */
 package org.apache.phoenix.trace;
 
-import org.apache.commons.logging.Log;
-import 

[2/2] git commit: PHOENIX-1390 Stats not updated on client after major compaction

2014-10-28 Thread jamestaylor
PHOENIX-1390 Stats not updated on client after major compaction

Conflicts:

phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorIT.java


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

Branch: refs/heads/master
Commit: f3ac8478096c341c483191b5358c5f68361766b3
Parents: 5ae7f4d
Author: James Taylor jtay...@salesforce.com
Authored: Tue Oct 28 12:44:37 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Tue Oct 28 12:48:29 2014 -0700

--
 .../end2end/BaseClientManagedTimeIT.java| 15 +++-
 .../org/apache/phoenix/end2end/BaseQueryIT.java |  3 +-
 .../end2end/ClientTimeArithmeticQueryIT.java| 43 +++
 .../phoenix/end2end/InMemoryOrderByIT.java  |  4 +-
 .../org/apache/phoenix/end2end/QueryIT.java | 24 --
 .../apache/phoenix/end2end/ReverseScanIT.java   |  2 +-
 .../org/apache/phoenix/end2end/SequenceIT.java  |  7 +-
 .../phoenix/end2end/SpooledOrderByIT.java   |  4 +-
 .../phoenix/end2end/StatsCollectorIT.java   | 57 +-
 .../apache/phoenix/end2end/UpsertSelectIT.java  |  4 +-
 .../phoenix/compile/ExpressionCompiler.java |  2 +-
 .../coprocessor/MetaDataEndpointImpl.java   | 35 ++---
 .../UngroupedAggregateRegionObserver.java   | 21 --
 .../org/apache/phoenix/query/QueryServices.java |  1 +
 .../phoenix/query/QueryServicesOptions.java |  5 +-
 .../apache/phoenix/schema/MetaDataClient.java   |  4 +-
 .../org/apache/phoenix/schema/PTableImpl.java   |  2 +-
 .../phoenix/schema/stats/PTableStats.java   |  7 ++
 .../phoenix/schema/stats/PTableStatsImpl.java   | 12 ++-
 .../schema/stats/StatisticsCollector.java   | 79 
 .../phoenix/schema/stats/StatisticsScanner.java |  1 -
 .../phoenix/schema/stats/StatisticsUtil.java|  6 +-
 .../phoenix/schema/stats/StatisticsWriter.java  | 39 ++
 23 files changed, 260 insertions(+), 117 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/f3ac8478/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseClientManagedTimeIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseClientManagedTimeIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseClientManagedTimeIT.java
index 14dffcb..1acd5b3 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseClientManagedTimeIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseClientManagedTimeIT.java
@@ -17,16 +17,21 @@
  */
 package org.apache.phoenix.end2end;
 
+import java.util.Map;
+
 import javax.annotation.concurrent.NotThreadSafe;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.phoenix.query.BaseTest;
+import org.apache.phoenix.query.QueryServices;
 import org.apache.phoenix.util.ReadOnlyProps;
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.experimental.categories.Category;
 
+import com.google.common.collect.Maps;
+
 /**
  * Base class for tests that manage their own time stamps
  * We need to separate these from tests that rely on hbase to set
@@ -54,9 +59,17 @@ public abstract class BaseClientManagedTimeIT extends 
BaseTest {
 deletePriorTables(ts - 1, getUrl());
 }
 
+public static MapString,String getDefaultProps() {
+MapString,String props = Maps.newHashMapWithExpectedSize(5);
+// Must update config before starting server
+props.put(QueryServices.STATS_USE_CURRENT_TIME_ATTRIB, 
Boolean.FALSE.toString());
+return props;
+}
+
 @BeforeClass
 public static void doSetup() throws Exception {
-setUpTestDriver(ReadOnlyProps.EMPTY_PROPS);
+MapString,String props = getDefaultProps();
+setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
 }
 
 @AfterClass

http://git-wip-us.apache.org/repos/asf/phoenix/blob/f3ac8478/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseQueryIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseQueryIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseQueryIT.java
index 7a3e86e..f3031f4 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseQueryIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseQueryIT.java
@@ -48,7 +48,6 @@ import org.junit.runners.Parameterized;
 import org.junit.runners.Parameterized.Parameters;
 
 import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
 
 
 
@@ -70,7 +69,7 @@ 

Build failed in Jenkins: Phoenix | 4.0 #431

2014-10-28 Thread Apache Jenkins Server
See https://builds.apache.org/job/Phoenix-4.0/431/changes

Changes:

[jtaylor] Remove unused imports and local variables

[jtaylor] PHOENIX-1390 Stats not updated on client after major compaction

--
[...truncated 6232 lines...]
4/15K
7/15K
11/15K
15/15K
15K downloaded  (apache-12.pom)
Downloading: 
https://repository.apache.org/content/repositories/releases//org/apache/hbase/hbase-common/0.98.4-hadoop2/hbase-common-0.98.4-hadoop2.pom
4/12K
7/12K
11/12K
12/12K
12K downloaded  (hbase-common-0.98.4-hadoop2.pom)
Downloading: 
https://repository.apache.org/content/repositories/releases//commons-lang/commons-lang/2.6/commons-lang-2.6.pom
4/17K
7/17K
11/17K
15/17K
17/17K
17K downloaded  (commons-lang-2.6.pom)
Downloading: 
https://repository.apache.org/content/repositories/releases//org/apache/commons/commons-parent/17/commons-parent-17.pom
4/30K
7/30K
11/30K
15/30K
19/30K
23/30K
27/30K
30/30K
30K downloaded  (commons-parent-17.pom)
Downloading: 
https://repository.apache.org/content/repositories/releases//commons-io/commons-io/2.4/commons-io-2.4.pom
4/9K
7/9K
9/9K
9K downloaded  (commons-io-2.4.pom)
Downloading: 
https://repository.apache.org/content/repositories/releases//org/apache/commons/commons-parent/25/commons-parent-25.pom
4/47K
7/47K
11/47K
15/47K
19/47K
19/47K
23/47K
27/47K
31/47K
35/47K
39/47K
40/47K
44/47K
47/47K
47K downloaded  (commons-parent-25.pom)
Downloading: 
https://repository.apache.org/content/repositories/releases//org/apache/hadoop/hadoop-annotations/2.2.0/hadoop-annotations-2.2.0.pom
2/2K
2K downloaded  (hadoop-annotations-2.2.0.pom)
Downloading: 
https://repository.apache.org/content/repositories/releases//org/apache/hadoop/hadoop-project/2.2.0/hadoop-project-2.2.0.pom
4/36K
7/36K
11/36K
13/36K
17/36K
21/36K
25/36K
29/36K
33/36K
36/36K
36K downloaded  (hadoop-project-2.2.0.pom)
Downloading: 
https://repository.apache.org/content/repositories/releases//org/apache/hadoop/hadoop-main/2.2.0/hadoop-main-2.2.0.pom
4/16K
7/16K
11/16K
15/16K
16/16K
16K downloaded  (hadoop-main-2.2.0.pom)
Downloading: 
https://repository.apache.org/content/repositories/releases//org/apache/hadoop/hadoop-common/2.2.0/hadoop-common-2.2.0.pom
4/26K
7/26K
11/26K
15/26K
18/26K
22/26K
25/26K
26/26K
26K downloaded  (hadoop-common-2.2.0.pom)
Downloading: 
https://repository.apache.org/content/repositories/releases//org/apache/hadoop/hadoop-project-dist/2.2.0/hadoop-project-dist-2.2.0.pom
4/17K
7/17K
11/17K
15/17K
17/17K
17K downloaded  (hadoop-project-dist-2.2.0.pom)
Downloading: 
https://repository.apache.org/content/repositories/releases//org/apache/commons/commons-math/2.1/commons-math-2.1.pom
4/10K
7/10K
10/10K
10K downloaded  (commons-math-2.1.pom)
Downloading: 
https://repository.apache.org/content/repositories/releases//org/apache/commons/commons-parent/14/commons-parent-14.pom
4/30K
7/30K
11/30K
15/30K
19/30K
23/30K
27/30K
30/30K
30K downloaded  (commons-parent-14.pom)
Downloading: 
https://repository.apache.org/content/repositories/releases//xmlenc/xmlenc/0.52/xmlenc-0.52.pom
[INFO] Unable to find resource 'xmlenc:xmlenc:pom:0.52' in repository apache 
release (https://repository.apache.org/content/repositories/releases/)
Downloading: http://conjars.org/repo/xmlenc/xmlenc/0.52/xmlenc-0.52.pom
[INFO] Unable to find resource 'xmlenc:xmlenc:pom:0.52' in repository 
conjars.org (http://conjars.org/repo)
Downloading: 
https://repository.apache.org/content/repositories/snapshots//xmlenc/xmlenc/0.52/xmlenc-0.52.pom
[INFO] Unable to find resource 'xmlenc:xmlenc:pom:0.52' in repository apache 
snapshot (https://repository.apache.org/content/repositories/snapshots/)
Downloading: 
http://download.java.net/maven/2//xmlenc/xmlenc/0.52/xmlenc-0.52.pom
[INFO] Unable to find resource 'xmlenc:xmlenc:pom:0.52' in repository java.net 
(http://download.java.net/maven/2/)
Downloading: http://repository.codehaus.org//xmlenc/xmlenc/0.52/xmlenc-0.52.pom
[INFO] Unable to find resource 'xmlenc:xmlenc:pom:0.52' in repository codehaus 
(http://repository.codehaus.org/)
Downloading: 
http://repository.jboss.org/nexus/content/groups/public-jboss//xmlenc/xmlenc/0.52/xmlenc-0.52.pom
623/623b
623b downloaded  (xmlenc-0.52.pom)
Downloading: 
https://repository.apache.org/content/repositories/releases//commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.pom
[INFO] Unable to find resource 'commons-httpclient:commons-httpclient:pom:3.1' 
in repository apache release 
(https://repository.apache.org/content/repositories/releases/)
Downloading: 
http://conjars.org/repo/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.pom
[INFO] Unable to find resource 'commons-httpclient:commons-httpclient:pom:3.1' 
in repository conjars.org (http://conjars.org/repo)
Downloading: 
https://repository.apache.org/content/repositories/snapshots//commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.pom
[INFO] Unable to find resource 'commons-httpclient:commons-httpclient:pom:3.1' 
in 

git commit: Rename method in MetaDataService

2014-10-28 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.0 7a8a023a3 - b3542285f


Rename method in MetaDataService


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

Branch: refs/heads/4.0
Commit: b3542285f2960cf23f7d7dc7d26321c556aa75eb
Parents: 7a8a023
Author: James Taylor jtay...@salesforce.com
Authored: Tue Oct 28 13:01:47 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Tue Oct 28 13:01:47 2014 -0700

--
 .../coprocessor/MetaDataEndpointImpl.java   |   8 +-
 .../coprocessor/generated/MetaDataProtos.java   | 351 +--
 .../query/ConnectionQueryServicesImpl.java  |  14 +-
 phoenix-protocol/src/main/MetaDataService.proto |   8 +-
 4 files changed, 190 insertions(+), 191 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/b3542285/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
index 3abd206..7604663 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
@@ -94,14 +94,14 @@ import 
org.apache.phoenix.coprocessor.generated.MetaDataProtos;
 import 
org.apache.phoenix.coprocessor.generated.MetaDataProtos.AddColumnRequest;
 import 
org.apache.phoenix.coprocessor.generated.MetaDataProtos.ClearCacheRequest;
 import 
org.apache.phoenix.coprocessor.generated.MetaDataProtos.ClearCacheResponse;
+import 
org.apache.phoenix.coprocessor.generated.MetaDataProtos.ClearTableFromCacheRequest;
+import 
org.apache.phoenix.coprocessor.generated.MetaDataProtos.ClearTableFromCacheResponse;
 import 
org.apache.phoenix.coprocessor.generated.MetaDataProtos.CreateTableRequest;
 import 
org.apache.phoenix.coprocessor.generated.MetaDataProtos.DropColumnRequest;
 import 
org.apache.phoenix.coprocessor.generated.MetaDataProtos.DropTableRequest;
 import org.apache.phoenix.coprocessor.generated.MetaDataProtos.GetTableRequest;
 import 
org.apache.phoenix.coprocessor.generated.MetaDataProtos.GetVersionRequest;
 import 
org.apache.phoenix.coprocessor.generated.MetaDataProtos.GetVersionResponse;
-import 
org.apache.phoenix.coprocessor.generated.MetaDataProtos.IncrementTableTimeStampRequest;
-import 
org.apache.phoenix.coprocessor.generated.MetaDataProtos.IncrementTableTimeStampResponse;
 import 
org.apache.phoenix.coprocessor.generated.MetaDataProtos.MetaDataResponse;
 import 
org.apache.phoenix.coprocessor.generated.MetaDataProtos.UpdateIndexStateRequest;
 import org.apache.phoenix.hbase.index.util.GenericKeyValueBuilder;
@@ -1680,8 +1680,8 @@ public class MetaDataEndpointImpl extends 
MetaDataProtocol implements Coprocesso
 }
 
 @Override
-public void incrementTableTimeStamp(RpcController controller, 
IncrementTableTimeStampRequest request,
-RpcCallbackIncrementTableTimeStampResponse done) {
+public void clearTableFromCache(RpcController controller, 
ClearTableFromCacheRequest request,
+RpcCallbackClearTableFromCacheResponse done) {
 byte[] schemaName = request.getSchemaName().toByteArray();
 byte[] tableName = request.getTableName().toByteArray();
 try {

http://git-wip-us.apache.org/repos/asf/phoenix/blob/b3542285/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/generated/MetaDataProtos.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/generated/MetaDataProtos.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/generated/MetaDataProtos.java
index 8d153b2..f49a35e 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/generated/MetaDataProtos.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/generated/MetaDataProtos.java
@@ -6316,7 +6316,7 @@ public final class MetaDataProtos {
 // @@protoc_insertion_point(class_scope:GetVersionResponse)
   }
 
-  public interface IncrementTableTimeStampRequestOrBuilder
+  public interface ClearTableFromCacheRequestOrBuilder
   extends com.google.protobuf.MessageOrBuilder {
 
 // required bytes tenantId = 1;
@@ -6360,24 +6360,24 @@ public final class MetaDataProtos {
 long getClientTimestamp();
   }
   /**
-   * Protobuf type {@code IncrementTableTimeStampRequest}
+   * Protobuf type {@code ClearTableFromCacheRequest}
*/
-  public static 

[1/2] git commit: Rename method in MetaDataService

2014-10-28 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/master f3ac84780 - 172dd0698


Rename method in MetaDataService


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

Branch: refs/heads/master
Commit: c32c60e37b283419970306d304f393f036fd86fd
Parents: f3ac847
Author: James Taylor jtay...@salesforce.com
Authored: Tue Oct 28 13:01:47 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Tue Oct 28 13:03:01 2014 -0700

--
 .../coprocessor/MetaDataEndpointImpl.java   |   8 +-
 .../coprocessor/generated/MetaDataProtos.java   | 351 +--
 .../query/ConnectionQueryServicesImpl.java  |  14 +-
 phoenix-protocol/src/main/MetaDataService.proto |   8 +-
 4 files changed, 190 insertions(+), 191 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c32c60e3/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
index ba4d8d9..0c1d1c8 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
@@ -94,14 +94,14 @@ import 
org.apache.phoenix.coprocessor.generated.MetaDataProtos;
 import 
org.apache.phoenix.coprocessor.generated.MetaDataProtos.AddColumnRequest;
 import 
org.apache.phoenix.coprocessor.generated.MetaDataProtos.ClearCacheRequest;
 import 
org.apache.phoenix.coprocessor.generated.MetaDataProtos.ClearCacheResponse;
+import 
org.apache.phoenix.coprocessor.generated.MetaDataProtos.ClearTableFromCacheRequest;
+import 
org.apache.phoenix.coprocessor.generated.MetaDataProtos.ClearTableFromCacheResponse;
 import 
org.apache.phoenix.coprocessor.generated.MetaDataProtos.CreateTableRequest;
 import 
org.apache.phoenix.coprocessor.generated.MetaDataProtos.DropColumnRequest;
 import 
org.apache.phoenix.coprocessor.generated.MetaDataProtos.DropTableRequest;
 import org.apache.phoenix.coprocessor.generated.MetaDataProtos.GetTableRequest;
 import 
org.apache.phoenix.coprocessor.generated.MetaDataProtos.GetVersionRequest;
 import 
org.apache.phoenix.coprocessor.generated.MetaDataProtos.GetVersionResponse;
-import 
org.apache.phoenix.coprocessor.generated.MetaDataProtos.IncrementTableTimeStampRequest;
-import 
org.apache.phoenix.coprocessor.generated.MetaDataProtos.IncrementTableTimeStampResponse;
 import 
org.apache.phoenix.coprocessor.generated.MetaDataProtos.MetaDataResponse;
 import 
org.apache.phoenix.coprocessor.generated.MetaDataProtos.UpdateIndexStateRequest;
 import org.apache.phoenix.hbase.index.util.GenericKeyValueBuilder;
@@ -1682,8 +1682,8 @@ public class MetaDataEndpointImpl extends 
MetaDataProtocol implements Coprocesso
 }
 
 @Override
-public void incrementTableTimeStamp(RpcController controller, 
IncrementTableTimeStampRequest request,
-RpcCallbackIncrementTableTimeStampResponse done) {
+public void clearTableFromCache(RpcController controller, 
ClearTableFromCacheRequest request,
+RpcCallbackClearTableFromCacheResponse done) {
 byte[] schemaName = request.getSchemaName().toByteArray();
 byte[] tableName = request.getTableName().toByteArray();
 try {

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c32c60e3/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/generated/MetaDataProtos.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/generated/MetaDataProtos.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/generated/MetaDataProtos.java
index 8d153b2..f49a35e 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/generated/MetaDataProtos.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/generated/MetaDataProtos.java
@@ -6316,7 +6316,7 @@ public final class MetaDataProtos {
 // @@protoc_insertion_point(class_scope:GetVersionResponse)
   }
 
-  public interface IncrementTableTimeStampRequestOrBuilder
+  public interface ClearTableFromCacheRequestOrBuilder
   extends com.google.protobuf.MessageOrBuilder {
 
 // required bytes tenantId = 1;
@@ -6360,24 +6360,24 @@ public final class MetaDataProtos {
 long getClientTimestamp();
   }
   /**
-   * Protobuf type {@code IncrementTableTimeStampRequest}
+   * Protobuf type {@code ClearTableFromCacheRequest}
*/
-  public 

[2/2] git commit: Serialize table ts of when stats calculated

2014-10-28 Thread jamestaylor
Serialize table ts of when stats calculated


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

Branch: refs/heads/master
Commit: 172dd069843df995d7e7f3dd762573a14c84c3a2
Parents: c32c60e
Author: James Taylor jtay...@salesforce.com
Authored: Tue Oct 28 13:16:12 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Tue Oct 28 13:16:12 2014 -0700

--
 .../coprocessor/generated/PTableProtos.java | 103 +--
 .../org/apache/phoenix/schema/PTableImpl.java   |   5 +-
 phoenix-protocol/src/main/PTable.proto  |   1 +
 3 files changed, 101 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/172dd069/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/generated/PTableProtos.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/generated/PTableProtos.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/generated/PTableProtos.java
index f1b3be1..ff2cfe4 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/generated/PTableProtos.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/generated/PTableProtos.java
@@ -2722,6 +2722,16 @@ public final class PTableProtos {
  * codeoptional bytes indexType = 22;/code
  */
 com.google.protobuf.ByteString getIndexType();
+
+// optional int64 statsTimeStamp = 23;
+/**
+ * codeoptional int64 statsTimeStamp = 23;/code
+ */
+boolean hasStatsTimeStamp();
+/**
+ * codeoptional int64 statsTimeStamp = 23;/code
+ */
+long getStatsTimeStamp();
   }
   /**
* Protobuf type {@code PTable}
@@ -2902,6 +2912,11 @@ public final class PTableProtos {
   indexType_ = input.readBytes();
   break;
 }
+case 184: {
+  bitField0_ |= 0x0004;
+  statsTimeStamp_ = input.readInt64();
+  break;
+}
   }
 }
   } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -3400,6 +3415,22 @@ public final class PTableProtos {
   return indexType_;
 }
 
+// optional int64 statsTimeStamp = 23;
+public static final int STATSTIMESTAMP_FIELD_NUMBER = 23;
+private long statsTimeStamp_;
+/**
+ * codeoptional int64 statsTimeStamp = 23;/code
+ */
+public boolean hasStatsTimeStamp() {
+  return ((bitField0_  0x0004) == 0x0004);
+}
+/**
+ * codeoptional int64 statsTimeStamp = 23;/code
+ */
+public long getStatsTimeStamp() {
+  return statsTimeStamp_;
+}
+
 private void initFields() {
   schemaNameBytes_ = com.google.protobuf.ByteString.EMPTY;
   tableNameBytes_ = com.google.protobuf.ByteString.EMPTY;
@@ -3423,6 +3454,7 @@ public final class PTableProtos {
   tenantId_ = com.google.protobuf.ByteString.EMPTY;
   viewIndexId_ = 0;
   indexType_ = com.google.protobuf.ByteString.EMPTY;
+  statsTimeStamp_ = 0L;
 }
 private byte memoizedIsInitialized = -1;
 public final boolean isInitialized() {
@@ -3556,6 +3588,9 @@ public final class PTableProtos {
   if (((bitField0_  0x0002) == 0x0002)) {
 output.writeBytes(22, indexType_);
   }
+  if (((bitField0_  0x0004) == 0x0004)) {
+output.writeInt64(23, statsTimeStamp_);
+  }
   getUnknownFields().writeTo(output);
 }
 
@@ -3658,6 +3693,10 @@ public final class PTableProtos {
 size += com.google.protobuf.CodedOutputStream
   .computeBytesSize(22, indexType_);
   }
+  if (((bitField0_  0x0004) == 0x0004)) {
+size += com.google.protobuf.CodedOutputStream
+  .computeInt64Size(23, statsTimeStamp_);
+  }
   size += getUnknownFields().getSerializedSize();
   memoizedSerializedSize = size;
   return size;
@@ -3779,6 +3818,11 @@ public final class PTableProtos {
 result = result  getIndexType()
 .equals(other.getIndexType());
   }
+  result = result  (hasStatsTimeStamp() == other.hasStatsTimeStamp());
+  if (hasStatsTimeStamp()) {
+result = result  (getStatsTimeStamp()
+== other.getStatsTimeStamp());
+  }
   result = result 
   getUnknownFields().equals(other.getUnknownFields());
   return result;
@@ -3880,6 +3924,10 @@ public final class PTableProtos {
 hash = (37 * hash) + INDEXTYPE_FIELD_NUMBER;
 hash = (53 * hash) + getIndexType().hashCode();
   }
+  if (hasStatsTimeStamp()) {
+hash = (37 * hash) + 

git commit: Serialize table ts of when stats calculated

2014-10-28 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.0 b3542285f - 346891be7


Serialize table ts of when stats calculated


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

Branch: refs/heads/4.0
Commit: 346891be76a5307b41912af408f8adeef1283ae0
Parents: b354228
Author: James Taylor jtay...@salesforce.com
Authored: Tue Oct 28 13:16:12 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Tue Oct 28 13:17:01 2014 -0700

--
 .../coprocessor/generated/PTableProtos.java | 103 +--
 .../org/apache/phoenix/schema/PTableImpl.java   |   5 +-
 phoenix-protocol/src/main/PTable.proto  |   1 +
 3 files changed, 101 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/346891be/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/generated/PTableProtos.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/generated/PTableProtos.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/generated/PTableProtos.java
index f1b3be1..ff2cfe4 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/generated/PTableProtos.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/generated/PTableProtos.java
@@ -2722,6 +2722,16 @@ public final class PTableProtos {
  * codeoptional bytes indexType = 22;/code
  */
 com.google.protobuf.ByteString getIndexType();
+
+// optional int64 statsTimeStamp = 23;
+/**
+ * codeoptional int64 statsTimeStamp = 23;/code
+ */
+boolean hasStatsTimeStamp();
+/**
+ * codeoptional int64 statsTimeStamp = 23;/code
+ */
+long getStatsTimeStamp();
   }
   /**
* Protobuf type {@code PTable}
@@ -2902,6 +2912,11 @@ public final class PTableProtos {
   indexType_ = input.readBytes();
   break;
 }
+case 184: {
+  bitField0_ |= 0x0004;
+  statsTimeStamp_ = input.readInt64();
+  break;
+}
   }
 }
   } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -3400,6 +3415,22 @@ public final class PTableProtos {
   return indexType_;
 }
 
+// optional int64 statsTimeStamp = 23;
+public static final int STATSTIMESTAMP_FIELD_NUMBER = 23;
+private long statsTimeStamp_;
+/**
+ * codeoptional int64 statsTimeStamp = 23;/code
+ */
+public boolean hasStatsTimeStamp() {
+  return ((bitField0_  0x0004) == 0x0004);
+}
+/**
+ * codeoptional int64 statsTimeStamp = 23;/code
+ */
+public long getStatsTimeStamp() {
+  return statsTimeStamp_;
+}
+
 private void initFields() {
   schemaNameBytes_ = com.google.protobuf.ByteString.EMPTY;
   tableNameBytes_ = com.google.protobuf.ByteString.EMPTY;
@@ -3423,6 +3454,7 @@ public final class PTableProtos {
   tenantId_ = com.google.protobuf.ByteString.EMPTY;
   viewIndexId_ = 0;
   indexType_ = com.google.protobuf.ByteString.EMPTY;
+  statsTimeStamp_ = 0L;
 }
 private byte memoizedIsInitialized = -1;
 public final boolean isInitialized() {
@@ -3556,6 +3588,9 @@ public final class PTableProtos {
   if (((bitField0_  0x0002) == 0x0002)) {
 output.writeBytes(22, indexType_);
   }
+  if (((bitField0_  0x0004) == 0x0004)) {
+output.writeInt64(23, statsTimeStamp_);
+  }
   getUnknownFields().writeTo(output);
 }
 
@@ -3658,6 +3693,10 @@ public final class PTableProtos {
 size += com.google.protobuf.CodedOutputStream
   .computeBytesSize(22, indexType_);
   }
+  if (((bitField0_  0x0004) == 0x0004)) {
+size += com.google.protobuf.CodedOutputStream
+  .computeInt64Size(23, statsTimeStamp_);
+  }
   size += getUnknownFields().getSerializedSize();
   memoizedSerializedSize = size;
   return size;
@@ -3779,6 +3818,11 @@ public final class PTableProtos {
 result = result  getIndexType()
 .equals(other.getIndexType());
   }
+  result = result  (hasStatsTimeStamp() == other.hasStatsTimeStamp());
+  if (hasStatsTimeStamp()) {
+result = result  (getStatsTimeStamp()
+== other.getStatsTimeStamp());
+  }
   result = result 
   getUnknownFields().equals(other.getUnknownFields());
   return result;
@@ -3880,6 +3924,10 @@ public final class PTableProtos {
 hash = (37 * hash) + INDEXTYPE_FIELD_NUMBER;
 hash = (53 * hash) + getIndexType().hashCode();
   }
+ 

git commit: PHOENIX-1391 Remove obsolete hint

2014-10-28 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.0 346891be7 - 668d6ee48


PHOENIX-1391 Remove obsolete hint


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

Branch: refs/heads/4.0
Commit: 668d6ee48ccd4c616966a173ad00393694ff1b50
Parents: 346891b
Author: James Taylor jtay...@salesforce.com
Authored: Tue Oct 28 14:08:08 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Tue Oct 28 14:08:08 2014 -0700

--
 .../end2end/SkipScanAfterManualSplitIT.java|  2 +-
 .../org/apache/phoenix/execute/BaseQueryPlan.java  |  6 ++
 .../org/apache/phoenix/iterate/ExplainTable.java   | 17 +++--
 .../apache/phoenix/iterate/ParallelIterators.java  |  2 +-
 .../phoenix/jdbc/PhoenixDatabaseMetaData.java  | 15 +++
 .../java/org/apache/phoenix/parse/HintNode.java|  9 -
 .../phoenix/query/BaseConnectionlessQueryTest.java |  2 ++
 .../org/apache/phoenix/query/QueryPlanTest.java|  8 
 8 files changed, 44 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/668d6ee4/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanAfterManualSplitIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanAfterManualSplitIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanAfterManualSplitIT.java
index 22b33f8..0478816 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanAfterManualSplitIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanAfterManualSplitIT.java
@@ -128,7 +128,7 @@ public class SkipScanAfterManualSplitIT extends 
BaseHBaseManagedTimeIT {
 assertEquals(nRegions, nInitialRegions);
 
 int nRows = 2;
-String query = SELECT /*+ NO_INTRA_REGION_PARALLELIZATION */ 
count(*) FROM S WHERE a IN ('tl','jt',' a',' b',' c',' d');
+String query = SELECT count(*) FROM S WHERE a IN ('tl','jt',' 
a',' b',' c',' d');
 ResultSet rs1 = conn.createStatement().executeQuery(query);
 assertTrue(rs1.next());
 nRegions = services.getAllTableRegions(TABLE_NAME_BYTES).size();

http://git-wip-us.apache.org/repos/asf/phoenix/blob/668d6ee4/phoenix-core/src/main/java/org/apache/phoenix/execute/BaseQueryPlan.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/execute/BaseQueryPlan.java 
b/phoenix-core/src/main/java/org/apache/phoenix/execute/BaseQueryPlan.java
index 03c643d..d91ad51 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/execute/BaseQueryPlan.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/execute/BaseQueryPlan.java
@@ -48,6 +48,7 @@ import 
org.apache.phoenix.iterate.ParallelIterators.ParallelIteratorFactory;
 import org.apache.phoenix.iterate.ResultIterator;
 import org.apache.phoenix.jdbc.PhoenixConnection;
 import org.apache.phoenix.parse.FilterableStatement;
+import org.apache.phoenix.parse.HintNode.Hint;
 import org.apache.phoenix.parse.ParseNodeFactory;
 import org.apache.phoenix.parse.TableName;
 import org.apache.phoenix.schema.KeyValueSchema;
@@ -165,6 +166,11 @@ public abstract class BaseQueryPlan implements QueryPlan {
 if (OrderBy.REV_ROW_KEY_ORDER_BY.equals(orderBy)) {
 ScanUtil.setReversed(scan);
 }
+
+if (statement.getHint().hasHint(Hint.SMALL)) {
+scan.setSmall(true);
+}
+
 // Set producer on scan so HBase server does round robin processing
 //setProducer(scan);
 // Set the time range on the scan so we don't get back rows newer than 
when the statement was compiled

http://git-wip-us.apache.org/repos/asf/phoenix/blob/668d6ee4/phoenix-core/src/main/java/org/apache/phoenix/iterate/ExplainTable.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/ExplainTable.java 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/ExplainTable.java
index 40a0cff..8c04383 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/iterate/ExplainTable.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/iterate/ExplainTable.java
@@ -31,9 +31,12 @@ import org.apache.hadoop.hbase.filter.PageFilter;
 import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.phoenix.compile.GroupByCompiler.GroupBy;
+import org.apache.phoenix.compile.OrderByCompiler.OrderBy;
 import 

git commit: PHOENIX-1391 Remove obsolete hint

2014-10-28 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/master 172dd0698 - 41f62bd50


PHOENIX-1391 Remove obsolete hint


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

Branch: refs/heads/master
Commit: 41f62bd50ff753c8815be79c58a57d27b556
Parents: 172dd06
Author: James Taylor jtay...@salesforce.com
Authored: Tue Oct 28 14:08:08 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Tue Oct 28 14:09:03 2014 -0700

--
 .../end2end/SkipScanAfterManualSplitIT.java|  2 +-
 .../org/apache/phoenix/execute/BaseQueryPlan.java  |  6 ++
 .../org/apache/phoenix/iterate/ExplainTable.java   | 17 +++--
 .../apache/phoenix/iterate/ParallelIterators.java  |  2 +-
 .../phoenix/jdbc/PhoenixDatabaseMetaData.java  | 15 +++
 .../java/org/apache/phoenix/parse/HintNode.java|  9 -
 .../phoenix/query/BaseConnectionlessQueryTest.java |  2 ++
 .../org/apache/phoenix/query/QueryPlanTest.java|  8 
 8 files changed, 44 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/41f62bd5/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanAfterManualSplitIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanAfterManualSplitIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanAfterManualSplitIT.java
index a07ad0e..3c0344c 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanAfterManualSplitIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanAfterManualSplitIT.java
@@ -128,7 +128,7 @@ public class SkipScanAfterManualSplitIT extends 
BaseHBaseManagedTimeIT {
 assertEquals(nRegions, nInitialRegions);
 
 int nRows = 2;
-String query = SELECT /*+ NO_INTRA_REGION_PARALLELIZATION */ 
count(*) FROM S WHERE a IN ('tl','jt',' a',' b',' c',' d');
+String query = SELECT count(*) FROM S WHERE a IN ('tl','jt',' 
a',' b',' c',' d');
 ResultSet rs1 = conn.createStatement().executeQuery(query);
 assertTrue(rs1.next());
 nRegions = services.getAllTableRegions(TABLE_NAME_BYTES).size();

http://git-wip-us.apache.org/repos/asf/phoenix/blob/41f62bd5/phoenix-core/src/main/java/org/apache/phoenix/execute/BaseQueryPlan.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/execute/BaseQueryPlan.java 
b/phoenix-core/src/main/java/org/apache/phoenix/execute/BaseQueryPlan.java
index 03c643d..d91ad51 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/execute/BaseQueryPlan.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/execute/BaseQueryPlan.java
@@ -48,6 +48,7 @@ import 
org.apache.phoenix.iterate.ParallelIterators.ParallelIteratorFactory;
 import org.apache.phoenix.iterate.ResultIterator;
 import org.apache.phoenix.jdbc.PhoenixConnection;
 import org.apache.phoenix.parse.FilterableStatement;
+import org.apache.phoenix.parse.HintNode.Hint;
 import org.apache.phoenix.parse.ParseNodeFactory;
 import org.apache.phoenix.parse.TableName;
 import org.apache.phoenix.schema.KeyValueSchema;
@@ -165,6 +166,11 @@ public abstract class BaseQueryPlan implements QueryPlan {
 if (OrderBy.REV_ROW_KEY_ORDER_BY.equals(orderBy)) {
 ScanUtil.setReversed(scan);
 }
+
+if (statement.getHint().hasHint(Hint.SMALL)) {
+scan.setSmall(true);
+}
+
 // Set producer on scan so HBase server does round robin processing
 //setProducer(scan);
 // Set the time range on the scan so we don't get back rows newer than 
when the statement was compiled

http://git-wip-us.apache.org/repos/asf/phoenix/blob/41f62bd5/phoenix-core/src/main/java/org/apache/phoenix/iterate/ExplainTable.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/ExplainTable.java 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/ExplainTable.java
index 40a0cff..8c04383 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/iterate/ExplainTable.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/iterate/ExplainTable.java
@@ -31,9 +31,12 @@ import org.apache.hadoop.hbase.filter.PageFilter;
 import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.phoenix.compile.GroupByCompiler.GroupBy;
+import org.apache.phoenix.compile.OrderByCompiler.OrderBy;
 import 

Apache-Phoenix | Master | Build Successful

2014-10-28 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
[jtaylor] Remove unused imports and local variables

[jtaylor] PHOENIX-1390 Stats not updated on client after major compaction



Jenkins build is back to normal : Phoenix | 4.0 #432

2014-10-28 Thread Apache Jenkins Server
See https://builds.apache.org/job/Phoenix-4.0/432/changes



[2/3] git commit: PHOENIX-1391 Remove obsolete hint

2014-10-28 Thread jamestaylor
PHOENIX-1391 Remove obsolete hint

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


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

Branch: refs/heads/3.0
Commit: 4767f139b2ef125549a4a727bdb33bbf9d54bda2
Parents: 6c94dc6
Author: James Taylor jtay...@salesforce.com
Authored: Tue Oct 28 14:08:08 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Tue Oct 28 15:28:14 2014 -0700

--
 .../end2end/SkipScanAfterManualSplitIT.java|  2 +-
 .../phoenix/coprocessor/MetaDataEndpointImpl.java  |  2 +-
 .../phoenix/coprocessor/MetaDataProtocol.java  |  2 +-
 .../org/apache/phoenix/execute/BaseQueryPlan.java  |  6 ++
 .../org/apache/phoenix/iterate/ExplainTable.java   | 17 +++--
 .../apache/phoenix/iterate/ParallelIterators.java  |  2 +-
 .../phoenix/jdbc/PhoenixDatabaseMetaData.java  | 15 +++
 .../java/org/apache/phoenix/parse/HintNode.java|  9 -
 .../phoenix/query/ConnectionQueryServices.java |  2 +-
 .../phoenix/query/ConnectionQueryServicesImpl.java |  4 ++--
 .../query/ConnectionlessQueryServicesImpl.java |  2 +-
 .../query/DelegateConnectionQueryServices.java |  4 ++--
 .../org/apache/phoenix/schema/MetaDataClient.java  |  2 +-
 .../java/org/apache/phoenix/util/ScanUtil.java | 13 +
 .../phoenix/query/BaseConnectionlessQueryTest.java |  2 ++
 .../org/apache/phoenix/query/QueryPlanTest.java|  8 
 16 files changed, 62 insertions(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/4767f139/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanAfterManualSplitIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanAfterManualSplitIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanAfterManualSplitIT.java
index a07ad0e..3c0344c 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanAfterManualSplitIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanAfterManualSplitIT.java
@@ -128,7 +128,7 @@ public class SkipScanAfterManualSplitIT extends 
BaseHBaseManagedTimeIT {
 assertEquals(nRegions, nInitialRegions);
 
 int nRows = 2;
-String query = SELECT /*+ NO_INTRA_REGION_PARALLELIZATION */ 
count(*) FROM S WHERE a IN ('tl','jt',' a',' b',' c',' d');
+String query = SELECT count(*) FROM S WHERE a IN ('tl','jt',' 
a',' b',' c',' d');
 ResultSet rs1 = conn.createStatement().executeQuery(query);
 assertTrue(rs1.next());
 nRegions = services.getAllTableRegions(TABLE_NAME_BYTES).size();

http://git-wip-us.apache.org/repos/asf/phoenix/blob/4767f139/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
index 38277c5..0327c35 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
@@ -1384,7 +1384,7 @@ public class MetaDataEndpointImpl extends 
BaseEndpointCoprocessor implements Met
 }
 
 @Override
-public void incrementTableTimeStamp(byte[] tenantId, byte[] schemaName, 
byte[] tableName, final long clientTimeStamp)
+public void clearTableFromCache(byte[] tenantId, byte[] schemaName, byte[] 
tableName, final long clientTimeStamp)
 throws IOException {
 try {
 byte[] key = SchemaUtil.getTableKey(tenantId, schemaName, 
tableName);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/4767f139/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
index 7979757..76fb129 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
@@ -266,7 +266,7 @@ public interface MetaDataProtocol extends 
CoprocessorProtocol {
  */
 void clearCache();
 
-void incrementTableTimeStamp(byte[] tenantId, 

[1/3] git commit: PHOENIX-1390 Stats not updated on client after major compaction

2014-10-28 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/3.0 72144f178 - 311b5aa0a


PHOENIX-1390 Stats not updated on client after major compaction

Conflicts:

phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorIT.java

Conflicts:
phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseQueryIT.java
phoenix-core/src/it/java/org/apache/phoenix/end2end/ReverseScanIT.java

phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorIT.java

phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java

phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java

phoenix-core/src/main/java/org/apache/phoenix/query/QueryServicesOptions.java
phoenix-core/src/main/java/org/apache/phoenix/schema/PTableImpl.java

phoenix-core/src/main/java/org/apache/phoenix/schema/stats/PTableStatsImpl.java

phoenix-core/src/main/java/org/apache/phoenix/schema/stats/StatisticsCollector.java

phoenix-core/src/main/java/org/apache/phoenix/schema/stats/StatisticsUtil.java


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

Branch: refs/heads/3.0
Commit: 6c94dc6eb62c1cb4e255d9817af8c985be739785
Parents: 72144f1
Author: James Taylor jtay...@salesforce.com
Authored: Tue Oct 28 12:44:37 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Tue Oct 28 15:18:39 2014 -0700

--
 .../end2end/BaseClientManagedTimeIT.java|  15 +-
 .../org/apache/phoenix/end2end/BaseQueryIT.java |   3 +-
 .../end2end/ClientTimeArithmeticQueryIT.java|  43 ++
 .../phoenix/end2end/InMemoryOrderByIT.java  |   4 +-
 .../org/apache/phoenix/end2end/QueryIT.java |  24 ++-
 .../org/apache/phoenix/end2end/SequenceIT.java  |   7 +-
 .../phoenix/end2end/SpooledOrderByIT.java   |   4 +-
 .../phoenix/end2end/StatsCollectorIT.java   |  55 ++-
 .../apache/phoenix/end2end/UpsertSelectIT.java  |   4 +-
 .../phoenix/compile/ExpressionCompiler.java |   2 +-
 .../coprocessor/MetaDataEndpointImpl.java   |  35 +
 .../UngroupedAggregateRegionObserver.java   |  21 ++-
 .../org/apache/phoenix/query/QueryServices.java |   1 +
 .../phoenix/query/QueryServicesOptions.java |   7 +-
 .../apache/phoenix/schema/MetaDataClient.java   |   4 +-
 .../phoenix/schema/stats/PTableStats.java   |   7 +
 .../phoenix/schema/stats/PTableStatsImpl.java   |  12 +-
 .../schema/stats/StatisticsCollector.java   | 154 +++
 .../phoenix/schema/stats/StatisticsScanner.java |   1 -
 .../phoenix/schema/stats/StatisticsUtil.java|   6 +-
 .../phoenix/schema/stats/StatisticsWriter.java  |  39 +++--
 21 files changed, 297 insertions(+), 151 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/6c94dc6e/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseClientManagedTimeIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseClientManagedTimeIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseClientManagedTimeIT.java
index 14dffcb..1acd5b3 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseClientManagedTimeIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseClientManagedTimeIT.java
@@ -17,16 +17,21 @@
  */
 package org.apache.phoenix.end2end;
 
+import java.util.Map;
+
 import javax.annotation.concurrent.NotThreadSafe;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.phoenix.query.BaseTest;
+import org.apache.phoenix.query.QueryServices;
 import org.apache.phoenix.util.ReadOnlyProps;
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.experimental.categories.Category;
 
+import com.google.common.collect.Maps;
+
 /**
  * Base class for tests that manage their own time stamps
  * We need to separate these from tests that rely on hbase to set
@@ -54,9 +59,17 @@ public abstract class BaseClientManagedTimeIT extends 
BaseTest {
 deletePriorTables(ts - 1, getUrl());
 }
 
+public static MapString,String getDefaultProps() {
+MapString,String props = Maps.newHashMapWithExpectedSize(5);
+// Must update config before starting server
+props.put(QueryServices.STATS_USE_CURRENT_TIME_ATTRIB, 
Boolean.FALSE.toString());
+return props;
+}
+
 @BeforeClass
 public static void doSetup() throws Exception {
-setUpTestDriver(ReadOnlyProps.EMPTY_PROPS);
+MapString,String props = getDefaultProps();
+

[3/3] git commit: Update QueryPlanTest to remove reverse test

2014-10-28 Thread jamestaylor
Update QueryPlanTest to remove reverse test


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

Branch: refs/heads/3.0
Commit: 311b5aa0ac4cbe6f0db0654340769a4cd4be84eb
Parents: 4767f13
Author: James Taylor jtay...@salesforce.com
Authored: Tue Oct 28 15:54:46 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Tue Oct 28 15:54:46 2014 -0700

--
 .../src/test/java/org/apache/phoenix/query/QueryPlanTest.java| 4 
 1 file changed, 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/311b5aa0/phoenix-core/src/test/java/org/apache/phoenix/query/QueryPlanTest.java
--
diff --git 
a/phoenix-core/src/test/java/org/apache/phoenix/query/QueryPlanTest.java 
b/phoenix-core/src/test/java/org/apache/phoenix/query/QueryPlanTest.java
index 1e3df0b..5205c99 100644
--- a/phoenix-core/src/test/java/org/apache/phoenix/query/QueryPlanTest.java
+++ b/phoenix-core/src/test/java/org/apache/phoenix/query/QueryPlanTest.java
@@ -45,10 +45,6 @@ public class QueryPlanTest extends 
BaseConnectionlessQueryTest {
 CLIENT PARALLEL 1-WAY SMALL SKIP SCAN ON 3 KEYS OVER PTSDB3 
[~'na3'] - [~'na1']\n + 
 SERVER FILTER BY FIRST KEY ONLY,
 
-SELECT inst,date FROM PTSDB2 WHERE inst = 'na1' ORDER BY inst 
DESC, date DESC,
-CLIENT PARALLEL 1-WAY REVERSE RANGE SCAN OVER PTSDB2 
['na1']\n +
-SERVER FILTER BY FIRST KEY ONLY,
-
 SELECT host FROM PTSDB WHERE inst IS NULL AND host IS NOT 
NULL AND date = to_date('2013-01-01'),
 CLIENT PARALLEL 1-WAY RANGE SCAN OVER PTSDB [null,not 
null]\n + 
 SERVER FILTER BY FIRST KEY ONLY AND DATE = '2013-01-01 
00:00:00.000',



git commit: Rename method for consistency

2014-10-28 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.0 668d6ee48 - 6477e0fd3


Rename method for consistency


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

Branch: refs/heads/4.0
Commit: 6477e0fd3de14a1f1c351ef2a576ff70b6c7ff5b
Parents: 668d6ee
Author: James Taylor jtay...@salesforce.com
Authored: Tue Oct 28 15:58:01 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Tue Oct 28 15:58:01 2014 -0700

--
 .../java/org/apache/phoenix/query/ConnectionQueryServices.java   | 2 +-
 .../org/apache/phoenix/query/ConnectionQueryServicesImpl.java| 2 +-
 .../apache/phoenix/query/ConnectionlessQueryServicesImpl.java| 2 +-
 .../apache/phoenix/query/DelegateConnectionQueryServices.java| 4 ++--
 .../src/main/java/org/apache/phoenix/schema/MetaDataClient.java  | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/6477e0fd/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServices.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServices.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServices.java
index 8af9310..8826b48 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServices.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServices.java
@@ -104,7 +104,7 @@ public interface ConnectionQueryServices extends 
QueryServices, MetaDataMutated
 public boolean supportsFeature(Feature feature);
 
 public String getUserName();
-public void incrementTableTimeStamp(final byte[] tenantId, final byte[] 
schemaName, final byte[] tableName, long clientTS) throws SQLException;
+public void clearTableFromCache(final byte[] tenantId, final byte[] 
schemaName, final byte[] tableName, long clientTS) throws SQLException;
 
 public PTableStats getTableStats(byte[] physicalName, long 
clientTimeStamp) throws SQLException;
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/6477e0fd/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index 4f3a346..21208b5 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -1887,7 +1887,7 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
 }
 
 @Override
-public void incrementTableTimeStamp(final byte[] tenantId, final byte[] 
schemaName, final byte[] tableName,
+public void clearTableFromCache(final byte[] tenantId, final byte[] 
schemaName, final byte[] tableName,
 final long clientTS) throws SQLException {
 // clear the meta data cache for the table here
 try {

http://git-wip-us.apache.org/repos/asf/phoenix/blob/6477e0fd/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
index 386050c..ec10d5f 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
@@ -231,7 +231,7 @@ public class ConnectionlessQueryServicesImpl extends 
DelegateQueryServices imple
 }
 
 @Override
-public void incrementTableTimeStamp(byte[] tenantId, byte[] schemaName, 
byte[] tableName, long clientTS)
+public void clearTableFromCache(byte[] tenantId, byte[] schemaName, byte[] 
tableName, long clientTS)
 throws SQLException {}
 // TODO: share this with ConnectionQueryServicesImpl
 @Override

http://git-wip-us.apache.org/repos/asf/phoenix/blob/6477e0fd/phoenix-core/src/main/java/org/apache/phoenix/query/DelegateConnectionQueryServices.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/DelegateConnectionQueryServices.java
 

git commit: Rename method for consistency

2014-10-28 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/master 41f62bd50 - 668bc2310


Rename method for consistency


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

Branch: refs/heads/master
Commit: 668bc2310c764058ed8f5b17bc1500d8eeb8a33d
Parents: 41f62bd
Author: James Taylor jtay...@salesforce.com
Authored: Tue Oct 28 15:58:01 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Tue Oct 28 15:58:42 2014 -0700

--
 .../java/org/apache/phoenix/query/ConnectionQueryServices.java   | 2 +-
 .../org/apache/phoenix/query/ConnectionQueryServicesImpl.java| 2 +-
 .../apache/phoenix/query/ConnectionlessQueryServicesImpl.java| 2 +-
 .../apache/phoenix/query/DelegateConnectionQueryServices.java| 4 ++--
 .../src/main/java/org/apache/phoenix/schema/MetaDataClient.java  | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/668bc231/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServices.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServices.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServices.java
index 8af9310..8826b48 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServices.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServices.java
@@ -104,7 +104,7 @@ public interface ConnectionQueryServices extends 
QueryServices, MetaDataMutated
 public boolean supportsFeature(Feature feature);
 
 public String getUserName();
-public void incrementTableTimeStamp(final byte[] tenantId, final byte[] 
schemaName, final byte[] tableName, long clientTS) throws SQLException;
+public void clearTableFromCache(final byte[] tenantId, final byte[] 
schemaName, final byte[] tableName, long clientTS) throws SQLException;
 
 public PTableStats getTableStats(byte[] physicalName, long 
clientTimeStamp) throws SQLException;
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/668bc231/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index a267b47..2abc49b 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -1887,7 +1887,7 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
 }
 
 @Override
-public void incrementTableTimeStamp(final byte[] tenantId, final byte[] 
schemaName, final byte[] tableName,
+public void clearTableFromCache(final byte[] tenantId, final byte[] 
schemaName, final byte[] tableName,
 final long clientTS) throws SQLException {
 // clear the meta data cache for the table here
 try {

http://git-wip-us.apache.org/repos/asf/phoenix/blob/668bc231/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
index 386050c..ec10d5f 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
@@ -231,7 +231,7 @@ public class ConnectionlessQueryServicesImpl extends 
DelegateQueryServices imple
 }
 
 @Override
-public void incrementTableTimeStamp(byte[] tenantId, byte[] schemaName, 
byte[] tableName, long clientTS)
+public void clearTableFromCache(byte[] tenantId, byte[] schemaName, byte[] 
tableName, long clientTS)
 throws SQLException {}
 // TODO: share this with ConnectionQueryServicesImpl
 @Override

http://git-wip-us.apache.org/repos/asf/phoenix/blob/668bc231/phoenix-core/src/main/java/org/apache/phoenix/query/DelegateConnectionQueryServices.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/DelegateConnectionQueryServices.java
 

git commit: Update CHANGES and fix Apache RAT warning

2014-10-28 Thread mujtaba
Repository: phoenix
Updated Branches:
  refs/heads/4.0 6477e0fd3 - 5614dbd5e


Update CHANGES and fix Apache RAT warning


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

Branch: refs/heads/4.0
Commit: 5614dbd5eb196cd13ee8c8ea75ee7927cd6644a3
Parents: 6477e0f
Author: Mujtaba mujt...@apache.org
Authored: Tue Oct 28 16:17:13 2014 -0700
Committer: Mujtaba mujt...@apache.org
Committed: Tue Oct 28 16:17:13 2014 -0700

--
 CHANGES| 14 ++
 .../org/apache/phoenix/trace/TracingTestUtil.java  | 17 +
 2 files changed, 31 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/5614dbd5/CHANGES
--
diff --git a/CHANGES b/CHANGES
index 840a91a..745a7c6 100644
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,8 @@ Release Notes - Phoenix - Version 4.2
 * [PHOENIX-943] - Handle pushed down post-filters for subquery in joins 
with limit and non-groupby aggregation
 * [PHOENIX-945] - Support correlated subqueries in comparison without 
ANY/SOME/ALL
 * [PHOENIX-1085] - Commonize logic for adding salt byte and adding region 
start key in ParallelIterators
+* [PHOENIX-1168] - Support non-correlated sub-queries in where clause 
having a comparison operator with no modifier or a comparison operator modified 
by ANY, SOME or ALL
+* [PHOENIX-1170] - Change status of local index during splitting to 
prevent usage when slower than query through data table
 * [PHOENIX-1249] - Support local immutable index 
 * [PHOENIX-1259] - Perform partial scan for ANALYZE when table salted or 
local index
 * [PHOENIX-1263] - Only cache guideposts on physical PTable
@@ -23,7 +25,9 @@ Release Notes - Phoenix - Version 4.2
 
 ** Bug
 * [PHOENIX-105] - Remove org.apache.commons.csv source once available in 
Maven repo
+* [PHOENIX-897] - psql command doesn't allow using certain characters in 
invocation
 * [PHOENIX-941] - Parallelize within regions to prevent rpc timeout
+* [PHOENIX-944] - Support derived tables in FROM clause that needs extra 
steps of client-side aggregation or other processing
 * [PHOENIX-973] - Lexer skips unexpected characters
 * [PHOENIX-1044] - Phoenix-Pig: No results returned unless all used 
columns are selected
 * [PHOENIX-1095] - Cannot add column to SYSTEM.CATALOG using Alter Table 
@@ -63,6 +67,7 @@ Release Notes - Phoenix - Version 4.2
 * [PHOENIX-1281] - Each MultiKeyValueTuple.setKeyValues creates a new 
immutable list object
 * [PHOENIX-1284] - Override config properties for unit tests not making it 
to server
 * [PHOENIX-1285] - Override default for histogram depth in 
QueryServicesTestImpl
+* [PHOENIX-1286] - Remove hadoop2 compat modules
 * [PHOENIX-1288] - Selecting more than 2 array elements via index fails 
with ArrayIndexOutOfBoundsException
 * [PHOENIX-1289] - Drop index during upsert may abort RS
 * [PHOENIX-1298] - Queries on fixed width type columns that have an index 
declared on them don't use that index
@@ -92,9 +97,18 @@ Release Notes - Phoenix - Version 4.2
 * [PHOENIX-1361] - Sequence value goes backwards if sequence validated 
before reserved
 * [PHOENIX-1364] - Close tracing scope to stop excessive tracing
 * [PHOENIX-1365] - Make sequence salt buckets configurable
+* [PHOENIX-1366] - ORDINAL_POSITION incorrect for multi-tenant table over 
tenant-specific connection
 * [PHOENIX-1368] - Persist link from VIEW back to its child VIEW
 * [PHOENIX-1369] - Add back encode/decode methods as deprecated
 * [PHOENIX-1370] - Allow query timeout to differ from RPC timeout
+* [PHOENIX-1376] - java.lang.NullPointerException occurs in JDBC driver
+* [PHOENIX-1379] - Wrong MultiIndexWriteFailureException when recovering 
local index table
+* [PHOENIX-1381] - NPE in CellUtil.matchingFamily() for IndexedKeyValue
+* [PHOENIX-1382] - Phoenix 4.2 RC Issue
+* [PHOENIX-1385] - Adding, dropping and adding columns fails with NPE
+* [PHOENIX-1386] - ANY function only works with absolute value and doesn't 
work with other parameters  
+* [PHOENIX-1390] - Stats not updated on client after major compaction
+* [PHOENIX-1391] - Remove obsolete hint
 
 ** Improvement
 * [PHOENIX-619] - Support DELETE over table with immutable index when 
possible

http://git-wip-us.apache.org/repos/asf/phoenix/blob/5614dbd5/phoenix-core/src/it/java/org/apache/phoenix/trace/TracingTestUtil.java
--
diff --git 

Build failed in Jenkins: Phoenix | Master #466

2014-10-28 Thread Apache Jenkins Server
See https://builds.apache.org/job/Phoenix-master/466/changes

Changes:

[jtaylor] Rename method for consistency

--
[...truncated 18323 lines...]
164/260 KB   
166/260 KB   
167/260 KB   
168/260 KB   
171/260 KB   
173/260 KB   
177/260 KB   
181/260 KB   
184/260 KB   
185/260 KB   
187/260 KB   
188/260 KB   
190/260 KB   
191/260 KB   
192/260 KB   
196/260 KB   
200/260 KB   
204/260 KB   
205/260 KB   
207/260 KB   
208/260 KB   
209/260 KB   
213/260 KB   
217/260 KB   
221/260 KB   
224/260 KB   
225/260 KB   
226/260 KB   
228/260 KB   
229/260 KB   
231/260 KB   
232/260 KB   
233/260 KB   
235/260 KB   
239/260 KB   
242/260 KB   
243/260 KB   
246/260 KB   
248/260 KB   
249/260 KB   
250/260 KB   
252/260 KB   
253/260 KB   
255/260 KB   
259/260 KB   
260/260 KB   
 
Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/maven/surefire/maven-surefire-common/2.17/maven-surefire-common-2.17.jar
 (260 KB at 638.3 KB/sec)
[INFO] Failsafe report directory: 
https://builds.apache.org/job/Phoenix-master/ws/phoenix-core/target/failsafe-reports
[INFO] parallel='none', perCoreThreadCount=true, threadCount=0, 
useUnlimitedThreads=false, threadCountSuites=0, threadCountClasses=0, 
threadCountMethods=0, parallelOptimized=true
Downloading: 
http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-junit47/2.17/surefire-junit47-2.17.pom
3/5 KB   
5/5 KB   
 
Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-junit47/2.17/surefire-junit47-2.17.pom
 (5 KB at 454.8 KB/sec)
Downloading: 
http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-providers/2.17/surefire-providers-2.17.pom
2/3 KB   
3/3 KB   
 
Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-providers/2.17/surefire-providers-2.17.pom
 (3 KB at 258.0 KB/sec)
Downloading: 
http://repo.maven.apache.org/maven2/org/apache/maven/surefire/common-junit48/2.17/common-junit48-2.17.pom
3/4 KB   
4/4 KB   
 
Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/maven/surefire/common-junit48/2.17/common-junit48-2.17.pom
 (4 KB at 410.8 KB/sec)
Downloading: 
http://repo.maven.apache.org/maven2/org/apache/maven/surefire/common-junit4/2.17/common-junit4-2.17.pom
2/2 KB   
2/2 KB   
 
Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/maven/surefire/common-junit4/2.17/common-junit4-2.17.pom
 (2 KB at 249.5 KB/sec)
Downloading: 
http://repo.maven.apache.org/maven2/org/apache/maven/surefire/common-junit3/2.17/common-junit3-2.17.pom
2/2 KB   
 
Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/maven/surefire/common-junit3/2.17/common-junit3-2.17.pom
 (2 KB at 190.9 KB/sec)
Downloading: 
http://repo.maven.apache.org/maven2/org/apache/maven/surefire/common-java5/2.17/common-java5-2.17.pom
2/2 KB   
 
Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/maven/surefire/common-java5/2.17/common-java5-2.17.pom
 (2 KB at 210.6 KB/sec)
Downloading: 
http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-grouper/2.17/surefire-grouper-2.17.pom
2/3 KB   
3/3 KB   
 
Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-grouper/2.17/surefire-grouper-2.17.pom
 (3 KB at 307.9 KB/sec)
Downloading: 
http://repo.maven.apache.org/maven2/org/apache/maven/surefire/common-junit3/2.17/common-junit3-2.17.jar
Downloading: 
http://repo.maven.apache.org/maven2/org/apache/maven/surefire/common-junit48/2.17/common-junit48-2.17.jar
Downloading: 
http://repo.maven.apache.org/maven2/org/apache/maven/surefire/common-junit4/2.17/common-junit4-2.17.jar
Downloading: 
http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-junit47/2.17/surefire-junit47-2.17.jar
Downloading: 
http://repo.maven.apache.org/maven2/org/apache/maven/surefire/common-java5/2.17/common-java5-2.17.jar
2/11 KB   
6/11 KB   
6/11 KB   4/18 KB   
10/11 KB   4/18 KB   
11/11 KB   4/18 KB   
11/11 KB   8/18 KB   
11/11 KB   12/18 KB   
11/11 KB   16/18 KB   
11/11 KB   4/16 KB   16/18 KB   
11/11 KB   4/16 KB   18/18 KB   
11/11 KB   8/16 KB   18/18 KB   
11/11 KB   12/16 KB   18/18 KB   
11/11 KB   16/16 KB   18/18 KB   
11/11 KB   16/16 KB   18/18 KB   
11/11 KB   16/16 KB   4/37 KB   18/18 KB   
11/11 KB   16/16 KB   8/37 KB   18/18 KB   
11/11 KB   2/117 KB   16/16 KB   8/37 KB   18/18 KB   
11/11 KB   6/117 KB   16/16 KB   8/37 KB   18/18 KB   
11/11 KB   6/117 KB   16/16 KB   12/37 KB   18/18 KB   
11/11 KB   10/117 KB   16/16 KB   12/37 KB   18/18 KB   
11/11 KB   10/117 KB   16/16 KB   16/37 KB   18/18 KB   
11/11 KB   14/117 KB   16/16 KB   16/37 KB   18/18 KB   
11/11 KB   14/117 KB   16/16 KB   20/37 KB   18/18 KB   
11/11 KB   18/117 KB   16/16 KB   20/37 KB   18/18 KB   
11/11 KB   22/117 KB   16/16 KB   20/37 KB   18/18 KB   
11/11 KB   26/117 KB   16/16 KB   20/37 KB   18/18 KB   
11/11 KB   30/117 KB   16/16 KB   

Apache-Phoenix | 3.0 | Hadoop1 | Build Successful

2014-10-28 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-1390 Stats not updated on client after major compaction

[jtaylor] PHOENIX-1391 Remove obsolete hint

[jtaylor] Update QueryPlanTest to remove reverse test



Git Push Summary

2014-10-28 Thread mujtaba
Repository: phoenix
Updated Tags:  refs/tags/v4.2.0-rc1 [created] b1b95c361


git commit: Update CHANGES

2014-10-28 Thread mujtaba
Repository: phoenix
Updated Branches:
  refs/heads/3.0 311b5aa0a - 8b460b5c0


Update CHANGES


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

Branch: refs/heads/3.0
Commit: 8b460b5c086f46b3e636133df90932c80c1a643a
Parents: 311b5aa
Author: Mujtaba mujt...@apache.org
Authored: Tue Oct 28 16:28:12 2014 -0700
Committer: Mujtaba mujt...@apache.org
Committed: Tue Oct 28 16:28:12 2014 -0700

--
 CHANGES | 9 +
 1 file changed, 9 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/8b460b5c/CHANGES
--
diff --git a/CHANGES b/CHANGES
index bdc6b9a..40157f9 100644
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,7 @@ Release Notes - Phoenix - Version 3.2
 * [PHOENIX-943] - Handle pushed down post-filters for subquery in joins 
with limit and non-groupby aggregation
 * [PHOENIX-945] - Support correlated subqueries in comparison without 
ANY/SOME/ALL
 * [PHOENIX-1085] - Commonize logic for adding salt byte and adding region 
start key in ParallelIterators
+* [PHOENIX-1168] - Support non-correlated sub-queries in where clause 
having a comparison operator with no modifier or a comparison operator modified 
by ANY, SOME or ALL
 * [PHOENIX-1259] - Perform partial scan for ANALYZE when table salted or 
local index
 * [PHOENIX-1263] - Only cache guideposts on physical PTable
 * [PHOENIX-1264] - Add StatisticsCollector to existing tables on first 
connection to cluster
@@ -21,7 +22,9 @@ Release Notes - Phoenix - Version 3.2
 
 ** Bug
 * [PHOENIX-105] - Remove org.apache.commons.csv source once available in 
Maven repo
+* [PHOENIX-897] - psql command doesn't allow using certain characters in 
invocation
 * [PHOENIX-941] - Parallelize within regions to prevent rpc timeout
+* [PHOENIX-944] - Support derived tables in FROM clause that needs extra 
steps of client-side aggregation or other processing
 * [PHOENIX-954] - View index sequences of a non multi tenant table are not 
getting deleted after main table drop
 * [PHOENIX-973] - Lexer skips unexpected characters
 * [PHOENIX-1044] - Phoenix-Pig: No results returned unless all used 
columns are selected
@@ -81,9 +84,15 @@ Release Notes - Phoenix - Version 3.2
 * [PHOENIX-1360] - NPE in SpoolingResultIterator 
 * [PHOENIX-1361] - Sequence value goes backwards if sequence validated 
before reserved
 * [PHOENIX-1365] - Make sequence salt buckets configurable
+* [PHOENIX-1366] - ORDINAL_POSITION incorrect for multi-tenant table over 
tenant-specific connection
 * [PHOENIX-1368] - Persist link from VIEW back to its child VIEW
 * [PHOENIX-1369] - Add back encode/decode methods as deprecated
 * [PHOENIX-1370] - Allow query timeout to differ from RPC timeout
+* [PHOENIX-1376] - java.lang.NullPointerException occurs in JDBC driver
+* [PHOENIX-1382] - Phoenix 4.2 RC Issue
+* [PHOENIX-1385] - Adding, dropping and adding columns fails with NPE
+* [PHOENIX-1390] - Stats not updated on client after major compaction
+* [PHOENIX-1391] - Remove obsolete hint
 
 ** Improvement
 * [PHOENIX-619] - Support DELETE over table with immutable index when 
possible



Git Push Summary

2014-10-28 Thread mujtaba
Repository: phoenix
Updated Tags:  refs/tags/v3.2.0-rc1 [created] 0bf94fd6f


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

2014-10-28 Thread Apache Jenkins Server
See https://builds.apache.org/job/Phoenix-3.0-hadoop1/292/changes

Changes:

[mujtaba] Update CHANGES

--
[...truncated 16300 lines...]
at org.apache.phoenix.query.BaseTest.setUpTestDriver(BaseTest.java:520)
at 
org.apache.phoenix.end2end.ParallelIteratorsIT.doSetup(ParallelIteratorsIT.java:70)

Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 2.547 sec  
FAILURE! - in org.apache.phoenix.end2end.index.MutableIndexFailureIT
testWriteFailureWithRegionServerDown(org.apache.phoenix.end2end.index.MutableIndexFailureIT)
  Time elapsed: 1.491 sec   ERROR!
java.lang.NullPointerException: null
at 
org.apache.hadoop.hdfs.MiniDFSCluster.startDataNodes(MiniDFSCluster.java:422)
at org.apache.hadoop.hdfs.MiniDFSCluster.init(MiniDFSCluster.java:280)
at 
org.apache.hadoop.hbase.HBaseTestingUtility.startMiniDFSCluster(HBaseTestingUtility.java:452)
at 
org.apache.hadoop.hbase.HBaseTestingUtility.startMiniCluster(HBaseTestingUtility.java:620)
at 
org.apache.hadoop.hbase.HBaseTestingUtility.startMiniCluster(HBaseTestingUtility.java:576)
at 
org.apache.hadoop.hbase.HBaseTestingUtility.startMiniCluster(HBaseTestingUtility.java:563)
at 
org.apache.phoenix.end2end.index.MutableIndexFailureIT.doSetup(MutableIndexFailureIT.java:99)

testWriteFailureDisablesIndex(org.apache.phoenix.end2end.index.MutableIndexFailureIT)
  Time elapsed: 1.055 sec   ERROR!
java.lang.NullPointerException: null
at 
org.apache.hadoop.hdfs.MiniDFSCluster.startDataNodes(MiniDFSCluster.java:422)
at org.apache.hadoop.hdfs.MiniDFSCluster.init(MiniDFSCluster.java:280)
at 
org.apache.hadoop.hbase.HBaseTestingUtility.startMiniDFSCluster(HBaseTestingUtility.java:452)
at 
org.apache.hadoop.hbase.HBaseTestingUtility.startMiniCluster(HBaseTestingUtility.java:620)
at 
org.apache.hadoop.hbase.HBaseTestingUtility.startMiniCluster(HBaseTestingUtility.java:576)
at 
org.apache.hadoop.hbase.HBaseTestingUtility.startMiniCluster(HBaseTestingUtility.java:563)
at 
org.apache.phoenix.end2end.index.MutableIndexFailureIT.doSetup(MutableIndexFailureIT.java:99)

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1,494,930.942 
sec  FAILURE! - in org.apache.phoenix.end2end.TenantSpecificTablesDDLIT
org.apache.phoenix.end2end.TenantSpecificTablesDDLIT  Time elapsed: 
1,494,930.942 sec   ERROR!
java.lang.RuntimeException: java.lang.NullPointerException
at org.apache.phoenix.query.BaseTest.initMiniCluster(BaseTest.java:563)
at org.apache.phoenix.query.BaseTest.setUpTestCluster(BaseTest.java:480)
at 
org.apache.phoenix.query.BaseTest.checkClusterInitialized(BaseTest.java:466)
at org.apache.phoenix.query.BaseTest.setUpTestDriver(BaseTest.java:520)
at 
org.apache.phoenix.end2end.BaseTenantSpecificTablesIT.doSetup(BaseTenantSpecificTablesIT.java:80)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runners.Suite.runChild(Suite.java:127)
at org.junit.runners.Suite.runChild(Suite.java:26)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
at 
org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:113)
at 
org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeLazy(JUnitCoreWrapper.java:94)
at 
org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:58)
at 
org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:134)
at 

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

2014-10-28 Thread Apache Jenkins Server
See https://builds.apache.org/job/Phoenix-3.0-hadoop1/293/

--
Started by user mujtaba
Building remotely on jenkins-ubuntu-1404-4gb-b85 (jenkins-cloud-4GB Ubuntu 
ubuntu) in workspace https://builds.apache.org/job/Phoenix-3.0-hadoop1/ws/
  git rev-parse --is-inside-work-tree
Fetching changes from the remote Git repository
  git config remote.origin.url 
  https://git-wip-us.apache.org/repos/asf/phoenix.git
Fetching upstream changes from 
https://git-wip-us.apache.org/repos/asf/phoenix.git
  git --version
  git fetch --tags --progress 
  https://git-wip-us.apache.org/repos/asf/phoenix.git 
  +refs/heads/*:refs/remotes/origin/*
  git rev-parse origin/3.0^{commit}
Checking out Revision 8b460b5c086f46b3e636133df90932c80c1a643a (origin/3.0)
  git config core.sparsecheckout
  git checkout -f 8b460b5c086f46b3e636133df90932c80c1a643a
  git rev-list 8b460b5c086f46b3e636133df90932c80c1a643a
No emails were triggered.
FATAL: null
java.io.IOException
at 
hudson.remoting.FastPipedInputStream.read(FastPipedInputStream.java:177)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:283)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at java.io.Reader.read(Reader.java:140)
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2001)
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1980)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:1957)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:1907)
at org.apache.commons.io.IOUtils.toString(IOUtils.java:778)
at org.apache.commons.io.IOUtils.toString(IOUtils.java:759)
at hudson.FilePath.readToString(FilePath.java:1658)
at 
hudson.tools.DownloadFromUrlInstaller.isUpToDate(DownloadFromUrlInstaller.java:43)
at 
hudson.tools.DownloadFromUrlInstaller.performInstallation(DownloadFromUrlInstaller.java:67)
at 
hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:61)
at 
hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:107)
at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:204)
at hudson.tasks.Maven$MavenInstallation.forNode(Maven.java:610)
at hudson.tasks.Maven.perform(Maven.java:289)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
at hudson.model.Build$BuildExecution.build(Build.java:199)
at hudson.model.Build$BuildExecution.doRun(Build.java:160)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:585)
at hudson.model.Run.execute(Run.java:1676)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:231)


[10/24] git commit: PHOENIX-897 Quote parameters in psql.py

2014-10-28 Thread jamestaylor
PHOENIX-897 Quote parameters in psql.py

Properly quote supplied command-line parameters in psql.py so that
it's possible to supply any character (including ones that have
special meanings in various shells) as parameters.


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

Branch: refs/heads/4.2
Commit: f5a49bff2c43686fc0381f5262de75f504e366ed
Parents: 7b57160
Author: Gabriel Reid gabri...@ngdata.com
Authored: Mon Oct 27 10:57:43 2014 +0100
Committer: Gabriel Reid gabri...@ngdata.com
Committed: Mon Oct 27 10:57:43 2014 +0100

--
 bin/psql.py | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/f5a49bff/bin/psql.py
--
diff --git a/bin/psql.py b/bin/psql.py
index a8cbe31..34a95df 100755
--- a/bin/psql.py
+++ b/bin/psql.py
@@ -26,11 +26,17 @@ import phoenix_utils
 
 phoenix_utils.setPath()
 
+if os.name == 'nt':
+args = subprocess.list2cmdline(sys.argv[1:])
+else:
+import pipes# pipes module isn't available on Windows
+args =  .join([pipes.quote(v) for v in sys.argv[1:]])
+
 # HBase configuration folder path (where hbase-site.xml reside) for
 # HBase/Phoenix client side property override
 java_cmd = 'java -cp ' + phoenix_utils.hbase_conf_path + os.pathsep + 
phoenix_utils.phoenix_client_jar + \
 ' -Dlog4j.configuration=file:' + \
 os.path.join(phoenix_utils.current_dir, log4j.properties) + \
- org.apache.phoenix.util.PhoenixRuntime  + ' '.join(sys.argv[1:])
+ org.apache.phoenix.util.PhoenixRuntime  + args 
 
 subprocess.call(java_cmd, shell=True)



[01/24] git commit: PHOENIX-1375 Remove references to incubation

2014-10-28 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.2 59647fc34 - 5614dbd5e


PHOENIX-1375 Remove references to incubation


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

Branch: refs/heads/4.2
Commit: 6a28b7d249d6e2de515b5897992ce67649762858
Parents: 59647fc
Author: Gabriel Reid gabri...@ngdata.com
Authored: Thu Oct 23 21:52:46 2014 +0200
Committer: Gabriel Reid gabri...@ngdata.com
Committed: Thu Oct 23 21:52:46 2014 +0200

--
 NOTICE   | 2 +-
 dev/release_files/NOTICE | 2 +-
 pom.xml  | 6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/6a28b7d2/NOTICE
--
diff --git a/NOTICE b/NOTICE
index ac3ec17..093ae02 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Apache Phoenix (Incubating)
+Apache Phoenix
 Copyright 2014 The Apache Software Foundation
 
 This product includes software developed at

http://git-wip-us.apache.org/repos/asf/phoenix/blob/6a28b7d2/dev/release_files/NOTICE
--
diff --git a/dev/release_files/NOTICE b/dev/release_files/NOTICE
index 84869a6..a96a97c 100644
--- a/dev/release_files/NOTICE
+++ b/dev/release_files/NOTICE
@@ -1,4 +1,4 @@
-Apache Phoenix (Incubating)
+Apache Phoenix
 Copyright 2014 The Apache Software Foundation
 
 This product includes software developed at

http://git-wip-us.apache.org/repos/asf/phoenix/blob/6a28b7d2/pom.xml
--
diff --git a/pom.xml b/pom.xml
index ab8dc33..10ef778 100644
--- a/pom.xml
+++ b/pom.xml
@@ -57,9 +57,9 @@
   /parent
 
   scm
-
connectionscm:git:http://git-wip-us.apache.org/repos/asf/incubator-phoenix.git/connection
-urlhttps://git-wip-us.apache.org/repos/asf/incubator-phoenix.git/url
-
developerConnectionscm:git:https://git-wip-us.apache.org/repos/asf/incubator-phoenix.git/developerConnection
+
connectionscm:git:http://git-wip-us.apache.org/repos/asf/phoenix.git/connection
+urlhttps://git-wip-us.apache.org/repos/asf/phoenix.git/url
+
developerConnectionscm:git:https://git-wip-us.apache.org/repos/asf/phoenix.git/developerConnection
   /scm
 
   properties



[13/24] git commit: PHOENIX-1376 java.lang.NullPointerException occurs in JDBC driver

2014-10-28 Thread jamestaylor
PHOENIX-1376 java.lang.NullPointerException occurs in JDBC driver


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

Branch: refs/heads/4.2
Commit: b2c5ffa9cfa4962da675df2e9a9480b9d9887c1a
Parents: f4d8bb0
Author: James Taylor jtay...@salesforce.com
Authored: Mon Oct 27 13:40:47 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Mon Oct 27 13:40:47 2014 -0700

--
 .../src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java | 5 -
 .../main/java/org/apache/phoenix/schema/tuple/ResultTuple.java  | 2 +-
 2 files changed, 1 insertion(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/b2c5ffa9/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java 
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java
index e662a3f..8a6cf64 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java
@@ -1232,9 +1232,4 @@ public class PhoenixResultSet implements ResultSet, 
SQLCloseable, org.apache.pho
 public T T getObject(String columnLabel, ClassT type) throws 
SQLException {
 return (T) getObject(columnLabel); // Just ignore type since we only 
support built-in types
 }
-
-@Override
-public String toString(){
-  return ResultSet:\n+ \tclosed: +this.isClosed+\n\tcurrent row: 
+currentRow;
-}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/phoenix/blob/b2c5ffa9/phoenix-core/src/main/java/org/apache/phoenix/schema/tuple/ResultTuple.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/tuple/ResultTuple.java 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/tuple/ResultTuple.java
index a7f411c..c28a2bf 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/tuple/ResultTuple.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/tuple/ResultTuple.java
@@ -65,7 +65,7 @@ public class ResultTuple extends BaseTuple {
 public String toString() {
   StringBuilder sb = new StringBuilder();
   sb.append(keyvalues=);
-  if(this.result.isEmpty()) {
+  if(this.result == null || this.result.isEmpty()) {
 sb.append(NONE);
 return sb.toString();
   }



[09/24] git commit: Merge branch '4.0' of https://git-wip-us.apache.org/repos/asf/phoenix into 4.0

2014-10-28 Thread jamestaylor
Merge branch '4.0' of https://git-wip-us.apache.org/repos/asf/phoenix into 4.0


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

Branch: refs/heads/4.2
Commit: 7b5716084be1a462b2ca093c512b7a24476c3e5b
Parents: 351769c 00522cf
Author: James Taylor jtay...@salesforce.com
Authored: Sun Oct 26 22:38:06 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Sun Oct 26 22:38:06 2014 -0700

--
 bin/phoenix_utils.py   | 2 +-
 .../main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--




[14/24] PHOENIX-1286 Remove hadoop2 compat modules

2014-10-28 Thread jamestaylor
http://git-wip-us.apache.org/repos/asf/phoenix/blob/b48ca7b5/phoenix-hadoop2-compat/src/test/java/org/apache/phoenix/trace/TraceMetricsSourceTest.java
--
diff --git 
a/phoenix-hadoop2-compat/src/test/java/org/apache/phoenix/trace/TraceMetricsSourceTest.java
 
b/phoenix-hadoop2-compat/src/test/java/org/apache/phoenix/trace/TraceMetricsSourceTest.java
deleted file mode 100644
index 3258e8a..000
--- 
a/phoenix-hadoop2-compat/src/test/java/org/apache/phoenix/trace/TraceMetricsSourceTest.java
+++ /dev/null
@@ -1,96 +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.trace;
-
-import org.apache.hadoop.hbase.util.Bytes;
-import org.apache.hadoop.metrics2.MetricsCollector;
-import org.apache.hadoop.metrics2.MetricsRecordBuilder;
-import org.apache.hadoop.metrics2.MetricsTag;
-import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem;
-import org.cloudera.htrace.Span;
-import org.cloudera.htrace.impl.MilliSpan;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.mockito.Mockito;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-/**
- * Test that the @{link TraceMetricSource} correctly handles different kinds 
of traces
- */
-public class TraceMetricsSourceTest {
-
-  @BeforeClass
-  public static void setup() throws Exception{
-DefaultMetricsSystem.setMiniClusterMode(true);
-  }
-
-  /**
-   * For PHOENIX-1126, Phoenix originally assumed all the annotation values 
were integers,
-   * but HBase writes some strings as well, so we need to be able to handle 
that too
-   */
-  @Test
-  public void testNonIntegerAnnotations(){
-Span span = getSpan();
-// make sure its less than the length of an integer
-byte[] value = Bytes.toBytes(a);
-byte[] someInt = Bytes.toBytes(1);
-assertTrue(someInt.length value.length);
-
-// an annotation that is not an integer
-span.addKVAnnotation(Bytes.toBytes(key), value);
-
-// Create the sink and write the span
-TraceMetricSource source = new TraceMetricSource();
-source.receiveSpan(span);
-  }
-
-  @Test
-  public void testIntegerAnnotations(){
-Span span = getSpan();
-
-// add annotation through the phoenix interfaces
-TracingCompat.addAnnotation(span, message, 10);
-
-TraceMetricSource source = new TraceMetricSource();
-source.receiveSpan(span);
-  }
-
-  /**
-   * If the source does not write any metrics when there are no spans, i.e. 
when initialized,
-   * then the metrics system will discard the source, so it needs to always 
emit some metrics.
-   */
-  @Test
-  public void testWritesInfoWhenNoSpans(){
-TraceMetricSource source = new TraceMetricSource();
-MetricsCollector collector = Mockito.mock(MetricsCollector.class);
-MetricsRecordBuilder builder = Mockito.mock(MetricsRecordBuilder.class);
-Mockito.when(collector.addRecord(Mockito.anyString())).thenReturn(builder);
-
-source.getMetrics(collector, true);
-
-// verify that we add a record and that the record has some info
-Mockito.verify(collector).addRecord(Mockito.anyString());
-Mockito.verify(builder).add(Mockito.any(MetricsTag.class));
-  }
-
-  private Span getSpan(){
-return new MilliSpan(test span, 0, 1 , 2, pid);
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/phoenix/blob/b48ca7b5/phoenix-hadoop2-compat/src/test/java/org/apache/phoenix/trace/TracingTest.java
--
diff --git 
a/phoenix-hadoop2-compat/src/test/java/org/apache/phoenix/trace/TracingTest.java
 
b/phoenix-hadoop2-compat/src/test/java/org/apache/phoenix/trace/TracingTest.java
deleted file mode 100644
index ffe6c82..000
--- 
a/phoenix-hadoop2-compat/src/test/java/org/apache/phoenix/trace/TracingTest.java
+++ /dev/null
@@ -1,34 +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
- * 

[19/24] git commit: PHOENIX-1390 Stats not updated on client after major compaction

2014-10-28 Thread jamestaylor
PHOENIX-1390 Stats not updated on client after major compaction


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

Branch: refs/heads/4.2
Commit: 7a8a023a3d2bdb694f02fc1560a0f5eb35294a96
Parents: 851f57a
Author: James Taylor jtay...@salesforce.com
Authored: Tue Oct 28 12:44:37 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Tue Oct 28 12:44:37 2014 -0700

--
 .../end2end/BaseClientManagedTimeIT.java| 15 +++-
 .../org/apache/phoenix/end2end/BaseQueryIT.java |  3 +-
 .../end2end/ClientTimeArithmeticQueryIT.java| 43 +++
 .../phoenix/end2end/InMemoryOrderByIT.java  |  4 +-
 .../org/apache/phoenix/end2end/QueryIT.java | 24 --
 .../apache/phoenix/end2end/ReverseScanIT.java   |  2 +-
 .../org/apache/phoenix/end2end/SequenceIT.java  |  7 +-
 .../phoenix/end2end/SpooledOrderByIT.java   |  4 +-
 .../phoenix/end2end/StatsCollectorIT.java   | 55 +-
 .../apache/phoenix/end2end/UpsertSelectIT.java  |  4 +-
 .../phoenix/compile/ExpressionCompiler.java |  2 +-
 .../coprocessor/MetaDataEndpointImpl.java   | 35 ++---
 .../UngroupedAggregateRegionObserver.java   | 21 --
 .../org/apache/phoenix/query/QueryServices.java |  1 +
 .../phoenix/query/QueryServicesOptions.java |  5 +-
 .../apache/phoenix/schema/MetaDataClient.java   |  4 +-
 .../org/apache/phoenix/schema/PTableImpl.java   |  2 +-
 .../phoenix/schema/stats/PTableStats.java   |  7 ++
 .../phoenix/schema/stats/PTableStatsImpl.java   | 12 ++-
 .../schema/stats/StatisticsCollector.java   | 79 
 .../phoenix/schema/stats/StatisticsScanner.java |  1 -
 .../phoenix/schema/stats/StatisticsUtil.java|  6 +-
 .../phoenix/schema/stats/StatisticsWriter.java  | 39 ++
 23 files changed, 259 insertions(+), 116 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/7a8a023a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseClientManagedTimeIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseClientManagedTimeIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseClientManagedTimeIT.java
index 14dffcb..1acd5b3 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseClientManagedTimeIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseClientManagedTimeIT.java
@@ -17,16 +17,21 @@
  */
 package org.apache.phoenix.end2end;
 
+import java.util.Map;
+
 import javax.annotation.concurrent.NotThreadSafe;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.phoenix.query.BaseTest;
+import org.apache.phoenix.query.QueryServices;
 import org.apache.phoenix.util.ReadOnlyProps;
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.experimental.categories.Category;
 
+import com.google.common.collect.Maps;
+
 /**
  * Base class for tests that manage their own time stamps
  * We need to separate these from tests that rely on hbase to set
@@ -54,9 +59,17 @@ public abstract class BaseClientManagedTimeIT extends 
BaseTest {
 deletePriorTables(ts - 1, getUrl());
 }
 
+public static MapString,String getDefaultProps() {
+MapString,String props = Maps.newHashMapWithExpectedSize(5);
+// Must update config before starting server
+props.put(QueryServices.STATS_USE_CURRENT_TIME_ATTRIB, 
Boolean.FALSE.toString());
+return props;
+}
+
 @BeforeClass
 public static void doSetup() throws Exception {
-setUpTestDriver(ReadOnlyProps.EMPTY_PROPS);
+MapString,String props = getDefaultProps();
+setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
 }
 
 @AfterClass

http://git-wip-us.apache.org/repos/asf/phoenix/blob/7a8a023a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseQueryIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseQueryIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseQueryIT.java
index 7a3e86e..f3031f4 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseQueryIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseQueryIT.java
@@ -48,7 +48,6 @@ import org.junit.runners.Parameterized;
 import org.junit.runners.Parameterized.Parameters;
 
 import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
 
 
 
@@ -70,7 +69,7 @@ public abstract class BaseQueryIT extends 
BaseClientManagedTimeIT {
 @BeforeClass
 

[18/24] git commit: Remove unused imports and local variables

2014-10-28 Thread jamestaylor
Remove unused imports and local variables


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

Branch: refs/heads/4.2
Commit: 851f57a6da1c91b02711d8974568206fb88ed49a
Parents: 4c0d00b
Author: James Taylor jtay...@salesforce.com
Authored: Tue Oct 28 12:43:48 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Tue Oct 28 12:43:48 2014 -0700

--
 .../apache/phoenix/trace/BaseTracingTestIT.java | 24 ++--
 .../apache/phoenix/trace/PhoenixTagImpl.java|  9 
 .../org/apache/phoenix/trace/TracingUtils.java  |  5 
 3 files changed, 12 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/851f57a6/phoenix-core/src/it/java/org/apache/phoenix/trace/BaseTracingTestIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/trace/BaseTracingTestIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/trace/BaseTracingTestIT.java
index f504d12..99c8bc3 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/trace/BaseTracingTestIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/trace/BaseTracingTestIT.java
@@ -17,8 +17,18 @@
  */
 package org.apache.phoenix.trace;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import static org.apache.phoenix.util.PhoenixRuntime.ANNOTATION_ATTRIB_PREFIX;
+import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
 import org.apache.hadoop.metrics2.AbstractMetric;
 import org.apache.hadoop.metrics2.MetricsInfo;
 import org.apache.hadoop.metrics2.MetricsRecord;
@@ -38,22 +48,12 @@ import org.apache.phoenix.util.PropertiesUtil;
 import org.junit.Before;
 import org.junit.experimental.categories.Category;
 
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.SQLException;
-import java.util.*;
-
-import static org.apache.phoenix.util.PhoenixRuntime.ANNOTATION_ATTRIB_PREFIX;
-import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
-
 /**
  * Base test for tracing tests - helps manage getting tracing/non-tracing
  * connections, as well as any supporting utils.
  */
 @Category(HBaseManagedTimeTest.class)
 public class BaseTracingTestIT extends BaseHBaseManagedTimeIT {
-private static final Log LOG = LogFactory.getLog(BaseTracingTestIT.class);
-
 @Before
 public void resetTracingTableIfExists() throws Exception {
 Connection conn = getConnectionWithoutTracing();

http://git-wip-us.apache.org/repos/asf/phoenix/blob/851f57a6/phoenix-core/src/it/java/org/apache/phoenix/trace/PhoenixTagImpl.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/trace/PhoenixTagImpl.java 
b/phoenix-core/src/it/java/org/apache/phoenix/trace/PhoenixTagImpl.java
index a911a2c..0d2def3 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/trace/PhoenixTagImpl.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/trace/PhoenixTagImpl.java
@@ -17,22 +17,13 @@
  */
 package org.apache.phoenix.trace;
 
-import org.apache.hadoop.metrics2.MetricsInfo;
 import org.apache.hadoop.metrics2.MetricsTag;
 
 /**
  * Simple Tag implementation for testing
  */
 public class PhoenixTagImpl extends MetricsTag {
-
-private final String name;
-private final String description;
-private final String value;
-
 public PhoenixTagImpl(String name, String description, String value) {
 super(new MetricsInfoImpl(name, description), value);
-this.name = name;
-this.description = description;
-this.value = value;
 }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/phoenix/blob/851f57a6/phoenix-core/src/main/java/org/apache/phoenix/trace/TracingUtils.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/trace/TracingUtils.java 
b/phoenix-core/src/main/java/org/apache/phoenix/trace/TracingUtils.java
index 6ae52d8..cee3b95 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/trace/TracingUtils.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/trace/TracingUtils.java
@@ -17,8 +17,6 @@
  */
 package org.apache.phoenix.trace;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hbase.util.Bytes;
 import 

[12/24] git commit: PHOENIX-1385 Adding, dropping and adding columns fails with NPE (Samarth Jain, James Taylor)

2014-10-28 Thread jamestaylor
PHOENIX-1385 Adding, dropping and adding columns fails with NPE (Samarth Jain, 
James Taylor)


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

Branch: refs/heads/4.2
Commit: f4d8bb01374eae5ab2ded67d225de4028797a5ab
Parents: b84b91e
Author: James Taylor jtay...@salesforce.com
Authored: Mon Oct 27 13:35:49 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Mon Oct 27 13:35:49 2014 -0700

--
 .../apache/phoenix/end2end/AlterTableIT.java| 22 +++-
 .../apache/phoenix/jdbc/PhoenixConnection.java  |  8 +--
 .../query/ConnectionQueryServicesImpl.java  |  4 +-
 .../query/ConnectionlessQueryServicesImpl.java  |  6 +--
 .../query/DelegateConnectionQueryServices.java  |  6 +--
 .../apache/phoenix/query/MetaDataMutated.java   |  2 +-
 .../apache/phoenix/schema/MetaDataClient.java   |  6 +--
 .../apache/phoenix/schema/PMetaDataImpl.java| 53 +++-
 8 files changed, 64 insertions(+), 43 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/f4d8bb01/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
index 98a98d2..5745bf0 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
@@ -892,4 +892,24 @@ public class AlterTableIT extends BaseHBaseManagedTimeIT {
 pstmt2.close();
 conn1.close();
 }
-}
+
+@Test
+public void testAddColumnsUsingNewConnection() throws Exception {
+Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+String ddl = CREATE TABLE T (\n
++ID1 VARCHAR(15) NOT NULL,\n
++ID2 VARCHAR(15) NOT NULL,\n
++CREATED_DATE DATE,\n
++CREATION_TIME BIGINT,\n
++LAST_USED DATE,\n
++CONSTRAINT PK PRIMARY KEY (ID1, ID2));
+Connection conn1 = DriverManager.getConnection(getUrl(), props);
+conn1.createStatement().execute(ddl);
+ddl = ALTER TABLE T ADD STRING VARCHAR, STRING_DATA_TYPES VARCHAR;
+conn1.createStatement().execute(ddl);
+ddl = ALTER TABLE T DROP COLUMN STRING, STRING_DATA_TYPES;
+conn1.createStatement().execute(ddl);
+ddl = ALTER TABLE T ADD STRING_ARRAY1 VARCHAR[];
+conn1.createStatement().execute(ddl);
+conn1.close();
+}}

http://git-wip-us.apache.org/repos/asf/phoenix/blob/f4d8bb01/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java 
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java
index 9a01018..4c57d09 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java
@@ -742,11 +742,11 @@ public class PhoenixConnection implements Connection, 
org.apache.phoenix.jdbc.Jd
 }
 
 @Override
-public PMetaData removeColumn(PName tenantId, String tableName, String 
familyName, String columnName,
-long tableTimeStamp, long tableSeqNum) throws SQLException {
-metaData = metaData.removeColumn(tenantId, tableName, familyName, 
columnName, tableTimeStamp, tableSeqNum);
+public PMetaData removeColumn(PName tenantId, String tableName, 
ListPColumn columnsToRemove, long tableTimeStamp,
+long tableSeqNum) throws SQLException {
+metaData = metaData.removeColumn(tenantId, tableName, columnsToRemove, 
tableTimeStamp, tableSeqNum);
 //Cascade through to connectionQueryServices too
-getQueryServices().removeColumn(tenantId, tableName, familyName, 
columnName, tableTimeStamp, tableSeqNum);
+getQueryServices().removeColumn(tenantId, tableName, columnsToRemove, 
tableTimeStamp, tableSeqNum);
 return metaData;
 }
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/f4d8bb01/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index d46497d..c6daaef 100644
--- 

[15/24] PHOENIX-1286 Remove hadoop2 compat modules

2014-10-28 Thread jamestaylor
http://git-wip-us.apache.org/repos/asf/phoenix/blob/b48ca7b5/phoenix-core/src/main/java/org/apache/phoenix/trace/TracingUtils.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/trace/TracingUtils.java 
b/phoenix-core/src/main/java/org/apache/phoenix/trace/TracingUtils.java
new file mode 100644
index 000..6ae52d8
--- /dev/null
+++ b/phoenix-core/src/main/java/org/apache/phoenix/trace/TracingUtils.java
@@ -0,0 +1,63 @@
+/**
+ * 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.trace;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.hadoop.hbase.util.Pair;
+import org.cloudera.htrace.Span;
+
+/**
+ * Utilities for tracing
+ */
+public class TracingUtils {
+
+private static final Log LOG = LogFactory.getLog(TracingUtils.class);
+
+public static final String METRIC_SOURCE_KEY = phoenix.;
+
+/** Set context to enable filtering */
+public static final String METRICS_CONTEXT = tracing;
+
+/** Marker metric to ensure that we register the tracing mbeans */
+public static final String METRICS_MARKER_CONTEXT = marker;
+
+public static void addAnnotation(Span span, String message, int value) {
+span.addKVAnnotation(message.getBytes(), 
Bytes.toBytes(Integer.toString(value)));
+}
+
+public static PairString, String readAnnotation(byte[] key, byte[] 
value) {
+return new PairString, String(new String(key), 
Bytes.toString(value));
+}
+
+/**
+ * @see #getTraceMetricName(String)
+ */
+public static final String getTraceMetricName(long traceId) {
+return getTraceMetricName(Long.toString(traceId));
+}
+
+/**
+ * @param traceId unique id of the trace
+ * @return the name of the metric record that should be generated for a 
given trace
+ */
+public static final String getTraceMetricName(String traceId) {
+return METRIC_SOURCE_KEY + traceId;
+}
+}

http://git-wip-us.apache.org/repos/asf/phoenix/blob/b48ca7b5/phoenix-core/src/main/java/org/apache/phoenix/trace/util/Tracing.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/trace/util/Tracing.java 
b/phoenix-core/src/main/java/org/apache/phoenix/trace/util/Tracing.java
index d0677cf..b093b9c 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/trace/util/Tracing.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/trace/util/Tracing.java
@@ -36,8 +36,7 @@ import org.apache.phoenix.call.CallWrapper;
 import org.apache.phoenix.jdbc.PhoenixConnection;
 import org.apache.phoenix.query.QueryServices;
 import org.apache.phoenix.query.QueryServicesOptions;
-import org.apache.phoenix.trace.TracingCompat;
-import org.apache.phoenix.util.StringUtil;
+import org.apache.phoenix.trace.TraceMetricSource;
 import org.cloudera.htrace.Sampler;
 import org.cloudera.htrace.Span;
 import org.cloudera.htrace.Trace;
@@ -313,7 +312,7 @@ public class Tracing {
 public synchronized static void addTraceMetricsSource() {
 try {
 if (!initialized) {
-Trace.addReceiver(TracingCompat.newTraceMetricSource());
+Trace.addReceiver(new TraceMetricSource());
 }
 } catch (RuntimeException e) {
 LOG.warn(Tracing will outputs will not be written to any metrics 
sink! No 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/b48ca7b5/phoenix-core/src/test/java/org/apache/hadoop/metrics2/impl/ExposedMetricCounterLong.java
--
diff --git 
a/phoenix-core/src/test/java/org/apache/hadoop/metrics2/impl/ExposedMetricCounterLong.java
 
b/phoenix-core/src/test/java/org/apache/hadoop/metrics2/impl/ExposedMetricCounterLong.java
new file mode 100644
index 000..f4dfd74
--- /dev/null
+++ 
b/phoenix-core/src/test/java/org/apache/hadoop/metrics2/impl/ExposedMetricCounterLong.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See 

[04/24] git commit: PHOENIX-1366 ORDINAL_POSITION incorrect for multi-tenant table over tenant-specific connection (Bruno Dumon)

2014-10-28 Thread jamestaylor
PHOENIX-1366 ORDINAL_POSITION incorrect for multi-tenant table over 
tenant-specific connection (Bruno Dumon)


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

Branch: refs/heads/4.2
Commit: 553fb4b33541531045435ed18e8ed5798edd6017
Parents: 4753c4e
Author: James Taylor jtay...@salesforce.com
Authored: Sun Oct 26 20:46:03 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Sun Oct 26 20:46:03 2014 -0700

--
 .../end2end/TenantSpecificTablesDDLIT.java  | 23 ++-
 .../phoenix/jdbc/PhoenixDatabaseMetaData.java   | 31 
 2 files changed, 42 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/553fb4b3/phoenix-core/src/it/java/org/apache/phoenix/end2end/TenantSpecificTablesDDLIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/TenantSpecificTablesDDLIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/TenantSpecificTablesDDLIT.java
index 589e963..42fe5b8 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/TenantSpecificTablesDDLIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/TenantSpecificTablesDDLIT.java
@@ -22,6 +22,8 @@ import static 
org.apache.phoenix.exception.SQLExceptionCode.CANNOT_DROP_PK;
 import static 
org.apache.phoenix.exception.SQLExceptionCode.CANNOT_MODIFY_VIEW_PK;
 import static 
org.apache.phoenix.exception.SQLExceptionCode.CANNOT_MUTATE_TABLE;
 import static org.apache.phoenix.exception.SQLExceptionCode.TABLE_UNDEFINED;
+import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.KEY_SEQ;
+import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.ORDINAL_POSITION;
 import static 
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SYSTEM_CATALOG_SCHEMA;
 import static 
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SYSTEM_CATALOG_TABLE;
 import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.TYPE_SEQUENCE;
@@ -554,21 +556,22 @@ public class TenantSpecificTablesDDLIT extends 
BaseTenantSpecificTablesIT {
 // make sure tenants see parent table's columns and their own
 rs = meta.getColumns(null, null, 
StringUtil.escapeLike(TENANT_TABLE_NAME) + %, null);
 assertTrue(rs.next());
-assertColumnMetaData(rs, null, TENANT_TABLE_NAME, user);
+assertColumnMetaData(rs, null, TENANT_TABLE_NAME, user, 1);
 assertTrue(rs.next());
 // (tenant_id column is not visible in tenant-specific connection)
-assertColumnMetaData(rs, null, TENANT_TABLE_NAME, 
tenant_type_id);
+assertColumnMetaData(rs, null, TENANT_TABLE_NAME, 
tenant_type_id, 2);
+assertEquals(1, rs.getInt(KEY_SEQ));
 assertTrue(rs.next());
-assertColumnMetaData(rs, null, TENANT_TABLE_NAME, id);
+assertColumnMetaData(rs, null, TENANT_TABLE_NAME, id, 3);
 assertTrue(rs.next());
-assertColumnMetaData(rs, null, TENANT_TABLE_NAME, tenant_col);
+assertColumnMetaData(rs, null, TENANT_TABLE_NAME, tenant_col, 4);
 assertTrue(rs.next());
-assertColumnMetaData(rs, null, 
TENANT_TABLE_NAME_NO_TENANT_TYPE_ID, user);
+assertColumnMetaData(rs, null, 
TENANT_TABLE_NAME_NO_TENANT_TYPE_ID, user, 1);
 assertTrue(rs.next());
 // (tenant_id column is not visible in tenant-specific connection)
-assertColumnMetaData(rs, null, 
TENANT_TABLE_NAME_NO_TENANT_TYPE_ID, id);
+assertColumnMetaData(rs, null, 
TENANT_TABLE_NAME_NO_TENANT_TYPE_ID, id, 2);
 assertTrue(rs.next());
-assertColumnMetaData(rs, null, 
TENANT_TABLE_NAME_NO_TENANT_TYPE_ID, tenant_col);
+assertColumnMetaData(rs, null, 
TENANT_TABLE_NAME_NO_TENANT_TYPE_ID, tenant_col, 3);
 assertFalse(rs.next()); 
 }
 finally {
@@ -587,4 +590,10 @@ public class TenantSpecificTablesDDLIT extends 
BaseTenantSpecificTablesIT {
 assertEquals(table, rs.getString(TABLE_NAME));
 assertEquals(SchemaUtil.normalizeIdentifier(column), 
rs.getString(COLUMN_NAME));
 }
+
+private void assertColumnMetaData(ResultSet rs, String schema, String 
table, String column, int ordinalPosition)
+throws SQLException {
+assertColumnMetaData(rs, schema, table, column);
+assertEquals(ordinalPosition, rs.getInt(ORDINAL_POSITION));
+}
 }
\ No newline at end of file


[02/24] git commit: PHOENIX-1373: Ctrl-C out of sqlline causes terminal to be useless

2014-10-28 Thread jamestaylor
PHOENIX-1373: Ctrl-C out of sqlline causes terminal to be useless


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

Branch: refs/heads/4.2
Commit: e8a0355a4734beaf69998754f617172974b46670
Parents: 6a28b7d
Author: Jeffrey Zhong jeffr...@apache.org
Authored: Thu Oct 23 17:34:43 2014 -0700
Committer: Jeffrey Zhong jeffr...@apache.org
Committed: Thu Oct 23 17:34:43 2014 -0700

--
 bin/sqlline.py | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/e8a0355a/bin/sqlline.py
--
diff --git a/bin/sqlline.py b/bin/sqlline.py
index d41c2e7..f48e527 100755
--- a/bin/sqlline.py
+++ b/bin/sqlline.py
@@ -31,6 +31,8 @@ def kill_child():
 if childProc is not None:
 childProc.terminate()
 childProc.kill()
+if os.name != 'nt':
+os.system(reset)
 atexit.register(kill_child)
 
 phoenix_utils.setPath()



[17/24] git commit: PHOENIX-1170 Change status of local index during splitting to prevent usage when slower than query through data table (Rajeshbabu)

2014-10-28 Thread jamestaylor
PHOENIX-1170 Change status of local index during splitting to prevent usage 
when slower than query through data table (Rajeshbabu)


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

Branch: refs/heads/4.2
Commit: 4c0d00bdd32e1853e929729f396dda567dc6faeb
Parents: b48ca7b
Author: James Taylor jtay...@salesforce.com
Authored: Mon Oct 27 14:29:07 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Mon Oct 27 14:29:07 2014 -0700

--
 .../org/apache/phoenix/end2end/QueryIT.java |  20 ++-
 .../phoenix/end2end/index/LocalIndexIT.java | 152 ---
 .../IndexHalfStoreFileReaderGenerator.java  |  63 
 .../hbase/regionserver/LocalIndexSplitter.java  |  40 +
 .../java/org/apache/phoenix/query/BaseTest.java |   1 +
 5 files changed, 250 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/4c0d00bd/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryIT.java
--
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryIT.java
index cc431c1..f45b689 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryIT.java
@@ -50,6 +50,7 @@ import java.sql.Timestamp;
 import java.util.Arrays;
 import java.util.Properties;
 
+import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.client.HBaseAdmin;
 import org.apache.hadoop.hbase.client.HTable;
 import org.apache.hadoop.hbase.filter.CompareFilter.CompareOp;
@@ -60,6 +61,7 @@ import org.apache.phoenix.jdbc.PhoenixConnection;
 import org.apache.phoenix.schema.PDataType;
 import org.apache.phoenix.schema.SequenceNotFoundException;
 import org.apache.phoenix.util.ByteUtil;
+import org.apache.phoenix.util.MetaDataUtil;
 import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.PropertiesUtil;
 import org.junit.Test;
@@ -761,14 +763,16 @@ public class QueryIT extends BaseQueryIT {
 HTable htable = (HTable) 
conn.unwrap(PhoenixConnection.class).getQueryServices().getTable(tableName);
 htable.clearRegionCache();
 int nRegions = htable.getRegionLocations().size();
-admin.split(tableName, ByteUtil.concat(Bytes.toBytes(tenantId), 
Bytes.toBytes(00A + Character.valueOf((char) ('3' + nextRunCount())) + ts))); 
// vary split point with test run
-int retryCount = 0;
-do {
-Thread.sleep(2000);
-retryCount++;
-//htable.clearRegionCache();
-} while (retryCount  10  htable.getRegionLocations().size() == 
nRegions);
-assertNotEquals(nRegions, htable.getRegionLocations().size());
+
if(!admin.tableExists(TableName.valueOf(MetaDataUtil.getLocalIndexTableName(ATABLE_NAME
 {
+admin.split(tableName, 
ByteUtil.concat(Bytes.toBytes(tenantId), Bytes.toBytes(00A + 
Character.valueOf((char) ('3' + nextRunCount())) + ts))); // vary split point 
with test run
+int retryCount = 0;
+do {
+Thread.sleep(2000);
+retryCount++;
+//htable.clearRegionCache();
+} while (retryCount  10  htable.getRegionLocations().size() 
== nRegions);
+assertNotEquals(nRegions, htable.getRegionLocations().size());
+} 
 
 statement.setString(1, tenantId);
 rs = statement.executeQuery();

http://git-wip-us.apache.org/repos/asf/phoenix/blob/4c0d00bd/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/LocalIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/LocalIndexIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/LocalIndexIT.java
index 019e0fb..7fa69d4 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/LocalIndexIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/LocalIndexIT.java
@@ -24,22 +24,31 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
+import java.io.IOException;
 import java.sql.Connection;
 import java.sql.DriverManager;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.util.List;
 import java.util.Map;
+import java.util.concurrent.CountDownLatch;
 
 import org.apache.hadoop.hbase.HRegionInfo;
 import 

[23/24] git commit: Rename method for consistency

2014-10-28 Thread jamestaylor
Rename method for consistency


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

Branch: refs/heads/4.2
Commit: 6477e0fd3de14a1f1c351ef2a576ff70b6c7ff5b
Parents: 668d6ee
Author: James Taylor jtay...@salesforce.com
Authored: Tue Oct 28 15:58:01 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Tue Oct 28 15:58:01 2014 -0700

--
 .../java/org/apache/phoenix/query/ConnectionQueryServices.java   | 2 +-
 .../org/apache/phoenix/query/ConnectionQueryServicesImpl.java| 2 +-
 .../apache/phoenix/query/ConnectionlessQueryServicesImpl.java| 2 +-
 .../apache/phoenix/query/DelegateConnectionQueryServices.java| 4 ++--
 .../src/main/java/org/apache/phoenix/schema/MetaDataClient.java  | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/6477e0fd/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServices.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServices.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServices.java
index 8af9310..8826b48 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServices.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServices.java
@@ -104,7 +104,7 @@ public interface ConnectionQueryServices extends 
QueryServices, MetaDataMutated
 public boolean supportsFeature(Feature feature);
 
 public String getUserName();
-public void incrementTableTimeStamp(final byte[] tenantId, final byte[] 
schemaName, final byte[] tableName, long clientTS) throws SQLException;
+public void clearTableFromCache(final byte[] tenantId, final byte[] 
schemaName, final byte[] tableName, long clientTS) throws SQLException;
 
 public PTableStats getTableStats(byte[] physicalName, long 
clientTimeStamp) throws SQLException;
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/6477e0fd/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index 4f3a346..21208b5 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -1887,7 +1887,7 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
 }
 
 @Override
-public void incrementTableTimeStamp(final byte[] tenantId, final byte[] 
schemaName, final byte[] tableName,
+public void clearTableFromCache(final byte[] tenantId, final byte[] 
schemaName, final byte[] tableName,
 final long clientTS) throws SQLException {
 // clear the meta data cache for the table here
 try {

http://git-wip-us.apache.org/repos/asf/phoenix/blob/6477e0fd/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
index 386050c..ec10d5f 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
@@ -231,7 +231,7 @@ public class ConnectionlessQueryServicesImpl extends 
DelegateQueryServices imple
 }
 
 @Override
-public void incrementTableTimeStamp(byte[] tenantId, byte[] schemaName, 
byte[] tableName, long clientTS)
+public void clearTableFromCache(byte[] tenantId, byte[] schemaName, byte[] 
tableName, long clientTS)
 throws SQLException {}
 // TODO: share this with ConnectionQueryServicesImpl
 @Override

http://git-wip-us.apache.org/repos/asf/phoenix/blob/6477e0fd/phoenix-core/src/main/java/org/apache/phoenix/query/DelegateConnectionQueryServices.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/DelegateConnectionQueryServices.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/DelegateConnectionQueryServices.java
index defad5b..ae0b689 100644
--- 

[03/24] git commit: PHOENIX-910 Filter should override hasFilterRow() when filterRow() is overridden.(Ted)

2014-10-28 Thread jamestaylor
PHOENIX-910 Filter should override hasFilterRow() when filterRow() is 
overridden.(Ted)


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

Branch: refs/heads/4.2
Commit: 4753c4efea1d50c290ba84dca1601d873ef2ad6d
Parents: e8a0355
Author: anoopsjohn anoopsamj...@gmail.com
Authored: Fri Oct 24 13:42:45 2014 +0530
Committer: anoopsjohn anoopsamj...@gmail.com
Committed: Fri Oct 24 13:42:45 2014 +0530

--
 .../org/apache/phoenix/filter/BooleanExpressionFilter.java | 6 ++
 1 file changed, 6 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/4753c4ef/phoenix-core/src/main/java/org/apache/phoenix/filter/BooleanExpressionFilter.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/filter/BooleanExpressionFilter.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/filter/BooleanExpressionFilter.java
index e0caf9f..c5b36b2 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/filter/BooleanExpressionFilter.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/filter/BooleanExpressionFilter.java
@@ -37,6 +37,7 @@ import org.apache.phoenix.util.ServerUtil;
  * 
  * Base class for filter that evaluates a WHERE clause expression.
  *
+ * Subclass is expected to implement filterRow() method
  * 
  * @since 0.1
  */
@@ -57,6 +58,11 @@ abstract public class BooleanExpressionFilter extends 
FilterBase implements Writ
 }
 
 @Override
+public boolean hasFilterRow() {
+  return true;
+}
+
+@Override
 public int hashCode() {
 final int prime = 31;
 int result = 1;



[07/24] git commit: PHOENIX-1366 Use static constants

2014-10-28 Thread jamestaylor
PHOENIX-1366 Use static constants


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

Branch: refs/heads/4.2
Commit: 5093c2f262480d04f8495c55d23960b89a674c6e
Parents: ba96d70
Author: James Taylor jtay...@salesforce.com
Authored: Sun Oct 26 22:25:32 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Sun Oct 26 22:25:32 2014 -0700

--
 .../java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/5093c2f2/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
index a03cda4..8edc7ae 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
@@ -29,6 +29,7 @@ import java.util.Collections;
 import java.util.List;
 
 import org.apache.commons.lang.StringEscapeUtils;
+import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.util.Bytes;
@@ -536,14 +537,14 @@ public class PhoenixDatabaseMetaData implements 
DatabaseMetaData, org.apache.pho
 
 if (tuple != null  tenantColumnSkipped) {
 ResultTuple resultTuple = (ResultTuple)tuple;
-ListKeyValue cells = resultTuple.getResult().list();
+ListCell cells = resultTuple.getResult().listCells();
 KeyValue kv = new KeyValue(resultTuple.getResult().getRow(), 
TABLE_FAMILY_BYTES,
 TENANT_POS_SHIFT_BYTES, PDataType.TRUE_BYTES);
-ListKeyValue newCells = 
Lists.newArrayListWithCapacity(cells.size() + 1);
+ListCell newCells = 
Lists.newArrayListWithCapacity(cells.size() + 1);
 newCells.addAll(cells);
 newCells.add(kv);
 Collections.sort(newCells, KeyValue.COMPARATOR);
-resultTuple.setResult(new Result(newCells));
+resultTuple.setResult(Result.create(newCells));
 }
 
 return tuple;



[06/15] git commit: PHOENIX-1366 ORDINAL_POSITION incorrect for multi-tenant table over tenant-specific connection (Bruno Dumon)

2014-10-28 Thread jamestaylor
PHOENIX-1366 ORDINAL_POSITION incorrect for multi-tenant table over 
tenant-specific connection (Bruno Dumon)


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

Branch: refs/heads/3.2
Commit: 60fee11be5e9968d7922215c24aaeb29cdaf416b
Parents: 2bdc33b
Author: James Taylor jtay...@salesforce.com
Authored: Sun Oct 26 20:46:03 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Sun Oct 26 20:51:21 2014 -0700

--
 .../end2end/TenantSpecificTablesDDLIT.java  | 23 ++-
 .../phoenix/jdbc/PhoenixDatabaseMetaData.java   | 31 
 2 files changed, 42 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/60fee11b/phoenix-core/src/it/java/org/apache/phoenix/end2end/TenantSpecificTablesDDLIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/TenantSpecificTablesDDLIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/TenantSpecificTablesDDLIT.java
index 589e963..42fe5b8 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/TenantSpecificTablesDDLIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/TenantSpecificTablesDDLIT.java
@@ -22,6 +22,8 @@ import static 
org.apache.phoenix.exception.SQLExceptionCode.CANNOT_DROP_PK;
 import static 
org.apache.phoenix.exception.SQLExceptionCode.CANNOT_MODIFY_VIEW_PK;
 import static 
org.apache.phoenix.exception.SQLExceptionCode.CANNOT_MUTATE_TABLE;
 import static org.apache.phoenix.exception.SQLExceptionCode.TABLE_UNDEFINED;
+import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.KEY_SEQ;
+import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.ORDINAL_POSITION;
 import static 
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SYSTEM_CATALOG_SCHEMA;
 import static 
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SYSTEM_CATALOG_TABLE;
 import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.TYPE_SEQUENCE;
@@ -554,21 +556,22 @@ public class TenantSpecificTablesDDLIT extends 
BaseTenantSpecificTablesIT {
 // make sure tenants see parent table's columns and their own
 rs = meta.getColumns(null, null, 
StringUtil.escapeLike(TENANT_TABLE_NAME) + %, null);
 assertTrue(rs.next());
-assertColumnMetaData(rs, null, TENANT_TABLE_NAME, user);
+assertColumnMetaData(rs, null, TENANT_TABLE_NAME, user, 1);
 assertTrue(rs.next());
 // (tenant_id column is not visible in tenant-specific connection)
-assertColumnMetaData(rs, null, TENANT_TABLE_NAME, 
tenant_type_id);
+assertColumnMetaData(rs, null, TENANT_TABLE_NAME, 
tenant_type_id, 2);
+assertEquals(1, rs.getInt(KEY_SEQ));
 assertTrue(rs.next());
-assertColumnMetaData(rs, null, TENANT_TABLE_NAME, id);
+assertColumnMetaData(rs, null, TENANT_TABLE_NAME, id, 3);
 assertTrue(rs.next());
-assertColumnMetaData(rs, null, TENANT_TABLE_NAME, tenant_col);
+assertColumnMetaData(rs, null, TENANT_TABLE_NAME, tenant_col, 4);
 assertTrue(rs.next());
-assertColumnMetaData(rs, null, 
TENANT_TABLE_NAME_NO_TENANT_TYPE_ID, user);
+assertColumnMetaData(rs, null, 
TENANT_TABLE_NAME_NO_TENANT_TYPE_ID, user, 1);
 assertTrue(rs.next());
 // (tenant_id column is not visible in tenant-specific connection)
-assertColumnMetaData(rs, null, 
TENANT_TABLE_NAME_NO_TENANT_TYPE_ID, id);
+assertColumnMetaData(rs, null, 
TENANT_TABLE_NAME_NO_TENANT_TYPE_ID, id, 2);
 assertTrue(rs.next());
-assertColumnMetaData(rs, null, 
TENANT_TABLE_NAME_NO_TENANT_TYPE_ID, tenant_col);
+assertColumnMetaData(rs, null, 
TENANT_TABLE_NAME_NO_TENANT_TYPE_ID, tenant_col, 3);
 assertFalse(rs.next()); 
 }
 finally {
@@ -587,4 +590,10 @@ public class TenantSpecificTablesDDLIT extends 
BaseTenantSpecificTablesIT {
 assertEquals(table, rs.getString(TABLE_NAME));
 assertEquals(SchemaUtil.normalizeIdentifier(column), 
rs.getString(COLUMN_NAME));
 }
+
+private void assertColumnMetaData(ResultSet rs, String schema, String 
table, String column, int ordinalPosition)
+throws SQLException {
+assertColumnMetaData(rs, schema, table, column);
+assertEquals(ordinalPosition, rs.getInt(ORDINAL_POSITION));
+}
 }
\ No newline at end of file


[08/15] git commit: PHOENIX-1382: Phoenix 4.2 RC Issue

2014-10-28 Thread jamestaylor
PHOENIX-1382: Phoenix 4.2 RC Issue


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

Branch: refs/heads/3.2
Commit: ca6c08f044626386c6a988906617dfc71310d390
Parents: 0d90e2f
Author: Jeffrey Zhong jeffr...@apache.org
Authored: Sun Oct 26 22:07:13 2014 -0700
Committer: Jeffrey Zhong jeffr...@apache.org
Committed: Sun Oct 26 22:17:16 2014 -0700

--
 bin/phoenix_utils.py   | 2 +-
 .../main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/ca6c08f0/bin/phoenix_utils.py
--
diff --git a/bin/phoenix_utils.py b/bin/phoenix_utils.py
index 4f7d9c3..2331ae9 100755
--- a/bin/phoenix_utils.py
+++ b/bin/phoenix_utils.py
@@ -49,7 +49,7 @@ def findFileInPathWithoutRecursion(pattern, path):
 return 
 
 def setPath():
- PHOENIX_CLIENT_JAR_PATTERN = phoenix-*-client*.jar
+ PHOENIX_CLIENT_JAR_PATTERN = phoenix-*-client.jar
  PHOENIX_TESTS_JAR_PATTERN = phoenix-*-tests*.jar
  global current_dir
  current_dir = os.path.dirname(os.path.abspath(__file__))

http://git-wip-us.apache.org/repos/asf/phoenix/blob/ca6c08f0/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
index 3944d9e..7979757 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
@@ -56,7 +56,7 @@ import com.google.common.collect.Lists;
  */
 public interface MetaDataProtocol extends CoprocessorProtocol {
 public static final int PHOENIX_MAJOR_VERSION = 3;
-public static final int PHOENIX_MINOR_VERSION = 1;
+public static final int PHOENIX_MINOR_VERSION = 2;
 public static final int PHOENIX_PATCH_NUMBER = 0;
 public static final int PHOENIX_VERSION = 
 VersionUtil.encodeVersion(PHOENIX_MAJOR_VERSION, 
PHOENIX_MINOR_VERSION, PHOENIX_PATCH_NUMBER);



[12/15] git commit: PHOENIX-1390 Stats not updated on client after major compaction

2014-10-28 Thread jamestaylor
PHOENIX-1390 Stats not updated on client after major compaction

Conflicts:

phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorIT.java

Conflicts:
phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseQueryIT.java
phoenix-core/src/it/java/org/apache/phoenix/end2end/ReverseScanIT.java

phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorIT.java

phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java

phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java

phoenix-core/src/main/java/org/apache/phoenix/query/QueryServicesOptions.java
phoenix-core/src/main/java/org/apache/phoenix/schema/PTableImpl.java

phoenix-core/src/main/java/org/apache/phoenix/schema/stats/PTableStatsImpl.java

phoenix-core/src/main/java/org/apache/phoenix/schema/stats/StatisticsCollector.java

phoenix-core/src/main/java/org/apache/phoenix/schema/stats/StatisticsUtil.java


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

Branch: refs/heads/3.2
Commit: 6c94dc6eb62c1cb4e255d9817af8c985be739785
Parents: 72144f1
Author: James Taylor jtay...@salesforce.com
Authored: Tue Oct 28 12:44:37 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Tue Oct 28 15:18:39 2014 -0700

--
 .../end2end/BaseClientManagedTimeIT.java|  15 +-
 .../org/apache/phoenix/end2end/BaseQueryIT.java |   3 +-
 .../end2end/ClientTimeArithmeticQueryIT.java|  43 ++
 .../phoenix/end2end/InMemoryOrderByIT.java  |   4 +-
 .../org/apache/phoenix/end2end/QueryIT.java |  24 ++-
 .../org/apache/phoenix/end2end/SequenceIT.java  |   7 +-
 .../phoenix/end2end/SpooledOrderByIT.java   |   4 +-
 .../phoenix/end2end/StatsCollectorIT.java   |  55 ++-
 .../apache/phoenix/end2end/UpsertSelectIT.java  |   4 +-
 .../phoenix/compile/ExpressionCompiler.java |   2 +-
 .../coprocessor/MetaDataEndpointImpl.java   |  35 +
 .../UngroupedAggregateRegionObserver.java   |  21 ++-
 .../org/apache/phoenix/query/QueryServices.java |   1 +
 .../phoenix/query/QueryServicesOptions.java |   7 +-
 .../apache/phoenix/schema/MetaDataClient.java   |   4 +-
 .../phoenix/schema/stats/PTableStats.java   |   7 +
 .../phoenix/schema/stats/PTableStatsImpl.java   |  12 +-
 .../schema/stats/StatisticsCollector.java   | 154 +++
 .../phoenix/schema/stats/StatisticsScanner.java |   1 -
 .../phoenix/schema/stats/StatisticsUtil.java|   6 +-
 .../phoenix/schema/stats/StatisticsWriter.java  |  39 +++--
 21 files changed, 297 insertions(+), 151 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/6c94dc6e/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseClientManagedTimeIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseClientManagedTimeIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseClientManagedTimeIT.java
index 14dffcb..1acd5b3 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseClientManagedTimeIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseClientManagedTimeIT.java
@@ -17,16 +17,21 @@
  */
 package org.apache.phoenix.end2end;
 
+import java.util.Map;
+
 import javax.annotation.concurrent.NotThreadSafe;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.phoenix.query.BaseTest;
+import org.apache.phoenix.query.QueryServices;
 import org.apache.phoenix.util.ReadOnlyProps;
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.experimental.categories.Category;
 
+import com.google.common.collect.Maps;
+
 /**
  * Base class for tests that manage their own time stamps
  * We need to separate these from tests that rely on hbase to set
@@ -54,9 +59,17 @@ public abstract class BaseClientManagedTimeIT extends 
BaseTest {
 deletePriorTables(ts - 1, getUrl());
 }
 
+public static MapString,String getDefaultProps() {
+MapString,String props = Maps.newHashMapWithExpectedSize(5);
+// Must update config before starting server
+props.put(QueryServices.STATS_USE_CURRENT_TIME_ATTRIB, 
Boolean.FALSE.toString());
+return props;
+}
+
 @BeforeClass
 public static void doSetup() throws Exception {
-setUpTestDriver(ReadOnlyProps.EMPTY_PROPS);
+MapString,String props = getDefaultProps();
+setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
 }
 
 @AfterClass


[09/15] git commit: PHOENIX-897 Quote parameters in psql.py

2014-10-28 Thread jamestaylor
PHOENIX-897 Quote parameters in psql.py

Properly quote supplied command-line parameters in psql.py so that
it's possible to supply any character (including ones that have
special meanings in various shells) as parameters.


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

Branch: refs/heads/3.2
Commit: f4687599173427d2b7e71b076aa1e763a062281b
Parents: ca6c08f
Author: Gabriel Reid gabri...@ngdata.com
Authored: Mon Oct 27 10:57:43 2014 +0100
Committer: Gabriel Reid gabri...@ngdata.com
Committed: Mon Oct 27 10:58:48 2014 +0100

--
 bin/psql.py | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/f4687599/bin/psql.py
--
diff --git a/bin/psql.py b/bin/psql.py
index a8cbe31..34a95df 100755
--- a/bin/psql.py
+++ b/bin/psql.py
@@ -26,11 +26,17 @@ import phoenix_utils
 
 phoenix_utils.setPath()
 
+if os.name == 'nt':
+args = subprocess.list2cmdline(sys.argv[1:])
+else:
+import pipes# pipes module isn't available on Windows
+args =  .join([pipes.quote(v) for v in sys.argv[1:]])
+
 # HBase configuration folder path (where hbase-site.xml reside) for
 # HBase/Phoenix client side property override
 java_cmd = 'java -cp ' + phoenix_utils.hbase_conf_path + os.pathsep + 
phoenix_utils.phoenix_client_jar + \
 ' -Dlog4j.configuration=file:' + \
 os.path.join(phoenix_utils.current_dir, log4j.properties) + \
- org.apache.phoenix.util.PhoenixRuntime  + ' '.join(sys.argv[1:])
+ org.apache.phoenix.util.PhoenixRuntime  + args 
 
 subprocess.call(java_cmd, shell=True)



[03/15] PHOENIX-944 Support derived tables in FROM clause that needs extra steps of client-side aggregation or other processing

2014-10-28 Thread jamestaylor
http://git-wip-us.apache.org/repos/asf/phoenix/blob/2bdc33bc/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java.orig
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java.orig 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java.orig
deleted file mode 100644
index 8bb91b4..000
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java.orig
+++ /dev/null
@@ -1,2197 +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.schema;
-
-import static com.google.common.collect.Lists.newArrayListWithExpectedSize;
-import static com.google.common.collect.Sets.newLinkedHashSet;
-import static com.google.common.collect.Sets.newLinkedHashSetWithExpectedSize;
-import static 
org.apache.phoenix.exception.SQLExceptionCode.INSUFFICIENT_MULTI_TENANT_COLUMNS;
-import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.ARRAY_SIZE;
-import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.COLUMN_COUNT;
-import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.COLUMN_FAMILY;
-import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.COLUMN_NAME;
-import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.COLUMN_SIZE;
-import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.DATA_TABLE_NAME;
-import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.DATA_TYPE;
-import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.DECIMAL_DIGITS;
-import static 
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.DEFAULT_COLUMN_FAMILY_NAME;
-import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.DISABLE_WAL;
-import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.IMMUTABLE_ROWS;
-import static 
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.INDEX_DISABLE_TIMESTAMP;
-import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.INDEX_STATE;
-import static 
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.IS_VIEW_REFERENCED;
-import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.KEY_SEQ;
-import static 
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.LAST_STATS_UPDATE_TIME;
-import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.LINK_TYPE;
-import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.MULTI_TENANT;
-import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.NULLABLE;
-import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.ORDINAL_POSITION;
-import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.PHYSICAL_NAME;
-import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.PK_NAME;
-import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.REGION_NAME;
-import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SALT_BUCKETS;
-import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SORT_ORDER;
-import static 
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SYSTEM_CATALOG_SCHEMA;
-import static 
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.SYSTEM_CATALOG_TABLE;
-import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.TABLE_NAME;
-import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.TABLE_SCHEM;
-import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.TABLE_SEQ_NUM;
-import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.TABLE_TYPE;
-import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.TENANT_ID;
-import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.VIEW_CONSTANT;
-import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.VIEW_INDEX_ID;
-import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.VIEW_STATEMENT;
-import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.VIEW_TYPE;
-import static org.apache.phoenix.query.QueryServices.DROP_METADATA_ATTRIB;
-import static 
org.apache.phoenix.query.QueryServicesOptions.DEFAULT_DROP_METADATA;
-import static org.apache.phoenix.schema.PDataType.VARCHAR;
-
-import java.io.IOException;
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.ResultSetMetaData;
-import java.sql.SQLException;
-import 

[01/15] git commit: PHOENIX-1375 Remove references to incubation

2014-10-28 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/3.2 e7e00f991 - 8b460b5c0


PHOENIX-1375 Remove references to incubation


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

Branch: refs/heads/3.2
Commit: f1cbcc4586ee93f683a126fabbf0b03c222666b2
Parents: e7e00f9
Author: Gabriel Reid gabri...@ngdata.com
Authored: Thu Oct 23 21:53:47 2014 +0200
Committer: Gabriel Reid gabri...@ngdata.com
Committed: Thu Oct 23 21:53:47 2014 +0200

--
 NOTICE   | 2 +-
 dev/release_files/NOTICE | 2 +-
 pom.xml  | 6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/f1cbcc45/NOTICE
--
diff --git a/NOTICE b/NOTICE
index ac3ec17..093ae02 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,4 +1,4 @@
-Apache Phoenix (Incubating)
+Apache Phoenix
 Copyright 2014 The Apache Software Foundation
 
 This product includes software developed at

http://git-wip-us.apache.org/repos/asf/phoenix/blob/f1cbcc45/dev/release_files/NOTICE
--
diff --git a/dev/release_files/NOTICE b/dev/release_files/NOTICE
index 84869a6..a96a97c 100644
--- a/dev/release_files/NOTICE
+++ b/dev/release_files/NOTICE
@@ -1,4 +1,4 @@
-Apache Phoenix (Incubating)
+Apache Phoenix
 Copyright 2014 The Apache Software Foundation
 
 This product includes software developed at

http://git-wip-us.apache.org/repos/asf/phoenix/blob/f1cbcc45/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 145d528..214814a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -59,9 +59,9 @@
   /parent
 
   scm
-
connectionscm:git:http://git-wip-us.apache.org/repos/asf/incubator-phoenix.git/connection
-urlhttps://git-wip-us.apache.org/repos/asf/incubator-phoenix.git/url
-
developerConnectionscm:git:https://git-wip-us.apache.org/repos/asf/incubator-phoenix.git/developerConnection
+
connectionscm:git:http://git-wip-us.apache.org/repos/asf/phoenix.git/connection
+urlhttps://git-wip-us.apache.org/repos/asf/phoenix.git/url
+
developerConnectionscm:git:https://git-wip-us.apache.org/repos/asf/phoenix.git/developerConnection
   /scm
 
   properties



[10/15] git commit: PHOENIX-1385 Adding, dropping and adding columns fails with NPE (Samarth Jain, James Taylor)

2014-10-28 Thread jamestaylor
PHOENIX-1385 Adding, dropping and adding columns fails with NPE (Samarth Jain, 
James Taylor)


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

Branch: refs/heads/3.2
Commit: 2681601164441f6868e8472c40ed461cdac32c36
Parents: f468759
Author: James Taylor jtay...@salesforce.com
Authored: Mon Oct 27 13:35:49 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Mon Oct 27 13:45:32 2014 -0700

--
 .../apache/phoenix/end2end/AlterTableIT.java| 22 +++-
 .../apache/phoenix/jdbc/PhoenixConnection.java  |  8 +--
 .../query/ConnectionQueryServicesImpl.java  |  4 +-
 .../query/ConnectionlessQueryServicesImpl.java  |  6 +--
 .../query/DelegateConnectionQueryServices.java  |  6 +--
 .../apache/phoenix/query/MetaDataMutated.java   |  2 +-
 .../apache/phoenix/schema/MetaDataClient.java   |  6 +--
 .../apache/phoenix/schema/PMetaDataImpl.java| 53 +++-
 8 files changed, 64 insertions(+), 43 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/26816011/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
index b17c1bd..9c14f16 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
@@ -884,4 +884,24 @@ public class AlterTableIT extends BaseHBaseManagedTimeIT {
 pstmt2.close();
 conn1.close();
 }
-}
+
+@Test
+public void testAddColumnsUsingNewConnection() throws Exception {
+Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+String ddl = CREATE TABLE T (\n
++ID1 VARCHAR(15) NOT NULL,\n
++ID2 VARCHAR(15) NOT NULL,\n
++CREATED_DATE DATE,\n
++CREATION_TIME BIGINT,\n
++LAST_USED DATE,\n
++CONSTRAINT PK PRIMARY KEY (ID1, ID2));
+Connection conn1 = DriverManager.getConnection(getUrl(), props);
+conn1.createStatement().execute(ddl);
+ddl = ALTER TABLE T ADD STRING VARCHAR, STRING_DATA_TYPES VARCHAR;
+conn1.createStatement().execute(ddl);
+ddl = ALTER TABLE T DROP COLUMN STRING, STRING_DATA_TYPES;
+conn1.createStatement().execute(ddl);
+ddl = ALTER TABLE T ADD STRING_ARRAY1 VARCHAR[];
+conn1.createStatement().execute(ddl);
+conn1.close();
+}}

http://git-wip-us.apache.org/repos/asf/phoenix/blob/26816011/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java 
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java
index 7eced73..75f9f55 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java
@@ -697,11 +697,11 @@ public class PhoenixConnection implements Connection, 
org.apache.phoenix.jdbc.Jd
 }
 
 @Override
-public PMetaData removeColumn(PName tenantId, String tableName, String 
familyName, String columnName,
-long tableTimeStamp, long tableSeqNum) throws SQLException {
-metaData = metaData.removeColumn(tenantId, tableName, familyName, 
columnName, tableTimeStamp, tableSeqNum);
+public PMetaData removeColumn(PName tenantId, String tableName, 
ListPColumn columnsToRemove, long tableTimeStamp,
+long tableSeqNum) throws SQLException {
+metaData = metaData.removeColumn(tenantId, tableName, columnsToRemove, 
tableTimeStamp, tableSeqNum);
 //Cascade through to connectionQueryServices too
-getQueryServices().removeColumn(tenantId, tableName, familyName, 
columnName, tableTimeStamp, tableSeqNum);
+getQueryServices().removeColumn(tenantId, tableName, columnsToRemove, 
tableTimeStamp, tableSeqNum);
 return metaData;
 }
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/26816011/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index c0552ce..3e46a30 100644
--- 

[14/15] git commit: Update QueryPlanTest to remove reverse test

2014-10-28 Thread jamestaylor
Update QueryPlanTest to remove reverse test


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

Branch: refs/heads/3.2
Commit: 311b5aa0ac4cbe6f0db0654340769a4cd4be84eb
Parents: 4767f13
Author: James Taylor jtay...@salesforce.com
Authored: Tue Oct 28 15:54:46 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Tue Oct 28 15:54:46 2014 -0700

--
 .../src/test/java/org/apache/phoenix/query/QueryPlanTest.java| 4 
 1 file changed, 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/311b5aa0/phoenix-core/src/test/java/org/apache/phoenix/query/QueryPlanTest.java
--
diff --git 
a/phoenix-core/src/test/java/org/apache/phoenix/query/QueryPlanTest.java 
b/phoenix-core/src/test/java/org/apache/phoenix/query/QueryPlanTest.java
index 1e3df0b..5205c99 100644
--- a/phoenix-core/src/test/java/org/apache/phoenix/query/QueryPlanTest.java
+++ b/phoenix-core/src/test/java/org/apache/phoenix/query/QueryPlanTest.java
@@ -45,10 +45,6 @@ public class QueryPlanTest extends 
BaseConnectionlessQueryTest {
 CLIENT PARALLEL 1-WAY SMALL SKIP SCAN ON 3 KEYS OVER PTSDB3 
[~'na3'] - [~'na1']\n + 
 SERVER FILTER BY FIRST KEY ONLY,
 
-SELECT inst,date FROM PTSDB2 WHERE inst = 'na1' ORDER BY inst 
DESC, date DESC,
-CLIENT PARALLEL 1-WAY REVERSE RANGE SCAN OVER PTSDB2 
['na1']\n +
-SERVER FILTER BY FIRST KEY ONLY,
-
 SELECT host FROM PTSDB WHERE inst IS NULL AND host IS NOT 
NULL AND date = to_date('2013-01-01'),
 CLIENT PARALLEL 1-WAY RANGE SCAN OVER PTSDB [null,not 
null]\n + 
 SERVER FILTER BY FIRST KEY ONLY AND DATE = '2013-01-01 
00:00:00.000',



[05/15] git commit: PHOENIX-944 Support derived tables in FROM clause that needs extra steps of client-side aggregation or other processing

2014-10-28 Thread jamestaylor
PHOENIX-944 Support derived tables in FROM clause that needs extra steps of 
client-side aggregation or other processing


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

Branch: refs/heads/3.2
Commit: 2bdc33bc5873960657539ad9a066368dd03a
Parents: f8db1d5
Author: maryannxue maryann...@apache.org
Authored: Fri Oct 24 00:17:39 2014 -0400
Committer: maryannxue maryann...@apache.org
Committed: Fri Oct 24 00:17:39 2014 -0400

--
 .../apache/phoenix/end2end/DerivedTableIT.java  |  282 ++-
 .../org/apache/phoenix/end2end/SubqueryIT.java  |   12 +
 .../apache/phoenix/compile/FromCompiler.java|   27 +-
 .../apache/phoenix/compile/GroupByCompiler.java |5 +-
 .../apache/phoenix/compile/JoinCompiler.java|2 +-
 .../apache/phoenix/compile/OrderByCompiler.java |2 +-
 .../apache/phoenix/compile/QueryCompiler.java   |   62 +-
 .../phoenix/compile/SubqueryRewriter.java   |   10 +-
 .../TrackOrderPreservingExpressionCompiler.java |   27 +-
 .../apache/phoenix/compile/WhereCompiler.java   |   32 +-
 .../GroupedAggregateRegionObserver.java |2 +-
 .../coprocessor/HashJoinRegionScanner.java  |4 +-
 .../phoenix/coprocessor/ScanRegionObserver.java |2 +-
 .../UngroupedAggregateRegionObserver.java   |2 +-
 .../phoenix/execute/ClientAggregatePlan.java|  230 ++
 .../phoenix/execute/ClientProcessingPlan.java   |   82 +
 .../apache/phoenix/execute/ClientScanPlan.java  |   92 +
 .../apache/phoenix/execute/HashJoinPlan.java|   24 +-
 .../phoenix/execute/TupleProjectionPlan.java|   49 +-
 .../apache/phoenix/execute/TupleProjector.java  |  275 +++
 .../expression/ProjectedColumnExpression.java   |2 +-
 .../DistinctValueClientAggregator.java  |7 +-
 .../BaseGroupedAggregatingResultIterator.java   |  105 +
 .../GroupedAggregatingResultIterator.java   |   60 +-
 .../iterate/LookAheadResultIterator.java|6 +-
 .../org/apache/phoenix/join/TupleProjector.java |  246 --
 .../apache/phoenix/optimize/QueryOptimizer.java |1 +
 .../apache/phoenix/parse/ParseNodeFactory.java  |4 +-
 .../apache/phoenix/parse/SelectStatement.java   |7 +
 .../org/apache/phoenix/schema/ColumnRef.java|2 +-
 .../phoenix/schema/MetaDataClient.java.orig | 2197 --
 31 files changed, 1184 insertions(+), 2676 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/2bdc33bc/phoenix-core/src/it/java/org/apache/phoenix/end2end/DerivedTableIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DerivedTableIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DerivedTableIT.java
index 8a80764..8ef542a 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DerivedTableIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DerivedTableIT.java
@@ -35,19 +35,19 @@ import static 
org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
 
+import java.sql.Array;
 import java.sql.Connection;
 import java.sql.DriverManager;
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
-import java.sql.SQLFeatureNotSupportedException;
 import java.util.Collection;
 import java.util.List;
 import java.util.Properties;
 
 import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.PropertiesUtil;
+import org.apache.phoenix.util.QueryUtil;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -61,33 +61,65 @@ import com.google.common.collect.Lists;
 @RunWith(Parameterized.class)
 public class DerivedTableIT extends BaseClientManagedTimeIT {
 private static final String tenantId = getOrganizationId();
-private static final String MSG = Complex nested queries not supported.;
 
 private long ts;
-private String indexDDL;
+private String[] indexDDL;
+private String[] plans;
 
-public DerivedTableIT(String indexDDL) {
+public DerivedTableIT(String[] indexDDL, String[] plans) {
 this.indexDDL = indexDDL;
+this.plans = plans;
 }
 
 @Before
 public void initTable() throws Exception {
  ts = nextTimestamp();
 initATableValues(tenantId, getDefaultSplits(tenantId), null, ts);
-if (indexDDL != null  indexDDL.length()  0) {
+if (indexDDL != null  indexDDL.length  0) {
 Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
 

[04/15] PHOENIX-944 Support derived tables in FROM clause that needs extra steps of client-side aggregation or other processing

2014-10-28 Thread jamestaylor
http://git-wip-us.apache.org/repos/asf/phoenix/blob/2bdc33bc/phoenix-core/src/main/java/org/apache/phoenix/execute/TupleProjector.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/execute/TupleProjector.java 
b/phoenix-core/src/main/java/org/apache/phoenix/execute/TupleProjector.java
new file mode 100644
index 000..14b488d
--- /dev/null
+++ b/phoenix-core/src/main/java/org/apache/phoenix/execute/TupleProjector.java
@@ -0,0 +1,275 @@
+/*
+ * 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.execute;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.client.Scan;
+import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
+import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.hadoop.io.WritableUtils;
+import org.apache.phoenix.compile.ColumnProjector;
+import org.apache.phoenix.compile.JoinCompiler.ProjectedPTableWrapper;
+import org.apache.phoenix.compile.RowProjector;
+import org.apache.phoenix.expression.Expression;
+import org.apache.phoenix.expression.ExpressionType;
+import org.apache.phoenix.schema.KeyValueSchema;
+import org.apache.phoenix.schema.KeyValueSchema.KeyValueSchemaBuilder;
+import org.apache.phoenix.schema.PColumn;
+import org.apache.phoenix.schema.ValueBitSet;
+import org.apache.phoenix.schema.tuple.BaseTuple;
+import org.apache.phoenix.schema.tuple.Tuple;
+import org.apache.phoenix.util.KeyValueUtil;
+import org.apache.phoenix.util.SchemaUtil;
+
+public class TupleProjector {
+public static final byte[] VALUE_COLUMN_FAMILY = Bytes.toBytes(_v);
+public static final byte[] VALUE_COLUMN_QUALIFIER = new byte[0];
+
+private static final String SCAN_PROJECTOR = scanProjector;
+
+private final KeyValueSchema schema;
+private final Expression[] expressions;
+private ValueBitSet valueSet;
+private final ImmutableBytesWritable ptr = new ImmutableBytesWritable();
+
+public TupleProjector(RowProjector rowProjector) {
+List? extends ColumnProjector columnProjectors = 
rowProjector.getColumnProjectors();
+int count = columnProjectors.size();
+KeyValueSchemaBuilder builder = new KeyValueSchemaBuilder(0);
+expressions = new Expression[count];
+for (int i = 0; i  count; i++) {
+Expression expression = columnProjectors.get(i).getExpression();
+builder.addField(expression);
+expressions[i] = expression;
+}
+schema = builder.build();
+valueSet = ValueBitSet.newInstance(schema);
+}
+
+public TupleProjector(ProjectedPTableWrapper projected) {
+   ListPColumn columns = projected.getTable().getColumns();
+   expressions = new Expression[columns.size() - 
projected.getTable().getPKColumns().size()];
+   // we do not count minNullableIndex for we might do later merge.
+   KeyValueSchemaBuilder builder = new KeyValueSchemaBuilder(0);
+   int i = 0;
+for (PColumn column : projected.getTable().getColumns()) {
+   if (!SchemaUtil.isPKColumn(column)) {
+   builder.addField(column);
+   expressions[i++] = 
projected.getSourceExpression(column);
+   }
+}
+schema = builder.build();
+valueSet = ValueBitSet.newInstance(schema);
+}
+
+private TupleProjector(KeyValueSchema schema, Expression[] expressions) {
+   this.schema = schema;
+   this.expressions = expressions;
+   this.valueSet = ValueBitSet.newInstance(schema);
+}
+
+public void setValueBitSet(ValueBitSet bitSet) {
+this.valueSet = bitSet;
+}
+
+public static void serializeProjectorIntoScan(Scan scan, TupleProjector 
projector) {
+ByteArrayOutputStream stream = new ByteArrayOutputStream();
+try {
+DataOutputStream output = new DataOutputStream(stream);
+projector.schema.write(output);
+

[13/15] git commit: PHOENIX-1391 Remove obsolete hint

2014-10-28 Thread jamestaylor
PHOENIX-1391 Remove obsolete hint

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


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

Branch: refs/heads/3.2
Commit: 4767f139b2ef125549a4a727bdb33bbf9d54bda2
Parents: 6c94dc6
Author: James Taylor jtay...@salesforce.com
Authored: Tue Oct 28 14:08:08 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Tue Oct 28 15:28:14 2014 -0700

--
 .../end2end/SkipScanAfterManualSplitIT.java|  2 +-
 .../phoenix/coprocessor/MetaDataEndpointImpl.java  |  2 +-
 .../phoenix/coprocessor/MetaDataProtocol.java  |  2 +-
 .../org/apache/phoenix/execute/BaseQueryPlan.java  |  6 ++
 .../org/apache/phoenix/iterate/ExplainTable.java   | 17 +++--
 .../apache/phoenix/iterate/ParallelIterators.java  |  2 +-
 .../phoenix/jdbc/PhoenixDatabaseMetaData.java  | 15 +++
 .../java/org/apache/phoenix/parse/HintNode.java|  9 -
 .../phoenix/query/ConnectionQueryServices.java |  2 +-
 .../phoenix/query/ConnectionQueryServicesImpl.java |  4 ++--
 .../query/ConnectionlessQueryServicesImpl.java |  2 +-
 .../query/DelegateConnectionQueryServices.java |  4 ++--
 .../org/apache/phoenix/schema/MetaDataClient.java  |  2 +-
 .../java/org/apache/phoenix/util/ScanUtil.java | 13 +
 .../phoenix/query/BaseConnectionlessQueryTest.java |  2 ++
 .../org/apache/phoenix/query/QueryPlanTest.java|  8 
 16 files changed, 62 insertions(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/4767f139/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanAfterManualSplitIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanAfterManualSplitIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanAfterManualSplitIT.java
index a07ad0e..3c0344c 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanAfterManualSplitIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/SkipScanAfterManualSplitIT.java
@@ -128,7 +128,7 @@ public class SkipScanAfterManualSplitIT extends 
BaseHBaseManagedTimeIT {
 assertEquals(nRegions, nInitialRegions);
 
 int nRows = 2;
-String query = SELECT /*+ NO_INTRA_REGION_PARALLELIZATION */ 
count(*) FROM S WHERE a IN ('tl','jt',' a',' b',' c',' d');
+String query = SELECT count(*) FROM S WHERE a IN ('tl','jt',' 
a',' b',' c',' d');
 ResultSet rs1 = conn.createStatement().executeQuery(query);
 assertTrue(rs1.next());
 nRegions = services.getAllTableRegions(TABLE_NAME_BYTES).size();

http://git-wip-us.apache.org/repos/asf/phoenix/blob/4767f139/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
index 38277c5..0327c35 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
@@ -1384,7 +1384,7 @@ public class MetaDataEndpointImpl extends 
BaseEndpointCoprocessor implements Met
 }
 
 @Override
-public void incrementTableTimeStamp(byte[] tenantId, byte[] schemaName, 
byte[] tableName, final long clientTimeStamp)
+public void clearTableFromCache(byte[] tenantId, byte[] schemaName, byte[] 
tableName, final long clientTimeStamp)
 throws IOException {
 try {
 byte[] key = SchemaUtil.getTableKey(tenantId, schemaName, 
tableName);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/4767f139/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
index 7979757..76fb129 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
@@ -266,7 +266,7 @@ public interface MetaDataProtocol extends 
CoprocessorProtocol {
  */
 void clearCache();
 
-void incrementTableTimeStamp(byte[] tenantId, 

[15/15] git commit: Update CHANGES

2014-10-28 Thread jamestaylor
Update CHANGES


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

Branch: refs/heads/3.2
Commit: 8b460b5c086f46b3e636133df90932c80c1a643a
Parents: 311b5aa
Author: Mujtaba mujt...@apache.org
Authored: Tue Oct 28 16:28:12 2014 -0700
Committer: Mujtaba mujt...@apache.org
Committed: Tue Oct 28 16:28:12 2014 -0700

--
 CHANGES | 9 +
 1 file changed, 9 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/8b460b5c/CHANGES
--
diff --git a/CHANGES b/CHANGES
index bdc6b9a..40157f9 100644
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,7 @@ Release Notes - Phoenix - Version 3.2
 * [PHOENIX-943] - Handle pushed down post-filters for subquery in joins 
with limit and non-groupby aggregation
 * [PHOENIX-945] - Support correlated subqueries in comparison without 
ANY/SOME/ALL
 * [PHOENIX-1085] - Commonize logic for adding salt byte and adding region 
start key in ParallelIterators
+* [PHOENIX-1168] - Support non-correlated sub-queries in where clause 
having a comparison operator with no modifier or a comparison operator modified 
by ANY, SOME or ALL
 * [PHOENIX-1259] - Perform partial scan for ANALYZE when table salted or 
local index
 * [PHOENIX-1263] - Only cache guideposts on physical PTable
 * [PHOENIX-1264] - Add StatisticsCollector to existing tables on first 
connection to cluster
@@ -21,7 +22,9 @@ Release Notes - Phoenix - Version 3.2
 
 ** Bug
 * [PHOENIX-105] - Remove org.apache.commons.csv source once available in 
Maven repo
+* [PHOENIX-897] - psql command doesn't allow using certain characters in 
invocation
 * [PHOENIX-941] - Parallelize within regions to prevent rpc timeout
+* [PHOENIX-944] - Support derived tables in FROM clause that needs extra 
steps of client-side aggregation or other processing
 * [PHOENIX-954] - View index sequences of a non multi tenant table are not 
getting deleted after main table drop
 * [PHOENIX-973] - Lexer skips unexpected characters
 * [PHOENIX-1044] - Phoenix-Pig: No results returned unless all used 
columns are selected
@@ -81,9 +84,15 @@ Release Notes - Phoenix - Version 3.2
 * [PHOENIX-1360] - NPE in SpoolingResultIterator 
 * [PHOENIX-1361] - Sequence value goes backwards if sequence validated 
before reserved
 * [PHOENIX-1365] - Make sequence salt buckets configurable
+* [PHOENIX-1366] - ORDINAL_POSITION incorrect for multi-tenant table over 
tenant-specific connection
 * [PHOENIX-1368] - Persist link from VIEW back to its child VIEW
 * [PHOENIX-1369] - Add back encode/decode methods as deprecated
 * [PHOENIX-1370] - Allow query timeout to differ from RPC timeout
+* [PHOENIX-1376] - java.lang.NullPointerException occurs in JDBC driver
+* [PHOENIX-1382] - Phoenix 4.2 RC Issue
+* [PHOENIX-1385] - Adding, dropping and adding columns fails with NPE
+* [PHOENIX-1390] - Stats not updated on client after major compaction
+* [PHOENIX-1391] - Remove obsolete hint
 
 ** Improvement
 * [PHOENIX-619] - Support DELETE over table with immutable index when 
possible



[02/15] git commit: PHOENIX-1373: Ctrl-C out of sqlline causes terminal to be useless

2014-10-28 Thread jamestaylor
PHOENIX-1373: Ctrl-C out of sqlline causes terminal to be useless


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

Branch: refs/heads/3.2
Commit: f8db1d55108a26ecd8a85e6431d81955f6c66c93
Parents: f1cbcc4
Author: Jeffrey Zhong jeffr...@apache.org
Authored: Thu Oct 23 17:34:43 2014 -0700
Committer: Jeffrey Zhong jeffr...@apache.org
Committed: Thu Oct 23 17:36:55 2014 -0700

--
 bin/sqlline.py | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/f8db1d55/bin/sqlline.py
--
diff --git a/bin/sqlline.py b/bin/sqlline.py
index d41c2e7..f48e527 100755
--- a/bin/sqlline.py
+++ b/bin/sqlline.py
@@ -31,6 +31,8 @@ def kill_child():
 if childProc is not None:
 childProc.terminate()
 childProc.kill()
+if os.name != 'nt':
+os.system(reset)
 atexit.register(kill_child)
 
 phoenix_utils.setPath()



[11/15] git commit: PHOENIX-1376 java.lang.NullPointerException occurs in JDBC driver

2014-10-28 Thread jamestaylor
PHOENIX-1376 java.lang.NullPointerException occurs in JDBC driver


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

Branch: refs/heads/3.2
Commit: 72144f17884518b1152b83d294b77f10c2a743a5
Parents: 2681601
Author: James Taylor jtay...@salesforce.com
Authored: Mon Oct 27 13:40:47 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Mon Oct 27 13:45:38 2014 -0700

--
 .../src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java | 5 -
 .../main/java/org/apache/phoenix/schema/tuple/ResultTuple.java  | 2 +-
 2 files changed, 1 insertion(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/72144f17/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java 
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java
index e662a3f..8a6cf64 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java
@@ -1232,9 +1232,4 @@ public class PhoenixResultSet implements ResultSet, 
SQLCloseable, org.apache.pho
 public T T getObject(String columnLabel, ClassT type) throws 
SQLException {
 return (T) getObject(columnLabel); // Just ignore type since we only 
support built-in types
 }
-
-@Override
-public String toString(){
-  return ResultSet:\n+ \tclosed: +this.isClosed+\n\tcurrent row: 
+currentRow;
-}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/phoenix/blob/72144f17/phoenix-core/src/main/java/org/apache/phoenix/schema/tuple/ResultTuple.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/tuple/ResultTuple.java 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/tuple/ResultTuple.java
index 02aebf7..f0dbd9e 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/tuple/ResultTuple.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/tuple/ResultTuple.java
@@ -62,7 +62,7 @@ public class ResultTuple extends BaseTuple {
 public String toString() {
   StringBuilder sb = new StringBuilder();
   sb.append(keyvalues=);
-  if(this.result.isEmpty()) {
+  if(this.result == null || this.result.isEmpty()) {
 sb.append(NONE);
 return sb.toString();
   }



Jenkins build is back to normal : Phoenix | 3.0 | Hadoop1 #296

2014-10-28 Thread Apache Jenkins Server
See https://builds.apache.org/job/Phoenix-3.0-hadoop1/296/



svn commit: r1635051 - in /phoenix: phoenix-docs/src/docsrc/help/ phoenix-docs/src/tools/org/h2/build/doc/ site/publish/ site/publish/presentations/ site/source/src/site/markdown/ site/source/src/site

2014-10-28 Thread jamestaylor
Author: jamestaylor
Date: Wed Oct 29 05:38:43 2014
New Revision: 1635051

URL: http://svn.apache.org/r1635051
Log:
Update docs for 3.2/4.2 and add resources from recent presentations

Added:
phoenix/site/publish/presentations/HBaseCon2014-16x9.pdf   (with props)
phoenix/site/publish/presentations/HadoopSummit2014-16x9.pdf   (with props)
phoenix/site/publish/presentations/OC-HUG-2014-10-4x3.pdf   (with props)
phoenix/site/source/src/site/resources/presentations/HBaseCon2014-16x9.pdf  
 (with props)

phoenix/site/source/src/site/resources/presentations/HadoopSummit2014-16x9.pdf  
 (with props)
phoenix/site/source/src/site/resources/presentations/OC-HUG-2014-10-4x3.pdf 
  (with props)
Modified:
phoenix/phoenix-docs/src/docsrc/help/phoenix.csv
phoenix/phoenix-docs/src/tools/org/h2/build/doc/dictionary.txt
phoenix/site/publish/index.html
phoenix/site/publish/pig_integration.html
phoenix/site/publish/resources.html
phoenix/site/publish/tuning.html
phoenix/site/publish/update_statistics.html
phoenix/site/source/src/site/markdown/index.md
phoenix/site/source/src/site/markdown/resources.md
phoenix/site/source/src/site/markdown/tuning.md
phoenix/site/source/src/site/markdown/update_statistics.md

Modified: phoenix/phoenix-docs/src/docsrc/help/phoenix.csv
URL: 
http://svn.apache.org/viewvc/phoenix/phoenix-docs/src/docsrc/help/phoenix.csv?rev=1635051r1=1635050r2=1635051view=diff
==
--- phoenix/phoenix-docs/src/docsrc/help/phoenix.csv (original)
+++ phoenix/phoenix-docs/src/docsrc/help/phoenix.csv Wed Oct 29 05:38:43 2014
@@ -543,13 +543,15 @@ ID=1 AND NAME='Hi'
 operand [ compare { operand }
 | [ NOT ] IN ( { constantOperand [,...] } )
 | [ NOT ] LIKE operand
+| [ NOT ] ILIKE operand
 | [ NOT ] BETWEEN operand AND operand
 | IS [ NOT ] NULL ]
 | NOT expression
 ,
 Boolean value or condition.
 When comparing with LIKE, the wildcards characters are _ (any one 
character)
-and % (any characters). To search for the characters % and
+and % (any characters). ILIKE is the same, but the search is case 
insensitive.
+To search for the characters % and
 _, the characters need to be escaped. The escape character is  \  
(backslash).
 Patterns that end with an escape character are invalid and the expression 
returns NULL.
 BETWEEN does an inclusive comparison for both operands.
@@ -1386,6 +1388,15 @@ string. If the replacement string is not
 REGEXP_REPLACE('abc123ABC', '[0-9]+', '#') evaluates to 'abc#ABC'
 
 
+Functions (String),REGEXP_SPLIT,
+REGEXP_SPLIT( stringTerm, patternString )
+,
+Returns a VARCHAR array by splitting the stringTerm based on the Java 
compatible regular
+expression patternString.
+,
+REGEXP_SPLIT('one,two,three', ',') evaluates to ['one','two','three']
+
+
 Functions (General),MD5,
 MD5( term )
 ,

Modified: phoenix/phoenix-docs/src/tools/org/h2/build/doc/dictionary.txt
URL: 
http://svn.apache.org/viewvc/phoenix/phoenix-docs/src/tools/org/h2/build/doc/dictionary.txt?rev=1635051r1=1635050r2=1635051view=diff
==
--- phoenix/phoenix-docs/src/tools/org/h2/build/doc/dictionary.txt (original)
+++ phoenix/phoenix-docs/src/tools/org/h2/build/doc/dictionary.txt Wed Oct 29 
05:38:43 2014
@@ -726,4 +726,4 @@ coercion coerce coerces bas precise subs
 decisions choosing tiebreaker broadcast substantially unlikely act decision 
adjacent
 managed declares tenant tenants especially truth determines misspelled salting 
salted turning adhoc
 rpc doled paranthesis reaching satisfy cocos satisfies pads indian inputting 
prague
-guideposts collects
+guideposts collects ilike

Modified: phoenix/site/publish/index.html
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/index.html?rev=1635051r1=1635050r2=1635051view=diff
==
--- phoenix/site/publish/index.html (original)
+++ phoenix/site/publish/index.html Wed Oct 29 05:38:43 2014
@@ -1,7 +1,7 @@
 
 !DOCTYPE html
 !--
- Generated by Apache Maven Doxia at 2014-10-20
+ Generated by Apache Maven Doxia at 2014-10-28
  Rendered using Reflow Maven Skin 1.1.0 
(http://andriusvelykis.github.io/reflow-maven-skin)
 --
 html  xml:lang=en lang=en
@@ -125,14 +125,14 @@
 div class=page-header
  h1Overview/h1
 /div 
-pApache Phoenix is a SQL skin over HBase delivered as a client-embedded JDBC 
driver targeting low latency queries over HBase data. Apache Phoenix takes your 
SQL query, compiles it into a series of HBase scans, and orchestrates the 
running of those scans to produce regular JDBC result sets. The table metadata 
is stored in an HBase table and versioned, such that snapshot queries over 
prior versions will automatically use the correct schema. Direct use of the 
HBase API, along with coprocessors and custom filters, results in a