git commit: PHOENIX-1098 Support CASCADE option on DROP TABLE that drops all VIEWs (Jan Fernando)

2014-09-04 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.0 2051459cd -> a6ea5560e


PHOENIX-1098 Support CASCADE option on DROP TABLE that drops all VIEWs (Jan 
Fernando)


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

Branch: refs/heads/4.0
Commit: a6ea5560e52d2a0f6a4c9ca4fca585a9225a0f75
Parents: 2051459
Author: James Taylor 
Authored: Thu Sep 4 00:13:27 2014 -0700
Committer: James Taylor 
Committed: Thu Sep 4 00:13:27 2014 -0700

--
 .../end2end/SkipScanAfterManualSplitIT.java |  27 +++
 .../end2end/TenantSpecificTablesDDLIT.java  | 108 ++-
 .../java/org/apache/phoenix/end2end/ViewIT.java |  90 +-
 phoenix-core/src/main/antlr3/PhoenixSQL.g   |   5 +-
 .../coprocessor/MetaDataEndpointImpl.java   | 129 --
 .../coprocessor/generated/MetaDataProtos.java   | 178 +--
 .../coprocessor/generated/PTableProtos.java |  21 ---
 .../generated/ServerCacheFactoryProtos.java |  21 ---
 .../generated/ServerCachingProtos.java  |  21 ---
 .../apache/phoenix/jdbc/PhoenixStatement.java   |   8 +-
 .../phoenix/parse/DropTableStatement.java   |   9 +-
 .../apache/phoenix/parse/ParseNodeFactory.java  |   4 +-
 .../phoenix/query/ConnectionQueryServices.java  |   2 +-
 .../query/ConnectionQueryServicesImpl.java  |   3 +-
 .../query/ConnectionlessQueryServicesImpl.java  |   2 +-
 .../query/DelegateConnectionQueryServices.java  |   4 +-
 .../apache/phoenix/schema/MetaDataClient.java   |   8 +-
 phoenix-protocol/src/main/MetaDataService.proto |   1 +
 18 files changed, 488 insertions(+), 153 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/a6ea5560/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 6e8ffb7..f7a2448 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
@@ -346,4 +346,31 @@ public class SkipScanAfterManualSplitIT extends 
BaseHBaseManagedTimeIT {
 assertFalse(rs.next());
 }
 
