[1/3] git commit: PHOENIX-1181 client cache fails to update itself after a table was altered from a diff client

2014-08-20 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/3.0 91e5d3a1e - 5ca432b2d


PHOENIX-1181 client cache fails to update itself after a table was altered from 
a diff client


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

Branch: refs/heads/3.0
Commit: 42465628683aa933805e3810fe1a299167344337
Parents: 7a61571
Author: James Taylor jtay...@salesforce.com
Authored: Tue Aug 19 00:49:22 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Tue Aug 19 02:35:59 2014 -0700

--
 .../apache/phoenix/end2end/AlterTableIT.java|  31 +-
 .../phoenix/compile/CreateIndexCompiler.java|   2 +-
 .../apache/phoenix/compile/DeleteCompiler.java  |  93 --
 .../apache/phoenix/compile/FromCompiler.java|  19 +-
 .../apache/phoenix/compile/UpsertCompiler.java  | 287 +++
 .../apache/phoenix/execute/MutationState.java   |   7 +-
 .../org/apache/phoenix/parse/DMLStatement.java  |  27 ++
 .../apache/phoenix/parse/DeleteStatement.java   |   2 +-
 .../apache/phoenix/parse/UpsertStatement.java   |   2 +-
 .../apache/phoenix/schema/MetaDataClient.java   |   8 +-
 10 files changed, 317 insertions(+), 161 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/42465628/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 2af697b..ecdee66 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
@@ -837,4 +837,33 @@ public class AlterTableIT extends BaseHBaseManagedTimeIT {
 }
 }

- }
+@Test
+public void alterTableFromDifferentClient() throws Exception {
+Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+Connection conn3 = DriverManager.getConnection(getUrl(), props);
+
+// here we insert into the orig schema with one column
+Connection conn1 = DriverManager.getConnection(getUrl(), props);
+conn1.createStatement().execute(create table test_simpletable(id 
VARCHAR PRIMARY KEY, field1 BIGINT));
+PreparedStatement stmtInsert1 = conn1.prepareStatement(upsert into 
test_simpletable (id, field1) values ( ?, ?));
+stmtInsert1.setString(1, key1);
+stmtInsert1.setLong(2, 1L);
+stmtInsert1.execute();
+conn1.commit();
+stmtInsert1.close();
+conn1.close();
+
+// Do the alter through a separate client.
+conn3.createStatement().execute(alter table test_simpletable add 
field2 BIGINT);
+
+//Connection conn1 = DriverManager.getConnection(getUrl(), props);
+PreparedStatement pstmt2 = conn1.prepareStatement(upsert into 
test_simpletable (id, field1, field2) values ( ?, ?, ?));
+pstmt2.setString(1, key2);
+pstmt2.setLong(2, 2L);
+pstmt2.setLong(3, 2L);
+pstmt2.execute();
+conn1.commit();
+pstmt2.close();
+conn1.close();
+}
+}

