Apache-Phoenix | 4.0 | Build Successful

2015-02-17 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/lastSuccessfulBuild/artifact/

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

Changes
[jtaylor] PHOENIX-1669 Views are not always properly updated with physical table indexes when cached



Build times for last couple of runsLatest build time is the right most | Legend blue: normal, red: test failure, gray: timeout


phoenix git commit: PHOENIX-1669 Views are not always properly updated with physical table indexes when cached

2015-02-17 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.0 0accd047b - 2aa8a862f


PHOENIX-1669 Views are not always properly updated with physical table indexes 
when cached


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

Branch: refs/heads/4.0
Commit: 2aa8a862f3f5a54d8c2b8cf57c24512c15b9eb90
Parents: 0accd04
Author: James Taylor jtay...@salesforce.com
Authored: Tue Feb 17 19:37:02 2015 -0800
Committer: James Taylor jtay...@salesforce.com
Committed: Tue Feb 17 19:38:23 2015 -0800

--
 .../end2end/index/IndexExpressionIT.java|  3 --
 .../apache/phoenix/schema/MetaDataClient.java   | 39 
 .../org/apache/phoenix/schema/PTableImpl.java   |  2 +-
 3 files changed, 24 insertions(+), 20 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/2aa8a862/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexExpressionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexExpressionIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexExpressionIT.java