+
+@Test
+public void testMinMaxRangeIntersection() throws Exception {
+Connection conn = DriverManager.getConnection(getUrl());
+
+PreparedStatement stmt = conn.prepareStatement("create table 
splits_test "
++ "(pk1 UNSIGNED_TINYINT NOT NULL, pk2 UNSIGNED_TINYINT NOT NULL, 
kv VARCHAR "
++ "CONSTRAINT pk PRIMARY KEY (pk1, pk2)) SALT_BUCKETS=4 SPLIT ON 
(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
+// Split each salt bucket into multiple regions
+stmt.setBytes(1, new byte[] {0, 1, 1});
+stmt.setBytes(2, new byte[] {0, 2, 1});
+stmt.setBytes(3, new byte[] {0, 3, 1});
+stmt.setBytes(4, new byte[] {1, 1, 1});
+stmt.setBytes(5, new byte[] {1, 2, 1});
+stmt.setBytes(6, new byte[] {1, 3, 1});
+stmt.setBytes(7, new byte[] {2, 1, 1});
+stmt.setBytes(8, new byte[] {2, 2, 1});
+stmt.setBytes(9, new byte[] {2, 3, 1});
+stmt.setBytes(10, new byte[] {3, 1, 1});
+stmt.setBytes(11, new byte[] {3, 2, 1});
+stmt.setBytes(12, new byte[] {3, 3, 1});
+stmt.execute();
+
+// Use a query with a RVC in a non equality expression
+ResultSet rs = conn.createStatement().executeQuery("select count(kv) 
from splits_test where pk1 < 3 and (pk1,PK2) >= (3, 1)");
+assertTrue(rs.next());
+}
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/a6ea5560/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 79aa6c1..591efe1 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
@@ -331,7 +331,7 @@ public class TenantSpecificTablesDDLIT extends 
BaseTenantSpecificTablesIT {
 }
 
 @Test
-public void testDropParentTableWithExistingTenantTable() throws Exception {
+public void testDisallowDropParentTableWithExistingTenantTable() throws 
Exception {
 Propertie

git commit: PHOENIX-1098 Support CASCADE option on DROP TABLE that drops all VIEWs (Jan Fernando)

2014-09-04 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/master 3abb90bb0 -> ec3be54ef


PHOENIX-1098 Support CASCADE option on DROP TABLE that drops all VIEWs (Jan 
Fernando)


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

Branch: refs/heads/master
Commit: ec3be54ef84b0d50004dbe6e0f150a26be66f14b
Parents: 3abb90b
Author: James Taylor 
Authored: Thu Sep 4 00:15:13 2014 -0700
Committer: James Taylor 
Committed: Thu Sep 4 00:15:13 2014 -0700

--
 .../end2end/TenantSpecificTablesDDLIT.java  | 108 -
 .../java/org/apache/phoenix/end2end/ViewIT.java |  90 ++-
 phoenix-core/src/main/antlr3/PhoenixSQL.g   |   5 +-
 .../coprocessor/MetaDataEndpointImpl.java   | 128 ---
 .../coprocessor/generated/MetaDataProtos.java   | 157 +++
 .../apache/phoenix/jdbc/PhoenixStatement.java   |   8 +-
 .../phoenix/parse/DropTableStatement.java   |   9 +-
 .../apache/phoenix/parse/ParseNodeFactory.java  |   4 +-
 .../phoenix/query/ConnectionQueryServices.java  |   2 +-
 .../query/ConnectionQueryServicesImpl.java  |   3 +-
 .../query/ConnectionlessQueryServicesImpl.java  |   2 +-
 .../query/DelegateConnectionQueryServices.java  |   4 +-
 .../apache/phoenix/schema/MetaDataClient.java   |   8 +-
 phoenix-protocol/src/main/MetaDataService.proto |   1 +
 14 files changed, 460 insertions(+), 69 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/ec3be54e/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 79aa6c1..591efe1 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
@@ -331,7 +331,7 @@ public class TenantSpecificTablesDDLIT extends 
BaseTenantSpecificTablesIT {
 }
 
 @Test
-public void testDropParentTableWithExistingTenantTable() throws Exception {
+public void testDisallowDropParentTableWithExistingTenantTable() throws 
Exception {
 Properties props = new Properties();
 props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, 
Long.toString(nextTimestamp()));
 Connection conn = DriverManager.getConnection(getUrl(), props);
@@ -348,6 +348,112 @@ public class TenantSpecificTablesDDLIT extends 
BaseTenantSpecificTablesIT {
 }
 
 @Test
+public void testAllowDropParentTableWithCascadeAndSingleTenantTable() 
throws Exception {
+   long ts = nextTimestamp();
+   Properties props = new Properties();
+   props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, 
Long.toString(ts));
+   Connection conn = DriverManager.getConnection(getUrl(), props);
+   Connection connTenant = null;
+
+   try {
+   // Drop Parent Table 
+   conn.createStatement().executeUpdate("DROP TABLE " + 
PARENT_TABLE_NAME + " CASCADE");
+   conn.close();
+ 
+   props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, 
Long.toString(ts + 10));
+   connTenant = 
DriverManager.getConnection(PHOENIX_JDBC_TENANT_SPECIFIC_URL, props);
+   
+   validateTenantViewIsDropped(conn);  
+   } finally {
+   if (conn != null) {
+   conn.close();
+   }
+   if (connTenant != null) {
+   connTenant.close();
+   }
+   }
+}
+
+
+@Test
+public void 
testAllDropParentTableWithCascadeWithMultipleTenantTablesAndIndexes() throws 
Exception {
+// Create a second tenant table
+   createTestTable(PHOENIX_JDBC_TENANT_SPECIFIC_URL2, TENANT_TABLE_DDL, 
null, nextTimestamp());
+   //TODO Create some tenant specific table indexes
+
+   long ts = nextTimestamp();
+   Properties props = new Properties();
+   props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, 
Long.toString(ts));
+   Connection conn = null;
+   Connection connTenant1 = null;
+   Connection connTenant2 = null;
+
+   try {
+   conn = DriverManager.getConnection(getUrl(), props);
+   DatabaseMetaData meta = conn.getMetaData();
+ResultSet rs = meta.getSuperTables(null, null, 
Str

git commit: PHOENIX-1098 Support CASCADE option on DROP TABLE that drops all VIEWs (Jan Fernando)

2014-09-04 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/3.0 be6465a89 -> 3af2450d3


PHOENIX-1098 Support CASCADE option on DROP TABLE that drops all VIEWs (Jan 
Fernando)


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

Branch: refs/heads/3.0
Commit: 3af2450d31ec53dbc84fcf3ad8208836acb1bba1
Parents: be6465a
Author: James Taylor 
Authored: Thu Sep 4 00:18:14 2014 -0700
Committer: James Taylor 
Committed: Thu Sep 4 00:18:14 2014 -0700

--
 .../end2end/TenantSpecificTablesDDLIT.java  | 108 ++-
 .../java/org/apache/phoenix/end2end/ViewIT.java |  90 -
 phoenix-core/src/main/antlr3/PhoenixSQL.g   |   5 +-
 .../coprocessor/MetaDataEndpointImpl.java   | 135 ---
 .../phoenix/coprocessor/MetaDataProtocol.java   |  11 +-
 .../apache/phoenix/jdbc/PhoenixStatement.java   |   8 +-
 .../phoenix/parse/DropTableStatement.java   |   9 +-
 .../apache/phoenix/parse/ParseNodeFactory.java  |   4 +-
 .../phoenix/query/ConnectionQueryServices.java  |   2 +-
 .../query/ConnectionQueryServicesImpl.java  |   4 +-
 .../query/ConnectionlessQueryServicesImpl.java  |   2 +-
 .../query/DelegateConnectionQueryServices.java  |   4 +-
 .../apache/phoenix/schema/MetaDataClient.java   |   8 +-
 13 files changed, 347 insertions(+), 43 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/3af2450d/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 79aa6c1..591efe1 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
@@ -331,7 +331,7 @@ public class TenantSpecificTablesDDLIT extends 
BaseTenantSpecificTablesIT {
 }
 
 @Test
-public void testDropParentTableWithExistingTenantTable() throws Exception {
+public void testDisallowDropParentTableWithExistingTenantTable() throws 
Exception {
 Properties props = new Properties();
 props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, 
Long.toString(nextTimestamp()));
 Connection conn = DriverManager.getConnection(getUrl(), props);
@@ -348,6 +348,112 @@ public class TenantSpecificTablesDDLIT extends 
BaseTenantSpecificTablesIT {
 }
 
 @Test
+public void testAllowDropParentTableWithCascadeAndSingleTenantTable() 
throws Exception {
+   long ts = nextTimestamp();
+   Properties props = new Properties();
+   props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, 
Long.toString(ts));
+   Connection conn = DriverManager.getConnection(getUrl(), props);
+   Connection connTenant = null;
+
+   try {
+   // Drop Parent Table 
+   conn.createStatement().executeUpdate("DROP TABLE " + 
PARENT_TABLE_NAME + " CASCADE");
+   conn.close();
+ 
+   props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, 
Long.toString(ts + 10));
+   connTenant = 
DriverManager.getConnection(PHOENIX_JDBC_TENANT_SPECIFIC_URL, props);
+   
+   validateTenantViewIsDropped(conn);  
+   } finally {
+   if (conn != null) {
+   conn.close();
+   }
+   if (connTenant != null) {
+   connTenant.close();
+   }
+   }
+}
+
+
+@Test
+public void 
testAllDropParentTableWithCascadeWithMultipleTenantTablesAndIndexes() throws 
Exception {
+// Create a second tenant table
+   createTestTable(PHOENIX_JDBC_TENANT_SPECIFIC_URL2, TENANT_TABLE_DDL, 
null, nextTimestamp());
+   //TODO Create some tenant specific table indexes
+
+   long ts = nextTimestamp();
+   Properties props = new Properties();
+   props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, 
Long.toString(ts));
+   Connection conn = null;
+   Connection connTenant1 = null;
+   Connection connTenant2 = null;
+
+   try {
+   conn = DriverManager.getConnection(getUrl(), props);
+   DatabaseMetaData meta = conn.getMetaData();
+ResultSet rs = meta.getSuperTables(null, null, 
StringUtil.escapeLike(TENANT_TABLE_NAME) + "%");
+assertTrue(rs

Apache-Phoenix | 4.0 | Hadoop1 | Build Successful

2014-09-04 Thread Apache Jenkins Server
4.0 branch build status Successful

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

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

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

Changes
[jtaylor] PHOENIX-1098 Support CASCADE option on DROP TABLE that drops all VIEWs (Jan Fernando)



Apache-Phoenix | Master | Hadoop1 | Build Successful

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

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

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

Changes
[jtaylor] PHOENIX-1098 Support CASCADE option on DROP TABLE that drops all VIEWs (Jan Fernando)



Apache-Phoenix | 3.0 | Hadoop1 | Build Successful

2014-09-04 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-1098 Support CASCADE option on DROP TABLE that drops all VIEWs (Jan Fernando)



git commit: Set SNAPSHOT version after release

2014-09-04 Thread mujtaba
Repository: phoenix
Updated Branches:
  refs/heads/3.0 3af2450d3 -> 7586bf538


Set SNAPSHOT version after release


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

Branch: refs/heads/3.0
Commit: 7586bf5382a43e183cc42f7e2026a74820b061e6
Parents: 3af2450
Author: Mujtaba 
Authored: Thu Sep 4 09:26:55 2014 -0700
Committer: Mujtaba 
Committed: Thu Sep 4 09:26:55 2014 -0700

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


http://git-wip-us.apache.org/repos/asf/phoenix/blob/7586bf53/phoenix-assembly/pom.xml
--
diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml
index 03491e9..2956d88 100644
--- a/phoenix-assembly/pom.xml
+++ b/phoenix-assembly/pom.xml
@@ -26,7 +26,7 @@
   
 org.apache.phoenix
 phoenix
-3.1.0
+3.2.0-SNAPSHOT
   
   phoenix-assembly
   Phoenix Assembly

http://git-wip-us.apache.org/repos/asf/phoenix/blob/7586bf53/phoenix-core/pom.xml
--
diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml
index fdf268d..ad7b802 100644
--- a/phoenix-core/pom.xml
+++ b/phoenix-core/pom.xml
@@ -4,7 +4,7 @@
   
 org.apache.phoenix
 phoenix
-3.1.0
+3.2.0-SNAPSHOT
   
   phoenix-core
   Phoenix Core

http://git-wip-us.apache.org/repos/asf/phoenix/blob/7586bf53/phoenix-flume/pom.xml
--
diff --git a/phoenix-flume/pom.xml b/phoenix-flume/pom.xml
index 5cdb67f..7d9c48a 100644
--- a/phoenix-flume/pom.xml
+++ b/phoenix-flume/pom.xml
@@ -26,7 +26,7 @@
   
 org.apache.phoenix
 phoenix
-3.1.0
+3.2.0-SNAPSHOT
   
   phoenix-flume
   Phoenix - Flume

http://git-wip-us.apache.org/repos/asf/phoenix/blob/7586bf53/phoenix-hadoop-compat/pom.xml
--
diff --git a/phoenix-hadoop-compat/pom.xml b/phoenix-hadoop-compat/pom.xml
index ca44052..daf8dc7 100644
--- a/phoenix-hadoop-compat/pom.xml
+++ b/phoenix-hadoop-compat/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.phoenix
 phoenix
-3.1.0
+3.2.0-SNAPSHOT
   
   phoenix-hadoop-compat
   Phoenix Hadoop Compatibility

http://git-wip-us.apache.org/repos/asf/phoenix/blob/7586bf53/phoenix-hadoop1-compat/pom.xml
--
diff --git a/phoenix-hadoop1-compat/pom.xml b/phoenix-hadoop1-compat/pom.xml
index 7f2a28e..cff6da1 100644
--- a/phoenix-hadoop1-compat/pom.xml
+++ b/phoenix-hadoop1-compat/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.phoenix
 phoenix
-3.1.0
+3.2.0-SNAPSHOT
   
   phoenix-hadoop1-compat
   Phoenix Hadoop1 Compatibility

http://git-wip-us.apache.org/repos/asf/phoenix/blob/7586bf53/phoenix-hadoop2-compat/pom.xml
--
diff --git a/phoenix-hadoop2-compat/pom.xml b/phoenix-hadoop2-compat/pom.xml
index bf0eb8f..4762987 100644
--- a/phoenix-hadoop2-compat/pom.xml
+++ b/phoenix-hadoop2-compat/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.phoenix
 phoenix
-3.1.0
+3.2.0-SNAPSHOT
   
   phoenix-hadoop2-compat
   Phoenix Hadoop2 Compatibility

http://git-wip-us.apache.org/repos/asf/phoenix/blob/7586bf53/phoenix-pig/pom.xml
--
diff --git a/phoenix-pig/pom.xml b/phoenix-pig/pom.xml
index db1c45e..e3b7a0f 100644
--- a/phoenix-pig/pom.xml
+++ b/phoenix-pig/pom.xml
@@ -26,7 +26,7 @@
   
 org.apache.phoenix
 phoenix
-3.1.0
+3.2.0-SNAPSHOT
   
   phoenix-pig
   Phoenix - Pig

http://git-wip-us.apache.org/repos/asf/phoenix/blob/7586bf53/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 5bf9ee7..7be22ca 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
   4.0.0
   org.apache.phoenix
   phoenix
-  3.1.0
+  3.2.0-SNAPSHOT
   pom
   Apache Phoenix
   A SQL layer over HBase



git commit: Set SNAPSHOT version after release

2014-09-04 Thread mujtaba
Repository: phoenix
Updated Branches:
  refs/heads/4.0 a6ea5560e -> c4ede66fe


Set SNAPSHOT version after release


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

Branch: refs/heads/4.0
Commit: c4ede66fedd51c2984b5cc8ec86fd4e36eb0630f
Parents: a6ea556
Author: Mujtaba 
Authored: Thu Sep 4 09:28:29 2014 -0700
Committer: Mujtaba 
Committed: Thu Sep 4 09:28:29 2014 -0700

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


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c4ede66f/phoenix-assembly/pom.xml
--
diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml
index a34b09c..49cc8a6 100644
--- a/phoenix-assembly/pom.xml
+++ b/phoenix-assembly/pom.xml
@@ -26,7 +26,7 @@
   
 org.apache.phoenix
 phoenix
-4.1.0
+4.2.0-SNAPSHOT
   
   phoenix-assembly
   Phoenix Assembly

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c4ede66f/phoenix-core/pom.xml
--
diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml
index 5e25056..ff3f5d8 100644
--- a/phoenix-core/pom.xml
+++ b/phoenix-core/pom.xml
@@ -4,7 +4,7 @@
   
 org.apache.phoenix
 phoenix
-4.1.0
+4.2.0-SNAPSHOT
   
   phoenix-core
   Phoenix Core

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c4ede66f/phoenix-flume/pom.xml
--
diff --git a/phoenix-flume/pom.xml b/phoenix-flume/pom.xml
index 9149895..2253fc8 100644
--- a/phoenix-flume/pom.xml
+++ b/phoenix-flume/pom.xml
@@ -26,7 +26,7 @@
   
 org.apache.phoenix
 phoenix
-4.1.0
+4.2.0-SNAPSHOT
   
   phoenix-flume
   Phoenix - Flume

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c4ede66f/phoenix-hadoop-compat/pom.xml
--
diff --git a/phoenix-hadoop-compat/pom.xml b/phoenix-hadoop-compat/pom.xml
index 7ec49f0..8f5a283 100644
--- a/phoenix-hadoop-compat/pom.xml
+++ b/phoenix-hadoop-compat/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.phoenix
 phoenix
-4.1.0
+4.2.0-SNAPSHOT
   
   phoenix-hadoop-compat
   Phoenix Hadoop Compatibility

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c4ede66f/phoenix-hadoop1-compat/pom.xml
--
diff --git a/phoenix-hadoop1-compat/pom.xml b/phoenix-hadoop1-compat/pom.xml
index 8d20b11..1f82cc3 100644
--- a/phoenix-hadoop1-compat/pom.xml
+++ b/phoenix-hadoop1-compat/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.phoenix
 phoenix
-4.1.0
+4.2.0-SNAPSHOT
   
   phoenix-hadoop1-compat
   Phoenix Hadoop1 Compatibility

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c4ede66f/phoenix-hadoop2-compat/pom.xml
--
diff --git a/phoenix-hadoop2-compat/pom.xml b/phoenix-hadoop2-compat/pom.xml
index daa538a..a5fc33d 100644
--- a/phoenix-hadoop2-compat/pom.xml
+++ b/phoenix-hadoop2-compat/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.phoenix
 phoenix
-4.1.0
+4.2.0-SNAPSHOT
   
   phoenix-hadoop2-compat
   Phoenix Hadoop2 Compatibility

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c4ede66f/phoenix-pig/pom.xml
--
diff --git a/phoenix-pig/pom.xml b/phoenix-pig/pom.xml
index e9b039e..41b68a8 100644
--- a/phoenix-pig/pom.xml
+++ b/phoenix-pig/pom.xml
@@ -26,7 +26,7 @@
   
 org.apache.phoenix
 phoenix
-4.1.0
+4.2.0-SNAPSHOT
   
   phoenix-pig
   Phoenix - Pig

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c4ede66f/pom.xml
--
diff --git a/pom.xml b/pom.xml
index 66d23ac..42184d4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
   4.0.0
   org.apache.phoenix
   phoenix
-  4.1.0
+  4.2.0-SNAPSHOT
   pom
   Apache Phoenix
   A SQL layer over HBase



svn commit: r1622512 - in /phoenix/site: publish/ publish/language/ source/src/site/markdown/

2014-09-04 Thread mujtaba
Author: mujtaba
Date: Thu Sep  4 16:37:36 2014
New Revision: 1622512

URL: http://svn.apache.org/r1622512
Log:
Update release doc

Modified:
phoenix/site/publish/Phoenix-in-15-minutes-or-less.html
phoenix/site/publish/array_type.html
phoenix/site/publish/building.html
phoenix/site/publish/building_website.html
phoenix/site/publish/bulk_dataload.html
phoenix/site/publish/contributing.html
phoenix/site/publish/download.html
phoenix/site/publish/dynamic_columns.html
phoenix/site/publish/faq.html
phoenix/site/publish/flume.html
phoenix/site/publish/index.html
phoenix/site/publish/issues.html
phoenix/site/publish/joins.html
phoenix/site/publish/language/datatypes.html
phoenix/site/publish/language/functions.html
phoenix/site/publish/language/index.html
phoenix/site/publish/mailing_list.html
phoenix/site/publish/multi-tenancy.html
phoenix/site/publish/paged.html
phoenix/site/publish/performance.html
phoenix/site/publish/phoenix_on_emr.html
phoenix/site/publish/pig_integration.html
phoenix/site/publish/recent.html
phoenix/site/publish/release.html
phoenix/site/publish/resources.html
phoenix/site/publish/roadmap.html
phoenix/site/publish/salted.html
phoenix/site/publish/secondary_indexing.html
phoenix/site/publish/sequences.html
phoenix/site/publish/skip_scan.html
phoenix/site/publish/source.html
phoenix/site/publish/team.html
phoenix/site/publish/tracing.html
phoenix/site/publish/tuning.html
phoenix/site/publish/upgrade_from_2_2.html
phoenix/site/publish/views.html
phoenix/site/source/src/site/markdown/release.md

Modified: phoenix/site/publish/Phoenix-in-15-minutes-or-less.html
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/Phoenix-in-15-minutes-or-less.html?rev=1622512&r1=1622511&r2=1622512&view=diff
==
--- phoenix/site/publish/Phoenix-in-15-minutes-or-less.html (original)
+++ phoenix/site/publish/Phoenix-in-15-minutes-or-less.html Thu Sep  4 16:37:36 
2014
@@ -1,7 +1,7 @@
 
 
 
 

Modified: phoenix/site/publish/array_type.html
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/array_type.html?rev=1622512&r1=1622511&r2=1622512&view=diff
==
--- phoenix/site/publish/array_type.html (original)
+++ phoenix/site/publish/array_type.html Thu Sep  4 16:37:36 2014
@@ -1,7 +1,7 @@
 
 
 
 

Modified: phoenix/site/publish/building.html
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/building.html?rev=1622512&r1=1622511&r2=1622512&view=diff
==
--- phoenix/site/publish/building.html (original)
+++ phoenix/site/publish/building.html Thu Sep  4 16:37:36 2014
@@ -1,7 +1,7 @@
 
 
 
 

Modified: phoenix/site/publish/building_website.html
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/building_website.html?rev=1622512&r1=1622511&r2=1622512&view=diff
==
--- phoenix/site/publish/building_website.html (original)
+++ phoenix/site/publish/building_website.html Thu Sep  4 16:37:36 2014
@@ -1,7 +1,7 @@
 
 
 
 

Modified: phoenix/site/publish/bulk_dataload.html
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/bulk_dataload.html?rev=1622512&r1=1622511&r2=1622512&view=diff
==
--- phoenix/site/publish/bulk_dataload.html (original)
+++ phoenix/site/publish/bulk_dataload.html Thu Sep  4 16:37:36 2014
@@ -1,7 +1,7 @@
 
 
 
 

Modified: phoenix/site/publish/contributing.html
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/contributing.html?rev=1622512&r1=1622511&r2=1622512&view=diff
==
--- phoenix/site/publish/contributing.html (original)
+++ phoenix/site/publish/contributing.html Thu Sep  4 16:37:36 2014
@@ -1,7 +1,7 @@
 
 
 
 

Modified: phoenix/site/publish/download.html
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/download.html?rev=1622512&r1=1622511&r2=1622512&view=diff
==
--- phoenix/site/publish/download.html (original)
+++ phoenix/site/publish/download.html Thu Sep  4 16:37:36 2014
@@ -1,7 +1,7 @@
 
 
 
 

Modified: phoenix/site/publish/dynamic_columns.html
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/dynamic_columns.html?rev=1622512&r1=1622511&r2=1622512&view=diff
==
--- phoenix/site/publish/dynamic_columns.html (original)
+++ phoenix/site/publish/dynamic_columns.html Thu Sep  4 16:37:36 2014
@@ -1,7 +1,7 @@
 
 
 
 

Modified: phoenix/site/publish/faq.html
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/faq.html?rev=1622

git commit: PHOENIX-1234 QueryUtil doesn't parse zk hosts correctly

2014-09-04 Thread jyates
Repository: phoenix
Updated Branches:
  refs/heads/master ec3be54ef -> 4a1ec7ec4


PHOENIX-1234 QueryUtil doesn't parse zk hosts correctly


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

Branch: refs/heads/master
Commit: 4a1ec7ec44248315023db41cf4c941a366a1d294
Parents: ec3be54
Author: Jesse Yates 
Authored: Thu Sep 4 09:44:10 2014 -0700
Committer: Jesse Yates 
Committed: Thu Sep 4 09:44:10 2014 -0700

--
 .../java/org/apache/phoenix/util/QueryUtil.java | 55 +++-
 .../java/org/apache/phoenix/query/BaseTest.java | 16 +++---
 .../org/apache/phoenix/util/QueryUtilTest.java  | 55 +++-
 3 files changed, 102 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/4a1ec7ec/phoenix-core/src/main/java/org/apache/phoenix/util/QueryUtil.java
--
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/util/QueryUtil.java 
b/phoenix-core/src/main/java/org/apache/phoenix/util/QueryUtil.java
index 6a45666..88ffd8e 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/util/QueryUtil.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/util/QueryUtil.java
@@ -25,6 +25,7 @@ import java.sql.DatabaseMetaData;
 import java.sql.DriverManager;
 import java.sql.ResultSet;
 import java.sql.SQLException;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Properties;
 
@@ -35,6 +36,7 @@ import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.util.Addressing;
+import org.apache.hadoop.hbase.util.Pair;
 import org.apache.hadoop.hbase.zookeeper.ZKConfig;
 import org.apache.phoenix.jdbc.PhoenixDriver;
 
@@ -43,6 +45,7 @@ import com.google.common.base.Joiner;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Lists;
+import org.apache.phoenix.query.QueryServices;
 
 public final class QueryUtil {
 
@@ -189,26 +192,50 @@ public final class QueryUtil {
 }
 
 public static Connection getConnection(Properties props, Configuration 
conf)
+throws ClassNotFoundException,
+SQLException {
+String url = getConnectionUrl(props, conf);
+LOG.info("Creating connection with the jdbc url:" + url);
+return DriverManager.getConnection(url, props);
+}
+
+public static String getConnectionUrl(Properties props, Configuration conf)
 throws ClassNotFoundException, SQLException {
 // make sure we load the phoenix driver
 Class.forName(PhoenixDriver.class.getName());
 
 // read the hbase properties from the configuration
 String server = ZKConfig.getZKQuorumServersString(conf);
-int port;
-// if it has a port, don't try to add one
-try {
-server = Addressing.parseHostname(server);
-port = Addressing.parsePort(server);
-} catch (IllegalArgumentException e) {
-// port isn't set
-port =
-conf.getInt(HConstants.ZOOKEEPER_CLIENT_PORT,
-HConstants.DEFAULT_ZOOKEPER_CLIENT_PORT);
+// could be a comma-separated list
+String[] rawServers = server.split(",");
+List servers = new ArrayList(rawServers.length);
+boolean first = true;
+int port = -1;
+for (String serverPort : rawServers) {
+try {
+server = Addressing.parseHostname(serverPort);
+int specifiedPort = Addressing.parsePort(serverPort);
+// there was a previously specified port and it doesn't match 
this server
+if (port > 0 && specifiedPort != port) {
+throw new IllegalStateException("Phoenix/HBase only 
supports connecting to a " +
+"single zookeeper client port. Specify servers 
only as host names in " +
+"HBase configuration");
+}
+// set the port to the specified port
+port = specifiedPort;
+servers.add(server);
+} catch (IllegalArgumentException e) {
+}
+}
+// port wasn't set, shouldn't ever happen from HBase, but just in case
+if (port == -1) {
+port = conf.getInt(QueryServices.ZOOKEEPER_PORT_ATTRIB, -1);
+if (port == -1) {
+throw new RuntimeException("Client zk port was not set!");
+}
 }
+server = Joiner.on(',').joi

git commit: PHOENIX-1234 QueryUtil doesn't parse zk hosts correctly

2014-09-04 Thread jyates
Repository: phoenix
Updated Branches:
  refs/heads/4.0 c4ede66fe -> a9a128bfa


PHOENIX-1234 QueryUtil doesn't parse zk hosts correctly


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

Branch: refs/heads/4.0
Commit: a9a128bfa82f0f978f2260a119a4e88ff1db6330
Parents: c4ede66
Author: Jesse Yates 
Authored: Thu Sep 4 09:44:10 2014 -0700
Committer: Jesse Yates 
Committed: Thu Sep 4 09:44:46 2014 -0700

--
 .../java/org/apache/phoenix/util/QueryUtil.java | 55 +++-
 .../java/org/apache/phoenix/query/BaseTest.java | 16 +++---
 .../org/apache/phoenix/util/QueryUtilTest.java  | 55 +++-
 3 files changed, 102 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/a9a128bf/phoenix-core/src/main/java/org/apache/phoenix/util/QueryUtil.java
--
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/util/QueryUtil.java 
b/phoenix-core/src/main/java/org/apache/phoenix/util/QueryUtil.java
index da6b17a..7f5d4c6 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/util/QueryUtil.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/util/QueryUtil.java
@@ -25,6 +25,7 @@ import java.sql.DatabaseMetaData;
 import java.sql.DriverManager;
 import java.sql.ResultSet;
 import java.sql.SQLException;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Properties;
 
@@ -35,6 +36,7 @@ import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.util.Addressing;
+import org.apache.hadoop.hbase.util.Pair;
 import org.apache.hadoop.hbase.zookeeper.ZKConfig;
 import org.apache.phoenix.jdbc.PhoenixDriver;
 
@@ -43,6 +45,7 @@ import com.google.common.base.Joiner;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Lists;
+import org.apache.phoenix.query.QueryServices;
 
 public final class QueryUtil {
 
@@ -190,26 +193,50 @@ public final class QueryUtil {
 }
 
 public static Connection getConnection(Properties props, Configuration 
conf)
+throws ClassNotFoundException,
+SQLException {
+String url = getConnectionUrl(props, conf);
+LOG.info("Creating connection with the jdbc url:" + url);
+return DriverManager.getConnection(url, props);
+}
+
+public static String getConnectionUrl(Properties props, Configuration conf)
 throws ClassNotFoundException, SQLException {
 // make sure we load the phoenix driver
 Class.forName(PhoenixDriver.class.getName());
 
 // read the hbase properties from the configuration
 String server = ZKConfig.getZKQuorumServersString(conf);
-int port;
-// if it has a port, don't try to add one
-try {
-server = Addressing.parseHostname(server);
-port = Addressing.parsePort(server);
-} catch (IllegalArgumentException e) {
-// port isn't set
-port =
-conf.getInt(HConstants.ZOOKEEPER_CLIENT_PORT,
-HConstants.DEFAULT_ZOOKEPER_CLIENT_PORT);
+// could be a comma-separated list
+String[] rawServers = server.split(",");
+List servers = new ArrayList(rawServers.length);
+boolean first = true;
+int port = -1;
+for (String serverPort : rawServers) {
+try {
+server = Addressing.parseHostname(serverPort);
+int specifiedPort = Addressing.parsePort(serverPort);
+// there was a previously specified port and it doesn't match 
this server
+if (port > 0 && specifiedPort != port) {
+throw new IllegalStateException("Phoenix/HBase only 
supports connecting to a " +
+"single zookeeper client port. Specify servers 
only as host names in " +
+"HBase configuration");
+}
+// set the port to the specified port
+port = specifiedPort;
+servers.add(server);
+} catch (IllegalArgumentException e) {
+}
+}
+// port wasn't set, shouldn't ever happen from HBase, but just in case
+if (port == -1) {
+port = conf.getInt(QueryServices.ZOOKEEPER_PORT_ATTRIB, -1);
+if (port == -1) {
+throw new RuntimeException("Client zk port was not set!");
+}
 }
+server = Joiner.on(',').join(serv

Apache-Phoenix | 4.0 | Hadoop1 | Build Successful

2014-09-04 Thread Apache Jenkins Server
4.0 branch build status Successful

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

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

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

Changes
[mujtaba] Set SNAPSHOT version after release



Apache-Phoenix | 3.0 | Hadoop1 | Build Successful

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

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

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

Changes
[mujtaba] Set SNAPSHOT version after release



Jenkins build became unstable: Phoenix | Master | Hadoop1 #357

2014-09-04 Thread Apache Jenkins Server
See 



Apache-Phoenix | 4.0 | Hadoop1 | Build Successful

2014-09-04 Thread Apache Jenkins Server
4.0 branch build status Successful

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

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

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

Changes
[jyates] PHOENIX-1234 QueryUtil doesn't parse zk hosts correctly