http://git-wip-us.apache.org/repos/asf/phoenix/blob/42465628/phoenix-core/src/main/java/org/apache/phoenix/compile/CreateIndexCompiler.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/CreateIndexCompiler.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/CreateIndexCompiler.java
index bbd7154..d6595ff 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/CreateIndexCompiler.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/CreateIndexCompiler.java
@@ -42,7 +42,7 @@ public class CreateIndexCompiler {
 
 public MutationPlan compile(final CreateIndexStatement create) throws 
SQLException {
 final PhoenixConnection connection = statement.getConnection();
-final ColumnResolver resolver = 
FromCompiler.getResolverForMutation(create, connection);
+final ColumnResolver resolver = FromCompiler.getResolver(create, 
connection);
 Scan scan = new Scan();
 final StatementContext context = new StatementContext(statement, 
resolver, scan, new SequenceManager(statement));
 ExpressionCompiler expressionCompiler = new 
ExpressionCompiler(context);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/42465628/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
--
diff --git 

[3/3] git commit: PHOENIX-1181 client cache fails to update itself after a table was altered from a diff client

2014-08-20 Thread jamestaylor
PHOENIX-1181 client cache fails to update itself after a table was altered from 
a diff client


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

Branch: refs/heads/3.0
Commit: 5ca432b2dd4b51c8314a5659a10e33eb4b7693bd
Parents: 23fc482
Author: James Taylor jtay...@salesforce.com
Authored: Tue Aug 19 23:34:31 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Tue Aug 19 23:34:31 2014 -0700

--
 .../apache/phoenix/compile/FromCompiler.java|   9 +-
 .../apache/phoenix/compile/UpsertCompiler.java  | 201 ++-
 2 files changed, 103 insertions(+), 107 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/5ca432b2/phoenix-core/src/main/java/org/apache/phoenix/compile/FromCompiler.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/FromCompiler.java 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/FromCompiler.java
index 02d4f99..efc0973 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/compile/FromCompiler.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/FromCompiler.java
@@ -177,19 +177,14 @@ public class FromCompiler {
 
 public static ColumnResolver getResolverForMutation(DMLStatement 
statement, PhoenixConnection connection)
 throws SQLException {
-return getResolverForMutation(statement, connection, false);
-}
-
-public static ColumnResolver getResolverForMutation(DMLStatement 
statement, PhoenixConnection connection, boolean updateCacheImmediately)
-throws SQLException {
 /*
  * We validate the meta data at commit time for mutations, as this 
allows us to do many UPSERT VALUES calls
  * without hitting the server each time to check if the meta data is 
up-to-date.
  */
-SingleTableColumnResolver visitor = new 
SingleTableColumnResolver(connection, statement.getTable(), 
updateCacheImmediately);
+SingleTableColumnResolver visitor = new 
SingleTableColumnResolver(connection, statement.getTable(), false);
 return visitor;
 }
-
+
 private static class SingleTableColumnResolver extends BaseColumnResolver {
private final ListTableRef tableRefs;
private final String alias;

http://git-wip-us.apache.org/repos/asf/phoenix/blob/5ca432b2/phoenix-core/src/main/java/org/apache/phoenix/compile/UpsertCompiler.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/UpsertCompiler.java 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/UpsertCompiler.java
index d625a9d..b8e1a6d 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/compile/UpsertCompiler.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/UpsertCompiler.java
@@ -37,7 +37,6 @@ import org.apache.phoenix.cache.ServerCacheClient.ServerCache;
 import org.apache.phoenix.compile.GroupByCompiler.GroupBy;
 import org.apache.phoenix.compile.OrderByCompiler.OrderBy;
 import org.apache.phoenix.coprocessor.BaseScannerRegionObserver;
-import org.apache.phoenix.coprocessor.MetaDataProtocol.MetaDataMutationResult;
 import org.apache.phoenix.coprocessor.UngroupedAggregateRegionObserver;
 import org.apache.phoenix.exception.SQLExceptionCode;
 import org.apache.phoenix.exception.SQLExceptionInfo;
@@ -48,7 +47,6 @@ import org.apache.phoenix.expression.LiteralExpression;
 import org.apache.phoenix.hbase.index.util.ImmutableBytesPtr;
 import org.apache.phoenix.index.IndexMetaDataCacheClient;
 import org.apache.phoenix.index.PhoenixIndexCodec;
-import org.apache.phoenix.iterate.ParallelIterators.ParallelIteratorFactory;
 import org.apache.phoenix.iterate.ResultIterator;
 import org.apache.phoenix.jdbc.PhoenixConnection;
 import org.apache.phoenix.jdbc.PhoenixResultSet;
@@ -224,28 +222,23 @@ public class UpsertCompiler {
 int[] columnIndexesToBe;
 int nColumnsToSet = 0;
 int[] pkSlotIndexesToBe;
+ListParseNode valueNodes = upsert.getValues();
 ListPColumn targetColumns;
 NamedTableNode tableNode = upsert.getTable();
 String tableName = tableNode.getName().getTableName();
 String schemaName = tableNode.getName().getSchemaName();
-// Retry once if columns are explicitly named, as the meta data may
+QueryPlan queryPlanToBe = null;
+int nValuesToSet;
+boolean sameTable = false;
+boolean runOnServer = false;
+UpsertingParallelIteratorFactory parallelIteratorFactoryToBe = null;
+// Retry once 

[1/2] git commit: PHOENIX-1181 client cache fails to update itself after a table was altered from a diff client

2014-08-20 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.0 522681bae - d1a8f49a8


PHOENIX-1181 client cache fails to update itself after a table was altered from 
a diff client


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

Branch: refs/heads/4.0
Commit: 94040d78ffd246bb10af57d5ccb45070c028f59e
Parents: 522681b
Author: James Taylor jtay...@salesforce.com
Authored: Tue Aug 19 00:49:22 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Tue Aug 19 23:55:30 2014 -0700

--
 .../apache/phoenix/end2end/AlterTableIT.java|  31 +-
 .../phoenix/compile/CreateIndexCompiler.java|   2 +-
 .../apache/phoenix/compile/DeleteCompiler.java  |  93 --
 .../apache/phoenix/compile/FromCompiler.java|  19 +-
 .../apache/phoenix/compile/UpsertCompiler.java  | 287 +++
 .../apache/phoenix/execute/MutationState.java   |   7 +-
 .../org/apache/phoenix/parse/DMLStatement.java  |  27 ++
 .../apache/phoenix/parse/DeleteStatement.java   |   2 +-
 .../apache/phoenix/parse/UpsertStatement.java   |   2 +-
 .../apache/phoenix/schema/MetaDataClient.java   |   8 +-
 10 files changed, 317 insertions(+), 161 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/94040d78/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 1b52ede..9e6911c 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
@@ -845,4 +845,33 @@ public class AlterTableIT extends BaseHBaseManagedTimeIT {
 }
 }

- }
+@Test
+public void alterTableFromDifferentClient() throws Exception {
+Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+Connection conn3 = DriverManager.getConnection(getUrl(), props);
+
+// here we insert into the orig schema with one column
+Connection conn1 = DriverManager.getConnection(getUrl(), props);
+conn1.createStatement().execute(create table test_simpletable(id 
VARCHAR PRIMARY KEY, field1 BIGINT));
+PreparedStatement stmtInsert1 = conn1.prepareStatement(upsert into 
test_simpletable (id, field1) values ( ?, ?));
+stmtInsert1.setString(1, key1);
+stmtInsert1.setLong(2, 1L);
+stmtInsert1.execute();
+conn1.commit();
+stmtInsert1.close();
+conn1.close();
+
+// Do the alter through a separate client.
+conn3.createStatement().execute(alter table test_simpletable add 
field2 BIGINT);
+
+//Connection conn1 = DriverManager.getConnection(getUrl(), props);
+PreparedStatement pstmt2 = conn1.prepareStatement(upsert into 
test_simpletable (id, field1, field2) values ( ?, ?, ?));
+pstmt2.setString(1, key2);
+pstmt2.setLong(2, 2L);
+pstmt2.setLong(3, 2L);
+pstmt2.execute();
+conn1.commit();
+pstmt2.close();
+conn1.close();
+}
+}

http://git-wip-us.apache.org/repos/asf/phoenix/blob/94040d78/phoenix-core/src/main/java/org/apache/phoenix/compile/CreateIndexCompiler.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/CreateIndexCompiler.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/CreateIndexCompiler.java
index 2a687c6..07d9f56 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/CreateIndexCompiler.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/CreateIndexCompiler.java
@@ -46,7 +46,7 @@ public class CreateIndexCompiler {
 
 public MutationPlan compile(final CreateIndexStatement create) throws 
SQLException {
 final PhoenixConnection connection = statement.getConnection();
-final ColumnResolver resolver = 
FromCompiler.getResolverForMutation(create, connection);
+final ColumnResolver resolver = FromCompiler.getResolver(create, 
connection);
 Scan scan = new Scan();
 final StatementContext context = new StatementContext(statement, 
resolver, scan, new SequenceManager(statement));
 ExpressionCompiler expressionCompiler = new 
ExpressionCompiler(context);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/94040d78/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
--
diff --git 

[1/2] git commit: PHOENIX-1181 client cache fails to update itself after a table was altered from a diff client

2014-08-20 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/master b5971dae6 - 4fcd01d6a


PHOENIX-1181 client cache fails to update itself after a table was altered from 
a diff client


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

Branch: refs/heads/master
Commit: c369bbc611a4ceaf9cfb7fc39f6039f193ceccf6
Parents: b5971da
Author: James Taylor jtay...@salesforce.com
Authored: Tue Aug 19 00:49:22 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Wed Aug 20 00:04:23 2014 -0700

--
 .../apache/phoenix/end2end/AlterTableIT.java|  31 +-
 .../phoenix/compile/CreateIndexCompiler.java|   2 +-
 .../apache/phoenix/compile/DeleteCompiler.java  |  93 --
 .../apache/phoenix/compile/FromCompiler.java|  19 +-
 .../apache/phoenix/compile/UpsertCompiler.java  | 287 +++
 .../apache/phoenix/execute/MutationState.java   |   7 +-
 .../org/apache/phoenix/parse/DMLStatement.java  |  27 ++
 .../apache/phoenix/parse/DeleteStatement.java   |   2 +-
 .../apache/phoenix/parse/UpsertStatement.java   |   2 +-
 .../apache/phoenix/schema/MetaDataClient.java   |   8 +-
 10 files changed, 317 insertions(+), 161 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c369bbc6/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 1b52ede..9e6911c 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
@@ -845,4 +845,33 @@ public class AlterTableIT extends BaseHBaseManagedTimeIT {
 }
 }

- }
+@Test
+public void alterTableFromDifferentClient() throws Exception {
+Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+Connection conn3 = DriverManager.getConnection(getUrl(), props);
+
+// here we insert into the orig schema with one column
+Connection conn1 = DriverManager.getConnection(getUrl(), props);
+conn1.createStatement().execute(create table test_simpletable(id 
VARCHAR PRIMARY KEY, field1 BIGINT));
+PreparedStatement stmtInsert1 = conn1.prepareStatement(upsert into 
test_simpletable (id, field1) values ( ?, ?));
+stmtInsert1.setString(1, key1);
+stmtInsert1.setLong(2, 1L);
+stmtInsert1.execute();
+conn1.commit();
+stmtInsert1.close();
+conn1.close();
+
+// Do the alter through a separate client.
+conn3.createStatement().execute(alter table test_simpletable add 
field2 BIGINT);
+
+//Connection conn1 = DriverManager.getConnection(getUrl(), props);
+PreparedStatement pstmt2 = conn1.prepareStatement(upsert into 
test_simpletable (id, field1, field2) values ( ?, ?, ?));
+pstmt2.setString(1, key2);
+pstmt2.setLong(2, 2L);
+pstmt2.setLong(3, 2L);
+pstmt2.execute();
+conn1.commit();
+pstmt2.close();
+conn1.close();
+}
+}

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c369bbc6/phoenix-core/src/main/java/org/apache/phoenix/compile/CreateIndexCompiler.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/CreateIndexCompiler.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/CreateIndexCompiler.java
index 2a687c6..07d9f56 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/CreateIndexCompiler.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/CreateIndexCompiler.java
@@ -46,7 +46,7 @@ public class CreateIndexCompiler {
 
 public MutationPlan compile(final CreateIndexStatement create) throws 
SQLException {
 final PhoenixConnection connection = statement.getConnection();
-final ColumnResolver resolver = 
FromCompiler.getResolverForMutation(create, connection);
+final ColumnResolver resolver = FromCompiler.getResolver(create, 
connection);
 Scan scan = new Scan();
 final StatementContext context = new StatementContext(statement, 
resolver, scan, new SequenceManager(statement));
 ExpressionCompiler expressionCompiler = new 
ExpressionCompiler(context);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c369bbc6/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
--
diff --git 

[2/2] git commit: PHOENIX-1181 client cache fails to update itself after a table was altered from a diff client

2014-08-20 Thread jamestaylor
PHOENIX-1181 client cache fails to update itself after a table was altered from 
a diff client


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

Branch: refs/heads/master
Commit: 4fcd01d6a9c1eec1fec4f872a010f3ec16e5e4d3
Parents: c369bbc
Author: James Taylor jtay...@salesforce.com
Authored: Tue Aug 19 23:34:31 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Wed Aug 20 00:04:44 2014 -0700

--
 .../apache/phoenix/compile/FromCompiler.java|   9 +-
 .../apache/phoenix/compile/UpsertCompiler.java  | 201 ++-
 2 files changed, 103 insertions(+), 107 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/4fcd01d6/phoenix-core/src/main/java/org/apache/phoenix/compile/FromCompiler.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/FromCompiler.java 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/FromCompiler.java
index 9cf16e2..dc262ce 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/compile/FromCompiler.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/FromCompiler.java
@@ -177,19 +177,14 @@ public class FromCompiler {
 
 public static ColumnResolver getResolverForMutation(DMLStatement 
statement, PhoenixConnection connection)
 throws SQLException {
-return getResolverForMutation(statement, connection, false);
-}
-
-public static ColumnResolver getResolverForMutation(DMLStatement 
statement, PhoenixConnection connection, boolean updateCacheImmediately)
-throws SQLException {
 /*
  * We validate the meta data at commit time for mutations, as this 
allows us to do many UPSERT VALUES calls
  * without hitting the server each time to check if the meta data is 
up-to-date.
  */
-SingleTableColumnResolver visitor = new 
SingleTableColumnResolver(connection, statement.getTable(), 
updateCacheImmediately);
+SingleTableColumnResolver visitor = new 
SingleTableColumnResolver(connection, statement.getTable(), false);
 return visitor;
 }
-
+
 private static class SingleTableColumnResolver extends BaseColumnResolver {
private final ListTableRef tableRefs;
private final String alias;

http://git-wip-us.apache.org/repos/asf/phoenix/blob/4fcd01d6/phoenix-core/src/main/java/org/apache/phoenix/compile/UpsertCompiler.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/UpsertCompiler.java 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/UpsertCompiler.java
index a5f8057..612f322 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/compile/UpsertCompiler.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/UpsertCompiler.java
@@ -37,7 +37,6 @@ import org.apache.phoenix.cache.ServerCacheClient.ServerCache;
 import org.apache.phoenix.compile.GroupByCompiler.GroupBy;
 import org.apache.phoenix.compile.OrderByCompiler.OrderBy;
 import org.apache.phoenix.coprocessor.BaseScannerRegionObserver;
-import org.apache.phoenix.coprocessor.MetaDataProtocol.MetaDataMutationResult;
 import org.apache.phoenix.coprocessor.UngroupedAggregateRegionObserver;
 import org.apache.phoenix.exception.SQLExceptionCode;
 import org.apache.phoenix.exception.SQLExceptionInfo;
@@ -48,7 +47,6 @@ import org.apache.phoenix.expression.LiteralExpression;
 import org.apache.phoenix.hbase.index.util.ImmutableBytesPtr;
 import org.apache.phoenix.index.IndexMetaDataCacheClient;
 import org.apache.phoenix.index.PhoenixIndexCodec;
-import org.apache.phoenix.iterate.ParallelIterators.ParallelIteratorFactory;
 import org.apache.phoenix.iterate.ResultIterator;
 import org.apache.phoenix.jdbc.PhoenixConnection;
 import org.apache.phoenix.jdbc.PhoenixResultSet;
@@ -224,28 +222,23 @@ public class UpsertCompiler {
 int[] columnIndexesToBe;
 int nColumnsToSet = 0;
 int[] pkSlotIndexesToBe;
+ListParseNode valueNodes = upsert.getValues();
 ListPColumn targetColumns;
 NamedTableNode tableNode = upsert.getTable();
 String tableName = tableNode.getName().getTableName();
 String schemaName = tableNode.getName().getSchemaName();
-// Retry once if columns are explicitly named, as the meta data may
+QueryPlan queryPlanToBe = null;
+int nValuesToSet;
+boolean sameTable = false;
+boolean runOnServer = false;
+UpsertingParallelIteratorFactory parallelIteratorFactoryToBe = null;
+// Retry 

Apache-Phoenix | 4.0 | Hadoop1 | Build Successful

2014-08-20 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-1181 client cache fails to update itself after a table was altered from a diff client

[jtaylor] PHOENIX-1181 client cache fails to update itself after a table was altered from a diff client



[1/2] git commit: PHOENIX-1184 Phoenix 4.0 will not compile agaist CDH HBase 5.1

2014-08-20 Thread apurtell
Repository: phoenix
Updated Branches:
  refs/heads/4.0.1 70ac68380 - a169e1ba4 (forced update)


PHOENIX-1184 Phoenix 4.0 will not compile agaist CDH HBase 5.1


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

Branch: refs/heads/4.0.1
Commit: f09f103497d58a5459668dfcca42b6b74d1f4719
Parents: 4d90a49
Author: Andrew Purtell apurt...@apache.org
Authored: Tue Aug 19 19:38:54 2014 -0700
Committer: Andrew Purtell apurt...@apache.org
Committed: Wed Aug 20 12:38:45 2014 -0700

--
 .../query/ConnectionlessQueryServicesImpl.java  | 16 +++-
 1 file changed, 15 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/f09f1034/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 b616356..74cdf52 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
@@ -19,6 +19,7 @@ package org.apache.phoenix.query;
 
 import static 
org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.INDEX_STATE_BYTES;
 
+import java.lang.reflect.Constructor;
 import java.sql.SQLException;
 import java.util.Collections;
 import java.util.List;
@@ -138,9 +139,22 @@ public class ConnectionlessQueryServicesImpl extends 
DelegateQueryServices imple
 
 @Override
 public ListHRegionLocation getAllTableRegions(byte[] tableName) throws 
SQLException {
+// HBase hides the ServerName constructors and provides static valueOf 
helper methods
+// for obtaining ServerName objects instead. However some commercial 
Hadoop distributions
+// have patched their HBase to remove the valueOf static methods, 
leaving no common way
+// to construct ServerNames except by way of reflection.
+ServerName fakeServerName;
+try {
+  ConstructorServerName c = 
ServerName.class.getDeclaredConstructor(String.class,
+  int.class, long.class);
+  c.setAccessible(true);
+  fakeServerName = c.newInstance(localhost, 
HConstants.DEFAULT_REGIONSERVER_PORT, 0L);
+} catch (Exception e) {
+  throw new SQLException(e);
+}
 return Collections.singletonList(new HRegionLocation(
 new HRegionInfo(TableName.valueOf(tableName), 
HConstants.EMPTY_START_ROW, HConstants.EMPTY_END_ROW),
-   ServerName.valueOf(localhost, 
HConstants.DEFAULT_REGIONSERVER_PORT,0), -1));
+fakeServerName, -1));
 }
 
 @Override



[2/2] git commit: Update CHANGES and versions in POM for release 4.0.1

2014-08-20 Thread apurtell
Update CHANGES and versions in POM for release 4.0.1


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

Branch: refs/heads/4.0.1
Commit: a169e1ba46cd1200511b9647ec1a932e1abadb0d
Parents: f09f103
Author: Andrew Purtell apurt...@apache.org
Authored: Wed Aug 20 12:39:27 2014 -0700
Committer: Andrew Purtell apurt...@apache.org
Committed: Wed Aug 20 12:39:27 2014 -0700

--
 CHANGES| 5 +
 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 +-
 9 files changed, 13 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/a169e1ba/CHANGES
--
diff --git a/CHANGES b/CHANGES
index 2f18b78..32fa279 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,8 @@
+Release Notes - Phoenix - Version 4.0.1
+
+** Bug
+* [PHOENIX-1184] - Phoenix 4.0 will not compile agaist CDH HBase 5.1
+
 
 Release Notes - Phoenix - Version 4.0.0-incubating
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/a169e1ba/phoenix-assembly/pom.xml
--
diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml
index f4e6b49..ae9740a 100644
--- a/phoenix-assembly/pom.xml
+++ b/phoenix-assembly/pom.xml
@@ -26,7 +26,7 @@
   parent
 groupIdorg.apache.phoenix/groupId
 artifactIdphoenix/artifactId
-version4.0.0-incubating/version
+version4.0.1/version
   /parent
   artifactIdphoenix-assembly/artifactId
   namePhoenix Assembly/name

http://git-wip-us.apache.org/repos/asf/phoenix/blob/a169e1ba/phoenix-core/pom.xml
--
diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml
index 84ed8a0..bfc989d 100644
--- a/phoenix-core/pom.xml
+++ b/phoenix-core/pom.xml
@@ -4,7 +4,7 @@
   parent
 groupIdorg.apache.phoenix/groupId
 artifactIdphoenix/artifactId
-version4.0.0-incubating/version
+version4.0.1/version
   /parent
   artifactIdphoenix-core/artifactId
   namePhoenix Core/name

http://git-wip-us.apache.org/repos/asf/phoenix/blob/a169e1ba/phoenix-flume/pom.xml
--
diff --git a/phoenix-flume/pom.xml b/phoenix-flume/pom.xml
index e65470e..ec5b227 100644
--- a/phoenix-flume/pom.xml
+++ b/phoenix-flume/pom.xml
@@ -26,7 +26,7 @@
   parent
 groupIdorg.apache.phoenix/groupId
 artifactIdphoenix/artifactId
-version4.0.0-incubating/version
+version4.0.1/version
   /parent
   artifactIdphoenix-flume/artifactId
   namePhoenix - Flume/name

http://git-wip-us.apache.org/repos/asf/phoenix/blob/a169e1ba/phoenix-hadoop-compat/pom.xml
--
diff --git a/phoenix-hadoop-compat/pom.xml b/phoenix-hadoop-compat/pom.xml
index a4ff347..8949506 100644
--- a/phoenix-hadoop-compat/pom.xml
+++ b/phoenix-hadoop-compat/pom.xml
@@ -25,7 +25,7 @@
   parent
 groupIdorg.apache.phoenix/groupId
 artifactIdphoenix/artifactId
-version4.0.0-incubating/version
+version4.0.1/version
   /parent
   artifactIdphoenix-hadoop-compat/artifactId
   namePhoenix Hadoop Compatibility/name

http://git-wip-us.apache.org/repos/asf/phoenix/blob/a169e1ba/phoenix-hadoop1-compat/pom.xml
--
diff --git a/phoenix-hadoop1-compat/pom.xml b/phoenix-hadoop1-compat/pom.xml
index f3d3b04..1269c7a 100644
--- a/phoenix-hadoop1-compat/pom.xml
+++ b/phoenix-hadoop1-compat/pom.xml
@@ -25,7 +25,7 @@
   parent
 groupIdorg.apache.phoenix/groupId
 artifactIdphoenix/artifactId
-version4.0.0-incubating/version
+version4.0.1/version
   /parent
   artifactIdphoenix-hadoop1-compat/artifactId
   namePhoenix Hadoop1 Compatibility/name

http://git-wip-us.apache.org/repos/asf/phoenix/blob/a169e1ba/phoenix-hadoop2-compat/pom.xml
--
diff --git a/phoenix-hadoop2-compat/pom.xml b/phoenix-hadoop2-compat/pom.xml
index d936a6f..5f5b2b7 100644
--- a/phoenix-hadoop2-compat/pom.xml
+++ b/phoenix-hadoop2-compat/pom.xml
@@ -25,7 +25,7 @@
   parent
 groupIdorg.apache.phoenix/groupId
 artifactIdphoenix/artifactId
-version4.0.0-incubating/version
+version4.0.1/version
   /parent
   artifactIdphoenix-hadoop2-compat/artifactId
   namePhoenix Hadoop2 

svn commit: r1619216 - /phoenix/site/source/src/site/markdown/source.md

2014-08-20 Thread apurtell
Author: apurtell
Date: Wed Aug 20 19:50:50 2014
New Revision: 1619216

URL: http://svn.apache.org/r1619216
Log:
Update About - Source Repository with location of site sources

Modified:
phoenix/site/source/src/site/markdown/source.md

Modified: phoenix/site/source/src/site/markdown/source.md
URL: 
http://svn.apache.org/viewvc/phoenix/site/source/src/site/markdown/source.md?rev=1619216r1=1619215r2=1619216view=diff
==
--- phoenix/site/source/src/site/markdown/source.md (original)
+++ phoenix/site/source/src/site/markdown/source.md Wed Aug 20 19:50:50 2014
@@ -19,3 +19,8 @@ Mirror on Github: https://github.com/apa
 hr/
 
 Related: [Using  Building](building.html)
+
+### Site source access
+
+Source for the Apache Phoenix website is kept in ASF SVN in 
https://svn.apache.org/repos/asf/phoenix
+




git commit: PHOENIX-1187 Enable tracing on server

2014-08-20 Thread jyates
Repository: phoenix
Updated Branches:
  refs/heads/master 4fcd01d6a - f99e5d8d6


PHOENIX-1187 Enable tracing on server


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

Branch: refs/heads/master
Commit: f99e5d8d609d326fb3571255cd8f47961b1c6860
Parents: 4fcd01d
Author: Jesse Yates jya...@apache.org
Authored: Tue Aug 19 15:25:57 2014 -0700
Committer: Jesse Yates jya...@apache.org
Committed: Wed Aug 20 13:43:38 2014 -0700

--
 phoenix-assembly/pom.xml|   2 +-
 phoenix-assembly/src/build/all.xml  | 184 --
 .../components/all-common-dependencies.xml  |  62 ++
 .../src/build/components/all-common-files.xml   |  71 +++
 .../src/build/components/all-common-jars.xml|  74 +++
 phoenix-assembly/src/build/hadoop-one-all.xml   |  53 +
 phoenix-assembly/src/build/hadoop-two-all.xml   |  64 +++
 .../coprocessor/MetaDataEndpointImpl.java   |  11 ++
 .../apache/phoenix/jdbc/PhoenixConnection.java  |   9 +-
 .../trace/PhoenixTableMetricsWriter.java|  45 +++--
 .../org/apache/phoenix/trace/util/Tracing.java  |  22 +++
 .../java/org/apache/phoenix/util/QueryUtil.java |  33 +++-
 .../org/apache/phoenix/metrics/Metrics.java |  41 
 .../org/apache/phoenix/trace/TracingCompat.java |   3 +
 .../bin/hadoop-metrics2-hbase.properties|  20 ++
 .../bin/hadoop-metrics2-phoenix.properties  |  53 +
 .../phoenix/trace/PhoenixMetricsSink.java   | 191 +++
 .../phoenix/trace/PhoenixMetricsWriter.java | 176 -
 .../apache/phoenix/trace/TraceMetricSource.java |  13 +-
 .../phoenix/trace/PhoenixMetricsWriterTest.java |   2 +-
 pom.xml |   6 +-
 21 files changed, 740 insertions(+), 395 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/f99e5d8d/phoenix-assembly/pom.xml
--
diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml
index d8bd2d2..4921731 100644
--- a/phoenix-assembly/pom.xml
+++ b/phoenix-assembly/pom.xml
@@ -72,7 +72,7 @@
   tarLongFileModegnu/tarLongFileMode
   appendAssemblyIdfalse/appendAssemblyId
   descriptors
-descriptorsrc/build/all.xml/descriptor
+descriptorsrc/build/${assembly.descriptor}/descriptor
   /descriptors
 /configuration
   /execution

http://git-wip-us.apache.org/repos/asf/phoenix/blob/f99e5d8d/phoenix-assembly/src/build/all.xml
--
diff --git a/phoenix-assembly/src/build/all.xml 
b/phoenix-assembly/src/build/all.xml
deleted file mode 100644
index 8fa5884..000
--- a/phoenix-assembly/src/build/all.xml
+++ /dev/null
@@ -1,184 +0,0 @@
-?xml version='1.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.
-
---
-
-assembly 
xmlns=http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0;
-  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
-  
xsi:schemaLocation=http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0
 http://maven.apache.org/xsd/assembly-1.1.0.xsd;
-  !--This 'all' id is not appended to the produced bundle because we do this: 
http://maven.apache.org/plugins/maven-assembly-plugin/faq.html#required-classifiers
 --
-  idall/id
-  formats
-formattar.gz/format
-  /formats
-  includeBaseDirectorytrue/includeBaseDirectory
-  
-  fileSets
-!-- Top level directories --
-fileSet
-  !--Get misc project files --
-  directory${project.basedir}/../directory
-  outputDirectory//outputDirectory
-  includes
-include*.txt/include
-  /includes
-/fileSet
-fileSet
-  directory${project.basedir}/../bin/directory
-  outputDirectorybin/outputDirectory
-  fileMode0755/fileMode
-  

git commit: PHOENIX-1187 Enable tracing on server

2014-08-20 Thread jyates
Repository: phoenix
Updated Branches:
  refs/heads/4.0 d1a8f49a8 - 572724ef8


PHOENIX-1187 Enable tracing on server


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

Branch: refs/heads/4.0
Commit: 572724ef8bcab8e48eefec910a8654114e2bfebb
Parents: d1a8f49
Author: Jesse Yates jya...@apache.org
Authored: Tue Aug 19 15:25:57 2014 -0700
Committer: Jesse Yates jya...@apache.org
Committed: Wed Aug 20 13:42:43 2014 -0700

--
 phoenix-assembly/pom.xml|   2 +-
 phoenix-assembly/src/build/all.xml  | 184 --
 .../components/all-common-dependencies.xml  |  62 ++
 .../src/build/components/all-common-files.xml   |  71 +++
 .../src/build/components/all-common-jars.xml|  74 +++
 phoenix-assembly/src/build/hadoop-one-all.xml   |  53 +
 phoenix-assembly/src/build/hadoop-two-all.xml   |  64 +++
 .../coprocessor/MetaDataEndpointImpl.java   |  11 ++
 .../apache/phoenix/jdbc/PhoenixConnection.java  |   9 +-
 .../trace/PhoenixTableMetricsWriter.java|  45 +++--
 .../org/apache/phoenix/trace/util/Tracing.java  |  22 +++
 .../java/org/apache/phoenix/util/QueryUtil.java |  33 +++-
 .../org/apache/phoenix/metrics/Metrics.java |  41 
 .../org/apache/phoenix/trace/TracingCompat.java |   3 +
 .../bin/hadoop-metrics2-hbase.properties|  20 ++
 .../bin/hadoop-metrics2-phoenix.properties  |  53 +
 .../phoenix/trace/PhoenixMetricsSink.java   | 191 +++
 .../phoenix/trace/PhoenixMetricsWriter.java | 176 -
 .../apache/phoenix/trace/TraceMetricSource.java |  13 +-
 .../phoenix/trace/PhoenixMetricsWriterTest.java |   2 +-
 pom.xml |   6 +-
 21 files changed, 740 insertions(+), 395 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/572724ef/phoenix-assembly/pom.xml
--
diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml
index b3c24d2..a34b09c 100644
--- a/phoenix-assembly/pom.xml
+++ b/phoenix-assembly/pom.xml
@@ -72,7 +72,7 @@
   tarLongFileModegnu/tarLongFileMode
   appendAssemblyIdfalse/appendAssemblyId
   descriptors
-descriptorsrc/build/all.xml/descriptor
+descriptorsrc/build/${assembly.descriptor}/descriptor
   /descriptors
 /configuration
   /execution

http://git-wip-us.apache.org/repos/asf/phoenix/blob/572724ef/phoenix-assembly/src/build/all.xml
--
diff --git a/phoenix-assembly/src/build/all.xml 
b/phoenix-assembly/src/build/all.xml
deleted file mode 100644
index 8fa5884..000
--- a/phoenix-assembly/src/build/all.xml
+++ /dev/null
@@ -1,184 +0,0 @@
-?xml version='1.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.
-
---
-
-assembly 
xmlns=http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0;
-  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
-  
xsi:schemaLocation=http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0
 http://maven.apache.org/xsd/assembly-1.1.0.xsd;
-  !--This 'all' id is not appended to the produced bundle because we do this: 
http://maven.apache.org/plugins/maven-assembly-plugin/faq.html#required-classifiers
 --
-  idall/id
-  formats
-formattar.gz/format
-  /formats
-  includeBaseDirectorytrue/includeBaseDirectory
-  
-  fileSets
-!-- Top level directories --
-fileSet
-  !--Get misc project files --
-  directory${project.basedir}/../directory
-  outputDirectory//outputDirectory
-  includes
-include*.txt/include
-  /includes
-/fileSet
-fileSet
-  directory${project.basedir}/../bin/directory
-  outputDirectorybin/outputDirectory
-  fileMode0755/fileMode
-  directoryMode0755/directoryMode
-   

Apache-Phoenix | 4.0 | Hadoop1 | Build Successful

2014-08-20 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-1187 Enable tracing on server



Apache-Phoenix | Master | Hadoop1 | Build Successful

2014-08-20 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
[jyates] PHOENIX-1187 Enable tracing on server



Build failed in Jenkins: Phoenix | 4.0 | Hadoop2 #54

2014-08-20 Thread Apache Jenkins Server
See https://builds.apache.org/job/Phoenix-4.0-hadoop2/54/changes

Changes:

[jyates] PHOENIX-1187 Enable tracing on server

--
[...truncated 488 lines...]
Running org.apache.phoenix.end2end.IsNullIT
Tests run: 48, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 37.481 sec - 
in org.apache.phoenix.end2end.ArrayIT
Running org.apache.phoenix.end2end.ToCharFunctionIT
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.406 sec - in 
org.apache.phoenix.end2end.IsNullIT
Running org.apache.phoenix.end2end.FunkyNamesIT
Tests run: 33, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 41.082 sec - 
in org.apache.phoenix.end2end.RowValueConstructorIT
Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.103 sec - in 
org.apache.phoenix.end2end.ToCharFunctionIT
Running org.apache.phoenix.end2end.salted.SaltedTableIT
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.152 sec - in 
org.apache.phoenix.end2end.FunkyNamesIT
Running org.apache.phoenix.end2end.salted.SaltedTableVarLengthRowKeyIT
Running org.apache.phoenix.end2end.NativeHBaseTypesIT
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.682 sec - in 
org.apache.phoenix.end2end.NativeHBaseTypesIT
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.953 sec - in 
org.apache.phoenix.end2end.salted.SaltedTableVarLengthRowKeyIT
Running org.apache.phoenix.end2end.CompareDecimalToLongIT
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.391 sec - in 
org.apache.phoenix.end2end.salted.SaltedTableIT
Running org.apache.phoenix.end2end.TruncateFunctionIT
Running org.apache.phoenix.end2end.StatsManagerIT
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.107 sec - in 
org.apache.phoenix.end2end.TruncateFunctionIT
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.445 sec - in 
org.apache.phoenix.end2end.CompareDecimalToLongIT
Running org.apache.phoenix.end2end.QueryDatabaseMetaDataIT
Running org.apache.phoenix.end2end.SkipRangeParallelIteratorRegionSplitterIT
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 9.045 sec - in 
org.apache.phoenix.end2end.SkipRangeParallelIteratorRegionSplitterIT
Running org.apache.phoenix.end2end.PercentileIT
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 18.831 sec - in 
org.apache.phoenix.end2end.StatsManagerIT
Running org.apache.phoenix.end2end.ToNumberFunctionIT
Tests run: 18, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 12.832 sec - 
in org.apache.phoenix.end2end.ToNumberFunctionIT
Tests run: 17, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 18.847 sec - 
in org.apache.phoenix.end2end.PercentileIT
Running org.apache.phoenix.end2end.OrderByIT
Running org.apache.phoenix.end2end.GroupByCaseIT
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.262 sec - in 
org.apache.phoenix.end2end.GroupByCaseIT
Tests run: 3, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 5.087 sec - in 
org.apache.phoenix.end2end.OrderByIT
Tests run: 15, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 60.521 sec - 
in org.apache.phoenix.end2end.QueryDatabaseMetaDataIT
Tests run: 119, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 175.264 sec - 
in org.apache.phoenix.end2end.ScanQueryIT
Tests run: 91, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 152.94 sec - 
in org.apache.phoenix.end2end.GroupByIT
Tests run: 203, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 267.22 sec - 
in org.apache.phoenix.end2end.ClientTimeArithmeticQueryIT
Tests run: 182, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 299.947 sec - 
in org.apache.phoenix.end2end.QueryIT

Results :

Tests run: 1268, Failures: 0, Errors: 0, Skipped: 3

[INFO] 
[INFO] --- maven-failsafe-plugin:2.17:integration-test (HBaseManagedTimeTests) 
@ phoenix-core ---
[INFO] Failsafe report directory: 
https://builds.apache.org/job/Phoenix-4.0-hadoop2/ws/phoenix-core/target/failsafe-reports
[INFO] parallel='none', perCoreThreadCount=true, threadCount=0, 
useUnlimitedThreads=false, threadCountSuites=0, threadCountClasses=0, 
threadCountMethods=0, parallelOptimized=true

---
 T E S T S
---

---
 T E S T S
---
Running org.apache.phoenix.end2end.EncodeFunctionIT
Running org.apache.phoenix.trace.PhoenixTableMetricsWriterIT
Running org.apache.phoenix.end2end.AutoCommitIT
Running org.apache.phoenix.trace.PhoenixTraceReaderIT
Running org.apache.phoenix.end2end.ModulusExpressionIT
Running org.apache.phoenix.end2end.DeleteIT
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 12.158 sec - in 
org.apache.phoenix.end2end.EncodeFunctionIT
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.66 sec - in 
org.apache.phoenix.end2end.AutoCommitIT
Running 

git commit: PHOENIX-1192 Re-enable reverse scan to prevent order by

2014-08-20 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.0 572724ef8 - e2922d43c


PHOENIX-1192 Re-enable reverse scan to prevent order by


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

Branch: refs/heads/4.0
Commit: e2922d43c094fa200fd5a3baf6a676f38a121f94
Parents: 572724e
Author: James Taylor jtay...@salesforce.com
Authored: Wed Aug 20 20:28:31 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Wed Aug 20 20:28:31 2014 -0700

--
 .../org/apache/phoenix/end2end/OrderByIT.java   |  32 --
 .../apache/phoenix/end2end/ReverseScanIT.java   | 152 
 .../phoenix/end2end/index/MutableIndexIT.java   |   3 +-
 .../apache/phoenix/compile/OrderByCompiler.java |   7 +-
 .../apache/phoenix/compile/QueryCompiler.java   |   8 +-
 .../coprocessor/BaseScannerRegionObserver.java  |  16 +-
 .../apache/phoenix/execute/AggregatePlan.java   |   2 +-
 .../apache/phoenix/execute/BaseQueryPlan.java   | 377 +++
 .../apache/phoenix/execute/BasicQueryPlan.java  | 377 ---
 .../phoenix/execute/DegenerateQueryPlan.java|   2 +-
 .../apache/phoenix/execute/HashJoinPlan.java|   4 +-
 .../org/apache/phoenix/execute/ScanPlan.java|   6 +-
 .../phoenix/iterate/ChunkedResultIterator.java  |   4 +-
 .../phoenix/iterate/ParallelIterators.java  |   2 -
 .../phoenix/query/ConnectionQueryServices.java  |   2 +-
 .../org/apache/phoenix/query/QueryServices.java |   1 +
 .../phoenix/query/QueryServicesOptions.java |   2 +
 .../java/org/apache/phoenix/util/ScanUtil.java  |  63 +++-
 18 files changed, 616 insertions(+), 444 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/e2922d43/phoenix-core/src/it/java/org/apache/phoenix/end2end/OrderByIT.java
--
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/OrderByIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/OrderByIT.java
index 14a89cb..1c1a949 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/OrderByIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/OrderByIT.java
@@ -39,7 +39,6 @@ import java.util.Properties;
 
 import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.PropertiesUtil;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -120,35 +119,4 @@ public class OrderByIT extends BaseClientManagedTimeIT {
 conn.close();
 }
 }
-
-
-@Ignore(When reverse scan is in HBase re-enable this test)
-@Test
-public void testReverseScan() throws Exception {
-long ts = nextTimestamp();
-String tenantId = getOrganizationId();
-initATableValues(tenantId, getDefaultSplits(tenantId), null, ts);
-String query = SELECT entity_id FROM aTable WHERE entity_id = ? 
ORDER BY organization_id DESC, entity_id DESC;
-Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts 
+ 2)); // Execute at timestamp 2
-Connection conn = DriverManager.getConnection(getUrl(), props);
-try {
-PreparedStatement statement = conn.prepareStatement(query);
-statement.setString(1, ROW7);
-ResultSet rs = statement.executeQuery();
-
-assertTrue (rs.next());
-assertEquals(ROW9,rs.getString(1));
-assertTrue (rs.next());
-assertEquals(ROW8,rs.getString(1));
-assertTrue (rs.next());
-assertEquals(ROW7,rs.getString(1));
-
-assertFalse(rs.next());
-} finally {
-conn.close();
-}
-}
-
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/phoenix/blob/e2922d43/phoenix-core/src/it/java/org/apache/phoenix/end2end/ReverseScanIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ReverseScanIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ReverseScanIT.java
new file mode 100644
index 000..e87d290
--- /dev/null
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ReverseScanIT.java
@@ -0,0 +1,152 @@
+/*
+ * 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
+ 

git commit: PHOENIX-1192 Re-enable reverse scan to prevent order by

2014-08-20 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/master f99e5d8d6 - 52b0e0050


PHOENIX-1192 Re-enable reverse scan to prevent order by


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

Branch: refs/heads/master
Commit: 52b0e0050efca5dd5a49f6844230fd972207022f
Parents: f99e5d8
Author: James Taylor jtay...@salesforce.com
Authored: Wed Aug 20 20:28:31 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Wed Aug 20 20:46:43 2014 -0700

--
 .../org/apache/phoenix/end2end/OrderByIT.java   |  32 --
 .../apache/phoenix/end2end/ReverseScanIT.java   | 152 
 .../phoenix/end2end/index/MutableIndexIT.java   |   3 +-
 .../apache/phoenix/compile/OrderByCompiler.java |   7 +-
 .../apache/phoenix/compile/QueryCompiler.java   |   8 +-
 .../coprocessor/BaseScannerRegionObserver.java  |  16 +-
 .../apache/phoenix/execute/AggregatePlan.java   |   2 +-
 .../apache/phoenix/execute/BaseQueryPlan.java   | 377 +++
 .../apache/phoenix/execute/BasicQueryPlan.java  | 377 ---
 .../phoenix/execute/DegenerateQueryPlan.java|   2 +-
 .../apache/phoenix/execute/HashJoinPlan.java|   4 +-
 .../org/apache/phoenix/execute/ScanPlan.java|   6 +-
 .../phoenix/iterate/ChunkedResultIterator.java  |   4 +-
 .../phoenix/iterate/ParallelIterators.java  |   2 -
 .../phoenix/query/ConnectionQueryServices.java  |   2 +-
 .../org/apache/phoenix/query/QueryServices.java |   1 +
 .../phoenix/query/QueryServicesOptions.java |   2 +
 .../java/org/apache/phoenix/util/ScanUtil.java  |  63 +++-
 18 files changed, 616 insertions(+), 444 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/52b0e005/phoenix-core/src/it/java/org/apache/phoenix/end2end/OrderByIT.java
--
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/OrderByIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/OrderByIT.java
index 14a89cb..1c1a949 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/OrderByIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/OrderByIT.java
@@ -39,7 +39,6 @@ import java.util.Properties;
 
 import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.PropertiesUtil;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -120,35 +119,4 @@ public class OrderByIT extends BaseClientManagedTimeIT {
 conn.close();
 }
 }
-
-
-@Ignore(When reverse scan is in HBase re-enable this test)
-@Test
-public void testReverseScan() throws Exception {
-long ts = nextTimestamp();
-String tenantId = getOrganizationId();
-initATableValues(tenantId, getDefaultSplits(tenantId), null, ts);
-String query = SELECT entity_id FROM aTable WHERE entity_id = ? 
ORDER BY organization_id DESC, entity_id DESC;
-Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
-props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts 
+ 2)); // Execute at timestamp 2
-Connection conn = DriverManager.getConnection(getUrl(), props);
-try {
-PreparedStatement statement = conn.prepareStatement(query);
-statement.setString(1, ROW7);
-ResultSet rs = statement.executeQuery();
-
-assertTrue (rs.next());
-assertEquals(ROW9,rs.getString(1));
-assertTrue (rs.next());
-assertEquals(ROW8,rs.getString(1));
-assertTrue (rs.next());
-assertEquals(ROW7,rs.getString(1));
-
-assertFalse(rs.next());
-} finally {
-conn.close();
-}
-}
-
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/phoenix/blob/52b0e005/phoenix-core/src/it/java/org/apache/phoenix/end2end/ReverseScanIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ReverseScanIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ReverseScanIT.java
new file mode 100644
index 000..e87d290
--- /dev/null
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ReverseScanIT.java
@@ -0,0 +1,152 @@
+/*
+ * 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