index 5c51bda..1e3733b 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexExpressionIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexExpressionIT.java
@@ -1220,8 +1220,6 @@ public class IndexExpressionIT extends 
BaseHBaseManagedTimeIT {
 assertEquals(1, rs.getLong(1));
 assertFalse(rs.next());
 
-conn.createStatement().execute(CREATE INDEX vi1 on v(k2));
-
 //i2 should be used since it contains s3||'_'||s4 i
 String query = SELECT s2||'_'||s3 FROM v WHERE k2=1 AND 
(s2||'_'||s3)='abc_cab';
 rs = conn.createStatement(  ).executeQuery(EXPLAIN  + query);
@@ -1235,7 +1233,6 @@ public class IndexExpressionIT extends 
BaseHBaseManagedTimeIT {
 assertFalse(rs.next());
 
 conn.createStatement().execute(ALTER VIEW v DROP COLUMN s4);
-conn.createStatement().execute(CREATE INDEX vi2 on v(k2));
 //i2 cannot be used since s4 has been dropped from the view, so i1 
will be used 
 rs = conn.createStatement().executeQuery(EXPLAIN  + query);
 queryPlan = QueryUtil.getExplainPlan(rs);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/2aa8a862/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
index 64e62f5..831616b 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
@@ -360,8 +360,7 @@ public class MetaDataClient {
 // Otherwise, a tenant would be required to create a VIEW first
 // which is not really necessary unless you want to filter or 
add
 // columns
-addIndexesFromPhysicalTable(result);
-connection.addTable(result.getTable());
+addTableToCache(result);
 return result;
 } else {
 // if (result.getMutationCode() == 
MutationCode.NEWER_TABLE_FOUND) {
@@ -369,16 +368,20 @@ public class MetaDataClient {
 // Since we disallow creation or modification of a table 
earlier than the latest
 // timestamp, we can handle this such that we don't ask the
 // server again.
-// If table was not found at the current time stamp and we 
have one cached, remove it.
-// Otherwise, we're up to date, so there's nothing to do.
 if (table != null) {
+// Ensures that table in result is set to table found in 
our cache.
 result.setTable(table);
 if (code == MutationCode.TABLE_ALREADY_EXISTS) {
+// Although this table is up-to-date, the parent table 
may not be.
+// In this case, we update the parent table which may 
in turn pull
+// in indexes to add to this table.
 if (addIndexesFromPhysicalTable(result)) {
 connection.addTable(result.getTable());
 }
 return result;
 }
+// If table was not found at the current time stamp and we 
have one cached, remove it.
+ 

Apache-Phoenix | Master | Build Successful

2015-02-17 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] PHOENIX-1669 Views are not always properly updated with physical table indexes when cached



Build times for last couple of runsLatest build time is the right most | Legend blue: normal, red: test failure, gray: timeout


phoenix git commit: PHOENIX-1669 Views are not always properly updated with physical table indexes when cached

2015-02-17 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/3.0 3a763e2f9 - 7bcad4e43


PHOENIX-1669 Views are not always properly updated with physical table indexes 
when cached

Conflicts:

phoenix-core/src/it/java/org/apache/phoenix/end2end/index/IndexExpressionIT.java
phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
phoenix-core/src/main/java/org/apache/phoenix/schema/PTableImpl.java


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

Branch: refs/heads/3.0
Commit: 7bcad4e43086a16fbbc646e72a6304b485bd5cec
Parents: 3a763e2
Author: James Taylor jtay...@salesforce.com
Authored: Tue Feb 17 19:37:02 2015 -0800
Committer: James Taylor jtay...@salesforce.com
Committed: Tue Feb 17 19:47:01 2015 -0800

--
 .../apache/phoenix/schema/MetaDataClient.java   | 42 
 .../org/apache/phoenix/schema/PTableImpl.java   |  2 +-
 2 files changed, 27 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/7bcad4e4/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
index 4362087..292a6a8 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
@@ -349,8 +349,7 @@ public class MetaDataClient {
 // Otherwise, a tenant would be required to create a VIEW first
 // which is not really necessary unless you want to filter or 
add
 // columns
-addIndexesFromPhysicalTable(result);
-connection.addTable(result.getTable());
+addTableToCache(result);
 return result;
 } else {
 // if (result.getMutationCode() == 
MutationCode.NEWER_TABLE_FOUND) {
@@ -358,16 +357,20 @@ public class MetaDataClient {
 // Since we disallow creation or modification of a table 
earlier than the latest
 // timestamp, we can handle this such that we don't ask the
 // server again.
-// If table was not found at the current time stamp and we 
have one cached, remove it.
-// Otherwise, we're up to date, so there's nothing to do.
 if (table != null) {
+// Ensures that table in result is set to table found in 
our cache.
 result.setTable(table);
 if (code == MutationCode.TABLE_ALREADY_EXISTS) {
+// Although this table is up-to-date, the parent table 
may not be.
+// In this case, we update the parent table which may 
in turn pull
+// in indexes to add to this table.
 if (addIndexesFromPhysicalTable(result)) {
 connection.addTable(result.getTable());
 }
 return result;
 }
+// If table was not found at the current time stamp and we 
have one cached, remove it.
+// Otherwise, we're up to date, so there's nothing to do.
 if (code == MutationCode.TABLE_NOT_FOUND  tryCount + 1 
== maxTryCount) {
 connection.removeTable(tenantId, fullTableName, 
table.getParentName() == null ? null : table.getParentName().getString(), 
table.getTimeStamp());
 }
@@ -1449,7 +1452,7 @@ public class MetaDataClient {
 MutationCode code = result.getMutationCode();
 switch(code) {
 case TABLE_ALREADY_EXISTS:
-connection.addTable(result.getTable());
+addTableToCache(result);
 if (!statement.ifNotExists()) {
 throw new TableAlreadyExistsException(schemaName, 
tableName, result.getTable());
 }
@@ -1464,7 +1467,7 @@ public class MetaDataClient {
 throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.CANNOT_MUTATE_TABLE)
 
.setSchemaName(schemaName).setTableName(tableName).build().buildException();
 case CONCURRENT_TABLE_MUTATION:
-connection.addTable(result.getTable());
+addTableToCache(result);
 throw new ConcurrentTableMutationException(schemaName, 
tableName);
 default:
 PName 

Apache-Phoenix | 3.0 | Hadoop1 | Build Successful

2015-02-17 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-1669 Views are not always properly updated with physical table indexes when cached



Build times for last couple of runsLatest build time is the right most | Legend blue: normal, red: test failure, gray: timeout


phoenix git commit: PHOENIX-1639 Enhance function/expression index tests

2015-02-17 Thread tdsilva
Repository: phoenix
Updated Branches:
  refs/heads/master b8c0559c0 - 2e5a63089


PHOENIX-1639 Enhance function/expression index tests


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

Branch: refs/heads/master
Commit: 2e5a63089f98c21e8556fae0ec80988079e3ca55
Parents: b8c0559
Author: Thomas D'Silva twdsi...@gmail.com
Authored: Tue Feb 17 12:32:55 2015 -0800
Committer: Thomas D'Silva twdsi...@gmail.com
Committed: Tue Feb 17 12:32:55 2015 -0800

--
 .../apache/phoenix/end2end/AlterTableIT.java|  58 +-
 .../org/apache/phoenix/end2end/BaseViewIT.java  |   4 +-
 .../java/org/apache/phoenix/end2end/ViewIT.java |   5 +
 .../end2end/index/IndexExpressionIT.java| 714 +++
 .../coprocessor/MetaDataEndpointImpl.java   |   5 +-
 .../phoenix/exception/SQLExceptionCode.java |   5 +-
 .../apache/phoenix/index/IndexMaintainer.java   |   4 +-
 .../apache/phoenix/schema/MetaDataClient.java   |  33 +-
 .../phoenix/compile/QueryCompilerTest.java  |  72 ++
 9 files changed, 715 insertions(+), 185 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/2e5a6308/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 7f5649b..59698d6 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
@@ -308,7 +308,6 @@ public class AlterTableIT extends 
BaseOwnClusterHBaseManagedTimeIT {
 
 @Test
 public void testDropCoveredColumn() throws Exception {
-String query;
 ResultSet rs;
 PreparedStatement stmt;
 
@@ -320,19 +319,21 @@ public class AlterTableIT extends 
BaseOwnClusterHBaseManagedTimeIT {
 conn.createStatement().execute(
   CREATE TABLE  + DATA_TABLE_FULL_NAME
   +  (k VARCHAR NOT NULL PRIMARY KEY, v1 VARCHAR, v2 VARCHAR, v3 
VARCHAR));
-query = SELECT * FROM  + DATA_TABLE_FULL_NAME;
-rs = conn.createStatement().executeQuery(query);
+String dataTableQuery = SELECT * FROM  + DATA_TABLE_FULL_NAME;
+rs = conn.createStatement().executeQuery(dataTableQuery);
 assertFalse(rs.next());
 
 conn.createStatement().execute(
   CREATE INDEX  + INDEX_TABLE_NAME +  ON  + DATA_TABLE_FULL_NAME + 
 (v1) include (v2, v3));
 conn.createStatement().execute(
 CREATE LOCAL INDEX  + LOCAL_INDEX_TABLE_NAME +  ON  + 
DATA_TABLE_FULL_NAME +  (v1) include (v2, v3));
-query = SELECT * FROM  + INDEX_TABLE_FULL_NAME;
-rs = conn.createStatement().executeQuery(query);
+rs = conn.createStatement().executeQuery(dataTableQuery);
 assertFalse(rs.next());
-query = SELECT * FROM  + LOCAL_INDEX_TABLE_FULL_NAME;
-rs = conn.createStatement().executeQuery(query);
+String indexTableQuery = SELECT * FROM  + INDEX_TABLE_NAME;
+rs = conn.createStatement().executeQuery(indexTableQuery);
+assertFalse(rs.next());
+String localIndexTableQuery = SELECT * FROM  + 
LOCAL_INDEX_TABLE_FULL_NAME;
+rs = conn.createStatement().executeQuery(localIndexTableQuery);
 assertFalse(rs.next());
 
 // load some data into the table
@@ -346,16 +347,31 @@ public class AlterTableIT extends 
BaseOwnClusterHBaseManagedTimeIT {
 
 assertIndexExists(conn,true);
 conn.createStatement().execute(ALTER TABLE  + DATA_TABLE_FULL_NAME + 
 DROP COLUMN v2);
-// TODO: verify meta data that we get back to confirm our column was 
dropped
 assertIndexExists(conn,true);
 
-query = SELECT * FROM  + DATA_TABLE_FULL_NAME;
-rs = conn.createStatement().executeQuery(query);
+// verify data table rows
+rs = conn.createStatement().executeQuery(dataTableQuery);
 assertTrue(rs.next());
 assertEquals(a,rs.getString(1));
 assertEquals(x,rs.getString(2));
 assertEquals(j,rs.getString(3));
 assertFalse(rs.next());
+
+// verify index table rows
+rs = conn.createStatement().executeQuery(indexTableQuery);
+assertTrue(rs.next());
+assertEquals(x,rs.getString(1));
+assertEquals(a,rs.getString(2));
+assertEquals(j,rs.getString(3));
+assertFalse(rs.next());
+
+// verify local index table rows
+rs = conn.createStatement().executeQuery(localIndexTableQuery);
+

phoenix git commit: PHOENIX-1639 Enhance function/expression index tests

2015-02-17 Thread tdsilva
Repository: phoenix
Updated Branches:
  refs/heads/4.0 8d3f59578 - 0accd047b


PHOENIX-1639 Enhance function/expression index tests


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

Branch: refs/heads/4.0
Commit: 0accd047bebd89f115b9463a0ee9af95731e3f2a
Parents: 8d3f595
Author: Thomas D'Silva twdsi...@gmail.com
Authored: Tue Feb 17 12:35:53 2015 -0800
Committer: Thomas D'Silva twdsi...@gmail.com
Committed: Tue Feb 17 12:35:53 2015 -0800

--
 .../apache/phoenix/end2end/AlterTableIT.java|  58 +-
 .../org/apache/phoenix/end2end/BaseViewIT.java  |   4 +-
 .../java/org/apache/phoenix/end2end/ViewIT.java |   5 +
 .../end2end/index/IndexExpressionIT.java| 714 +++
 .../coprocessor/MetaDataEndpointImpl.java   |   5 +-
 .../phoenix/exception/SQLExceptionCode.java |   5 +-
 .../apache/phoenix/index/IndexMaintainer.java   |   4 +-
 .../apache/phoenix/schema/MetaDataClient.java   |  33 +-
 .../phoenix/compile/QueryCompilerTest.java  |  72 ++
 9 files changed, 715 insertions(+), 185 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/0accd047/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 7f5649b..59698d6 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
@@ -308,7 +308,6 @@ public class AlterTableIT extends 
BaseOwnClusterHBaseManagedTimeIT {
 
 @Test
 public void testDropCoveredColumn() throws Exception {
-String query;
 ResultSet rs;
 PreparedStatement stmt;
 
@@ -320,19 +319,21 @@ public class AlterTableIT extends 
BaseOwnClusterHBaseManagedTimeIT {
 conn.createStatement().execute(
   CREATE TABLE  + DATA_TABLE_FULL_NAME
   +  (k VARCHAR NOT NULL PRIMARY KEY, v1 VARCHAR, v2 VARCHAR, v3 
VARCHAR));
-query = SELECT * FROM  + DATA_TABLE_FULL_NAME;
-rs = conn.createStatement().executeQuery(query);
+String dataTableQuery = SELECT * FROM  + DATA_TABLE_FULL_NAME;
+rs = conn.createStatement().executeQuery(dataTableQuery);
 assertFalse(rs.next());
 
 conn.createStatement().execute(
   CREATE INDEX  + INDEX_TABLE_NAME +  ON  + DATA_TABLE_FULL_NAME + 
 (v1) include (v2, v3));
 conn.createStatement().execute(
 CREATE LOCAL INDEX  + LOCAL_INDEX_TABLE_NAME +  ON  + 
DATA_TABLE_FULL_NAME +  (v1) include (v2, v3));
-query = SELECT * FROM  + INDEX_TABLE_FULL_NAME;
-rs = conn.createStatement().executeQuery(query);
+rs = conn.createStatement().executeQuery(dataTableQuery);
 assertFalse(rs.next());
-query = SELECT * FROM  + LOCAL_INDEX_TABLE_FULL_NAME;
-rs = conn.createStatement().executeQuery(query);
+String indexTableQuery = SELECT * FROM  + INDEX_TABLE_NAME;
+rs = conn.createStatement().executeQuery(indexTableQuery);
+assertFalse(rs.next());
+String localIndexTableQuery = SELECT * FROM  + 
LOCAL_INDEX_TABLE_FULL_NAME;
+rs = conn.createStatement().executeQuery(localIndexTableQuery);
 assertFalse(rs.next());
 
 // load some data into the table
@@ -346,16 +347,31 @@ public class AlterTableIT extends 
BaseOwnClusterHBaseManagedTimeIT {
 
 assertIndexExists(conn,true);
 conn.createStatement().execute(ALTER TABLE  + DATA_TABLE_FULL_NAME + 
 DROP COLUMN v2);
-// TODO: verify meta data that we get back to confirm our column was 
dropped
 assertIndexExists(conn,true);
 
-query = SELECT * FROM  + DATA_TABLE_FULL_NAME;
-rs = conn.createStatement().executeQuery(query);
+// verify data table rows
+rs = conn.createStatement().executeQuery(dataTableQuery);
 assertTrue(rs.next());
 assertEquals(a,rs.getString(1));
 assertEquals(x,rs.getString(2));
 assertEquals(j,rs.getString(3));
 assertFalse(rs.next());
+
+// verify index table rows
+rs = conn.createStatement().executeQuery(indexTableQuery);
+assertTrue(rs.next());
+assertEquals(x,rs.getString(1));
+assertEquals(a,rs.getString(2));
+assertEquals(j,rs.getString(3));
+assertFalse(rs.next());
+
+// verify local index table rows
+rs = conn.createStatement().executeQuery(localIndexTableQuery);
+

Apache-Phoenix | Master | Build Successful

2015-02-17 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
[twdsilva] PHOENIX-1639 Enhance function/_expression_ index tests



Build times for last couple of runsLatest build time is the right most | Legend blue: normal, red: test failure, gray: timeout