Build failed in Jenkins: Phoenix | Master #1970

2018-03-23 Thread Apache Jenkins Server
See 


Changes:

[jtaylor] PHOENIX-4659 Use coprocessor API to write local transactional indexes

--
[...truncated 1.24 MB...]
[INFO] Running org.apache.phoenix.end2end.join.SortMergeJoinGlobalIndexIT
[INFO] Running org.apache.phoenix.end2end.join.HashJoinNoIndexIT
[INFO] Tests run: 40, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 401.395 
s - in org.apache.phoenix.end2end.index.LocalImmutableTxIndexIT
[INFO] Tests run: 40, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 396.931 
s - in org.apache.phoenix.end2end.index.LocalMutableNonTxIndexIT
[INFO] Running org.apache.phoenix.end2end.join.SortMergeJoinLocalIndexIT
[INFO] Running org.apache.phoenix.end2end.join.SortMergeJoinNoIndexIT
[INFO] Tests run: 40, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 407.512 
s - in org.apache.phoenix.end2end.index.LocalMutableTxIndexIT
[INFO] Running org.apache.phoenix.end2end.join.SubqueryIT
[INFO] Tests run: 33, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 389.956 
s - in org.apache.phoenix.end2end.join.HashJoinGlobalIndexIT
[INFO] Tests run: 33, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 246.467 
s - in org.apache.phoenix.end2end.join.HashJoinNoIndexIT
[INFO] Running org.apache.phoenix.end2end.join.SubqueryUsingSortMergeJoinIT
[INFO] Running org.apache.phoenix.end2end.salted.SaltedTableIT
[INFO] Tests run: 72, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 627.471 
s - in org.apache.phoenix.end2end.index.MutableIndexIT
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 26.201 s 
- in org.apache.phoenix.end2end.salted.SaltedTableIT
[INFO] Running org.apache.phoenix.end2end.salted.SaltedTableVarLengthRowKeyIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.375 s 
- in org.apache.phoenix.end2end.salted.SaltedTableVarLengthRowKeyIT
[INFO] Running org.apache.phoenix.iterate.PhoenixQueryTimeoutIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.191 s 
- in org.apache.phoenix.iterate.PhoenixQueryTimeoutIT
[INFO] Running org.apache.phoenix.iterate.RoundRobinResultIteratorIT
[INFO] Running org.apache.phoenix.end2end.salted.SaltedTableUpsertSelectIT
[INFO] Tests run: 34, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 276.268 
s - in org.apache.phoenix.end2end.join.SortMergeJoinNoIndexIT
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 45.759 s 
- in org.apache.phoenix.end2end.salted.SaltedTableUpsertSelectIT
[INFO] Running org.apache.phoenix.rpc.UpdateCacheIT
[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 68.74 s 
- in org.apache.phoenix.iterate.RoundRobinResultIteratorIT
[INFO] Running org.apache.phoenix.trace.PhoenixTableMetricsWriterIT
[INFO] Running org.apache.phoenix.replication.SystemCatalogWALEntryFilterIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.175 s 
- in org.apache.phoenix.replication.SystemCatalogWALEntryFilterIT
[INFO] Running org.apache.phoenix.trace.PhoenixTracingEndToEndIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 14.339 s 
- in org.apache.phoenix.trace.PhoenixTableMetricsWriterIT
[INFO] Running org.apache.phoenix.tx.FlappingTransactionIT
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 10.721 s 
- in org.apache.phoenix.tx.FlappingTransactionIT
[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 36.421 s 
- in org.apache.phoenix.rpc.UpdateCacheIT
[INFO] Running org.apache.phoenix.tx.TransactionIT
[INFO] Tests run: 24, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 312.962 
s - in org.apache.phoenix.end2end.join.SubqueryIT
[INFO] Running org.apache.phoenix.tx.ParameterizedTransactionIT
[INFO] Tests run: 34, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 484.616 
s - in org.apache.phoenix.end2end.join.SortMergeJoinGlobalIndexIT
[INFO] Running org.apache.phoenix.tx.TxCheckpointIT
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 93.691 s 
- in org.apache.phoenix.trace.PhoenixTracingEndToEndIT
[INFO] Tests run: 15, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 220.453 
s - in org.apache.phoenix.end2end.join.SubqueryUsingSortMergeJoinIT
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 65.376 s 
- in org.apache.phoenix.tx.TransactionIT
[INFO] Running org.apache.phoenix.util.IndexScrutinyIT
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 20.461 s 
- in org.apache.phoenix.util.IndexScrutinyIT
[INFO] Tests run: 34, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 675.478 
s - in org.apache.phoenix.end2end.join.HashJoinLocalIndexIT
[WARNING] Tests run: 52, Failures: 0, Errors: 0, Skipped: 4, Time elapsed: 
256.576 s - in org.apache.phoenix.tx.ParameterizedTransactionIT
[INFO] Tests run: 34, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 668.55 
s - in 

phoenix git commit: PHOENIX-4659 Use coprocessor API to write local transactional indexes (addendum)

2018-03-23 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/5.x-HBase-2.0 bf61ead7a -> 43455b41d


PHOENIX-4659 Use coprocessor API to write local transactional indexes (addendum)


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

Branch: refs/heads/5.x-HBase-2.0
Commit: 43455b41d7210ebe37f826824cc9c7ea7929a799
Parents: bf61ead
Author: James Taylor 
Authored: Fri Mar 23 17:09:17 2018 -0700
Committer: James Taylor 
Committed: Fri Mar 23 17:12:43 2018 -0700

--
 .../org/apache/phoenix/util/TransactionUtil.java | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/43455b41/phoenix-core/src/main/java/org/apache/phoenix/util/TransactionUtil.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/util/TransactionUtil.java 
b/phoenix-core/src/main/java/org/apache/phoenix/util/TransactionUtil.java
index 4c4cc75..ce70dd9 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/util/TransactionUtil.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/util/TransactionUtil.java
@@ -100,8 +100,9 @@ public class TransactionUtil {
public static Mutation convertIfDelete(Mutation mutation) throws 
IOException {
 if (mutation instanceof Delete) {
 Put deleteMarker = null;
-for (byte[] family : mutation.getFamilyCellMap().keySet()) {
-List familyCells = 
mutation.getFamilyCellMap().get(family);
+for (Map.Entry entry : 
mutation.getFamilyCellMap().entrySet()) {
+byte[] family = entry.getKey();
+List familyCells = entry.getValue();
 if (familyCells.size() == 1) {
 if (CellUtil.isDeleteFamily(familyCells.get(0))) {
 if (deleteMarker == null) {
@@ -126,12 +127,12 @@ public class TransactionUtil {
 }
 }
 }
-if (deleteMarker != null) {
-for (Map.Entry entry : 
mutation.getAttributesMap().entrySet()) {
-deleteMarker.setAttribute(entry.getKey(), 
entry.getValue());
-}
-mutation = deleteMarker;
+}
+if (deleteMarker != null) {
+for (Map.Entry entry : 
mutation.getAttributesMap().entrySet()) {
+deleteMarker.setAttribute(entry.getKey(), 
entry.getValue());
 }
+mutation = deleteMarker;
 }
 }
 return mutation;



phoenix git commit: PHOENIX-4659 Use coprocessor API to write local transactional indexes (addendum)

2018-03-23 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/master 3c7d72541 -> 96f2c8b3b


PHOENIX-4659 Use coprocessor API to write local transactional indexes (addendum)


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

Branch: refs/heads/master
Commit: 96f2c8b3b88c57018f8c8fe1ba2bb9846e865eb2
Parents: 3c7d725
Author: James Taylor 
Authored: Fri Mar 23 17:09:17 2018 -0700
Committer: James Taylor 
Committed: Fri Mar 23 17:11:16 2018 -0700

--
 .../org/apache/phoenix/util/TransactionUtil.java | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/96f2c8b3/phoenix-core/src/main/java/org/apache/phoenix/util/TransactionUtil.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/util/TransactionUtil.java 
b/phoenix-core/src/main/java/org/apache/phoenix/util/TransactionUtil.java
index 8f02adc..8cedb1c 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/util/TransactionUtil.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/util/TransactionUtil.java
@@ -100,8 +100,9 @@ public class TransactionUtil {
public static Mutation convertIfDelete(Mutation mutation) throws 
IOException {
 if (mutation instanceof Delete) {
 Put deleteMarker = null;
-for (byte[] family : mutation.getFamilyCellMap().keySet()) {
-List familyCells = 
mutation.getFamilyCellMap().get(family);
+for (Map.Entry entry : 
mutation.getFamilyCellMap().entrySet()) {
+byte[] family = entry.getKey();
+List familyCells = entry.getValue();
 if (familyCells.size() == 1) {
 if (CellUtil.isDeleteFamily(familyCells.get(0))) {
 if (deleteMarker == null) {
@@ -126,12 +127,12 @@ public class TransactionUtil {
 }
 }
 }
-if (deleteMarker != null) {
-for (Map.Entry entry : 
mutation.getAttributesMap().entrySet()) {
-deleteMarker.setAttribute(entry.getKey(), 
entry.getValue());
-}
-mutation = deleteMarker;
+}
+if (deleteMarker != null) {
+for (Map.Entry entry : 
mutation.getAttributesMap().entrySet()) {
+deleteMarker.setAttribute(entry.getKey(), 
entry.getValue());
 }
+mutation = deleteMarker;
 }
 }
 return mutation;



phoenix git commit: PHOENIX-4659 Use coprocessor API to write local transactional indexes (addendum)

2018-03-23 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.3 c51c70438 -> d2b290ce0


PHOENIX-4659 Use coprocessor API to write local transactional indexes (addendum)


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

Branch: refs/heads/4.x-HBase-1.3
Commit: d2b290ce030bdc4743255df9b85b695467da3f08
Parents: c51c704
Author: James Taylor 
Authored: Fri Mar 23 17:09:17 2018 -0700
Committer: James Taylor 
Committed: Fri Mar 23 17:09:17 2018 -0700

--
 .../org/apache/phoenix/util/TransactionUtil.java | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/d2b290ce/phoenix-core/src/main/java/org/apache/phoenix/util/TransactionUtil.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/util/TransactionUtil.java 
b/phoenix-core/src/main/java/org/apache/phoenix/util/TransactionUtil.java
index 8f02adc..8cedb1c 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/util/TransactionUtil.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/util/TransactionUtil.java
@@ -100,8 +100,9 @@ public class TransactionUtil {
public static Mutation convertIfDelete(Mutation mutation) throws 
IOException {
 if (mutation instanceof Delete) {
 Put deleteMarker = null;
-for (byte[] family : mutation.getFamilyCellMap().keySet()) {
-List familyCells = 
mutation.getFamilyCellMap().get(family);
+for (Map.Entry entry : 
mutation.getFamilyCellMap().entrySet()) {
+byte[] family = entry.getKey();
+List familyCells = entry.getValue();
 if (familyCells.size() == 1) {
 if (CellUtil.isDeleteFamily(familyCells.get(0))) {
 if (deleteMarker == null) {
@@ -126,12 +127,12 @@ public class TransactionUtil {
 }
 }
 }
-if (deleteMarker != null) {
-for (Map.Entry entry : 
mutation.getAttributesMap().entrySet()) {
-deleteMarker.setAttribute(entry.getKey(), 
entry.getValue());
-}
-mutation = deleteMarker;
+}
+if (deleteMarker != null) {
+for (Map.Entry entry : 
mutation.getAttributesMap().entrySet()) {
+deleteMarker.setAttribute(entry.getKey(), 
entry.getValue());
 }
+mutation = deleteMarker;
 }
 }
 return mutation;



Apache Phoenix - Timeout crawler - Build https://builds.apache.org/job/Phoenix-4.x-HBase-0.98/1842/

2018-03-23 Thread Apache Jenkins Server
[...truncated 61 lines...]

[4/5] phoenix git commit: PHOENIX-4660 Use TransactionProvider interface

2018-03-23 Thread jamestaylor
PHOENIX-4660 Use TransactionProvider interface


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

Branch: refs/heads/5.x-HBase-2.0
Commit: 2975532fc4d89532af32f626b91e7d1e33b55f3d
Parents: eeb8e4b
Author: James Taylor 
Authored: Sat Mar 17 15:16:24 2018 -0700
Committer: James Taylor 
Committed: Fri Mar 23 15:27:03 2018 -0700

--
 .../phoenix/tx/FlappingTransactionIT.java   |   8 +-
 .../PhoenixTransactionalProcessor.java  |   2 +-
 .../apache/phoenix/execute/MutationState.java   |   8 +-
 .../PhoenixTxIndexMutationGenerator.java|   2 +-
 .../apache/phoenix/index/IndexMaintainer.java   |   2 +-
 .../index/IndexMetaDataCacheFactory.java|   2 +-
 .../index/PhoenixIndexMetaDataBuilder.java  |   2 +-
 .../query/ConnectionQueryServicesImpl.java  |   2 +-
 .../query/ConnectionlessQueryServicesImpl.java  |   2 +-
 .../transaction/OmidTransactionProvider.java|  78 +++
 .../transaction/TephraTransactionProvider.java  |  76 +++
 .../phoenix/transaction/TransactionFactory.java | 130 +--
 .../transaction/TransactionProvider.java|  36 +
 .../org/apache/phoenix/util/PhoenixRuntime.java |   2 +-
 .../apache/phoenix/util/TransactionUtil.java|   8 +-
 .../java/org/apache/phoenix/query/BaseTest.java |   6 +-
 16 files changed, 220 insertions(+), 146 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/2975532f/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
index 899ea3d..4d8e297 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
@@ -227,9 +227,9 @@ public class FlappingTransactionIT extends 
ParallelStatsDisabledIT {
 }
 
 PhoenixTransactionContext txContext =
-  
TransactionFactory.getTransactionFactory().getTransactionContext(pconn);
+  
TransactionFactory.getTransactionProvider().getTransactionContext(pconn);
 PhoenixTransactionalTable txTable =
-  
TransactionFactory.getTransactionFactory().getTransactionalTable(txContext, 
htable);
+  
TransactionFactory.getTransactionProvider().getTransactionalTable(txContext, 
htable);
 
 txContext.begin();
 
@@ -279,9 +279,9 @@ public class FlappingTransactionIT extends 
ParallelStatsDisabledIT {
 
 // Repeat the same as above, but this time abort the transaction
 txContext =
-  
TransactionFactory.getTransactionFactory().getTransactionContext(pconn);
+  
TransactionFactory.getTransactionProvider().getTransactionContext(pconn);
 txTable =
-  
TransactionFactory.getTransactionFactory().getTransactionalTable(txContext, 
htable);
+  
TransactionFactory.getTransactionProvider().getTransactionalTable(txContext, 
htable);
 
 txContext.begin();
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/2975532f/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
index 0be0b4c..8e7f0f9 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
@@ -33,7 +33,7 @@ public class PhoenixTransactionalProcessor extends 
DelegateRegionObserver implem
 }
 
 public PhoenixTransactionalProcessor() {
-
super(TransactionFactory.getTransactionFactory().getTransactionContext().getCoprocessor());
+
super(TransactionFactory.getTransactionProvider().getTransactionContext().getCoprocessor());
 }
 
 @Override

http://git-wip-us.apache.org/repos/asf/phoenix/blob/2975532f/phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java 
b/phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java
index 

[2/5] phoenix git commit: PHOENIX-4619 Process transactional updates to local index on server-side

2018-03-23 Thread jamestaylor
PHOENIX-4619 Process transactional updates to local index on server-side


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

Branch: refs/heads/5.x-HBase-2.0
Commit: f32b32b30df689d5fa79ca1b10579ac6a08e9614
Parents: 2689b0a
Author: James Taylor 
Authored: Sat Mar 17 12:52:38 2018 -0700
Committer: James Taylor 
Committed: Fri Mar 23 14:39:54 2018 -0700

--
 .../phoenix/end2end/index/BaseIndexIT.java  |  16 +-
 .../phoenix/end2end/index/ImmutableIndexIT.java |   1 +
 .../end2end/index/MutableIndexFailureIT.java|   8 +-
 .../apache/phoenix/compile/DeleteCompiler.java  |  36 +-
 .../PhoenixTransactionalProcessor.java  |   2 +-
 .../apache/phoenix/execute/MutationState.java   | 103 +++-
 .../PhoenixTxIndexMutationGenerator.java| 450 
 .../PhoenixTxnIndexMutationGenerator.java   | 519 ---
 .../hbase/index/builder/BaseIndexBuilder.java   |   4 +-
 .../hbase/index/builder/BaseIndexCodec.java |   7 -
 .../phoenix/hbase/index/covered/IndexCodec.java |  14 +-
 .../hbase/index/covered/LocalTableState.java|  10 +-
 .../hbase/index/covered/NonTxIndexBuilder.java  |   2 +-
 .../phoenix/hbase/index/covered/TableState.java |   9 +-
 .../apache/phoenix/index/IndexMaintainer.java   |  23 +-
 .../phoenix/index/PhoenixIndexBuilder.java  |  21 +-
 .../apache/phoenix/index/PhoenixIndexCodec.java |  39 +-
 .../phoenix/index/PhoenixIndexMetaData.java |  78 +--
 .../index/PhoenixIndexMetaDataBuilder.java  | 106 
 .../index/PhoenixTransactionalIndexer.java  | 437 +---
 .../query/ConnectionQueryServicesImpl.java  |   9 +-
 .../transaction/OmidTransactionContext.java |   2 +-
 .../transaction/PhoenixTransactionContext.java  |   2 +-
 .../transaction/TephraTransactionContext.java   |   3 +-
 .../index/covered/CoveredColumnIndexCodec.java  |   6 +-
 .../covered/CoveredIndexCodecForTesting.java|   5 +-
 .../index/covered/LocalTableStateTest.java  |  10 +-
 .../index/covered/NonTxIndexBuilderTest.java|   3 +
 .../covered/TestCoveredColumnIndexCodec.java|   8 +-
 29 files changed, 786 insertions(+), 1147 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/f32b32b3/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
index 48268dd..e10bf8f 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
@@ -239,15 +239,17 @@ public abstract class BaseIndexIT extends 
ParallelStatsDisabledIT {
 }
 
 private void assertNoClientSideIndexMutations(Connection conn) throws 
SQLException {
-if (mutable) {
-Iterator> iterator = 
PhoenixRuntime.getUncommittedDataIterator(conn);
-if (iterator.hasNext()) {
-byte[] tableName = iterator.next().getFirst(); // skip data 
table mutations
-PTable table = PhoenixRuntime.getTable(conn, 
Bytes.toString(tableName));
+Iterator> iterator = 
PhoenixRuntime.getUncommittedDataIterator(conn);
+if (iterator.hasNext()) {
+byte[] tableName = iterator.next().getFirst(); // skip data table 
mutations
+PTable table = PhoenixRuntime.getTable(conn, 
Bytes.toString(tableName));
+boolean clientSideUpdate = !localIndex && (!mutable || 
transactional);
+if (!clientSideUpdate) {
 assertTrue(table.getType() == PTableType.TABLE); // should be 
data table
-boolean hasIndexData = iterator.hasNext();
-assertFalse(hasIndexData && !transactional); // should have no 
index data
 }
+boolean hasIndexData = iterator.hasNext();
+// global immutable and global transactional tables are processed 
client side
+assertEquals(clientSideUpdate, hasIndexData); 
 }
 }
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/f32b32b3/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
index 85a26f9..9764ee7 100644

[3/5] phoenix git commit: PHOENIX-4659 Use coprocessor API to write local transactional indexes

2018-03-23 Thread jamestaylor
PHOENIX-4659 Use coprocessor API to write local transactional indexes


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

Branch: refs/heads/5.x-HBase-2.0
Commit: eeb8e4b55c33518c89958c382941daa568f6ac31
Parents: f32b32b
Author: James Taylor 
Authored: Sat Mar 17 14:18:59 2018 -0700
Committer: James Taylor 
Committed: Fri Mar 23 15:20:28 2018 -0700

--
 .../end2end/index/MutableIndexFailureIT.java|  7 ++-
 .../end2end/index/txn/TxWriteFailureIT.java |  6 +--
 .../index/PhoenixTransactionalIndexer.java  | 29 +++-
 .../phoenix/transaction/TransactionFactory.java | 13 ++
 .../apache/phoenix/util/TransactionUtil.java| 47 
 5 files changed, 96 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/eeb8e4b5/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexFailureIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexFailureIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexFailureIT.java
index 76eef3e..0bfca8c 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexFailureIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexFailureIT.java
@@ -469,6 +469,7 @@ public class MutableIndexFailureIT extends BaseTest {
 // uncommitted data when the DELETE is executed.
 FailingRegionObserver.FAIL_WRITE = true;
 try {
+FailingRegionObserver.FAIL_NEXT_WRITE = localIndex && 
transactional;
 conn.commit();
 if (commitShouldFail && (!localIndex || transactional) && 
this.throwIndexWriteFailure) {
 fail();
@@ -504,13 +505,17 @@ public class MutableIndexFailureIT extends BaseTest {
 
 public static class FailingRegionObserver extends SimpleRegionObserver {
 public static volatile boolean FAIL_WRITE = false;
+public static volatile boolean FAIL_NEXT_WRITE = false;
 public static final String FAIL_INDEX_NAME = "FAIL_IDX";
 public static final String FAIL_TABLE_NAME = "FAIL_TABLE";
 
 @Override
 public void 
preBatchMutate(ObserverContext c, 
MiniBatchOperationInProgress miniBatchOp) throws IOException {
 boolean throwException = false;
-if 
(c.getEnvironment().getRegionInfo().getTable().getNameAsString().endsWith("A_" 
+ FAIL_INDEX_NAME)
+if (FAIL_NEXT_WRITE) {
+throwException = true;
+FAIL_NEXT_WRITE = false;
+} else if 
(c.getEnvironment().getRegionInfo().getTable().getNameAsString().endsWith("A_" 
+ FAIL_INDEX_NAME)
 && FAIL_WRITE) {
 throwException = true;
 } else {

http://git-wip-us.apache.org/repos/asf/phoenix/blob/eeb8e4b5/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/txn/TxWriteFailureIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/txn/TxWriteFailureIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/txn/TxWriteFailureIT.java
index 5fae9fd..d6b68d4 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/txn/TxWriteFailureIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/txn/TxWriteFailureIT.java
@@ -103,7 +103,9 @@ public class TxWriteFailureIT extends 
BaseUniqueNamesOwnClusterIT {

@Test
 public void testIndexTableWriteFailure() throws Exception {
-helpTestWriteFailure(true);
+   if (!localIndex) { // We cannot fail the index write for local 
indexes because of the way they're written
+   helpTestWriteFailure(true);
+   }
}

@Test
@@ -173,8 +175,6 @@ public class TxWriteFailureIT extends 
BaseUniqueNamesOwnClusterIT {
 assertEquals("k3", rs.getString(1));
 assertEquals("v3", rs.getString(2));
 assertFalse(rs.next());
-
-conn.createStatement().execute("DROP TABLE " + dataTableFullName);
}



http://git-wip-us.apache.org/repos/asf/phoenix/blob/eeb8e4b5/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixTransactionalIndexer.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixTransactionalIndexer.java
 

[5/5] phoenix git commit: PHOENIX-4643 Implement ARRAY_REMOVE built in function (Xavier Jodoin)

2018-03-23 Thread jamestaylor
PHOENIX-4643 Implement ARRAY_REMOVE built in function (Xavier Jodoin)


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

Branch: refs/heads/5.x-HBase-2.0
Commit: bf61ead7ac4bce306992d475823e047b4f950ac9
Parents: 2975532
Author: James Taylor 
Authored: Fri Mar 23 12:00:45 2018 -0700
Committer: James Taylor 
Committed: Fri Mar 23 15:27:07 2018 -0700

--
 .../phoenix/end2end/ArrayRemoveFunctionIT.java  | 383 +++
 .../phoenix/expression/ExpressionType.java  |  10 +-
 .../function/ArrayRemoveFunction.java   |  88 +
 .../expression/ArrayRemoveFunctionTest.java | 285 ++
 4 files changed, 762 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/bf61ead7/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
new file mode 100644
index 000..b5a468c
--- /dev/null
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
@@ -0,0 +1,383 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.phoenix.end2end;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+
+import org.apache.phoenix.schema.TypeMismatchException;
+import org.junit.Before;
+import org.junit.Test;
+
+public class ArrayRemoveFunctionIT extends ParallelStatsDisabledIT {
+
+   private Connection conn;
+   private String tableName;
+
+   @Before
+   public void setup() throws Exception {
+   conn = DriverManager.getConnection(getUrl());
+   tableName = initTables(conn);
+   }
+
+   private String initTables(Connection conn) throws Exception {
+   String tableName = generateUniqueName();
+   String ddl = "CREATE TABLE " + tableName
+   + " (region_name VARCHAR PRIMARY KEY,varchars 
VARCHAR[],integers INTEGER[],doubles DOUBLE[],bigints BIGINT[],"
+   + "chars CHAR(15)[],double1 DOUBLE,char1 
CHAR(17),nullcheck INTEGER,chars2 CHAR(15)[], nullVarchar VARCHAR[], nullBigInt 
BIGINT[],double2 DOUBLE,integer1 INTEGER,oneItem VARCHAR[],char2 
char(15),varchar1 VARCHAR)";
+   conn.createStatement().execute(ddl);
+   String dml = "UPSERT INTO " + tableName
+   + 
"(region_name,varchars,integers,doubles,bigints,chars,double1,char1,nullcheck,chars2,double2,integer1,oneItem,char2,varchar1)
 VALUES('SF Bay Area',"
+   + "ARRAY['2345','46345','23234']," + 
"ARRAY[2345,46345,23234,456],"
+   + "ARRAY[10.0,23.45,46.345,23.234,45.6,5.78]," 
+ "ARRAY[12,34,56,78,910],"
+   + "ARRAY['a','','c','ddd','e','c']," + 
"23.45," + "'wert'," + "NULL,"
+   + "ARRAY['a','','c','ddd','e','foo']," + 
"12," + "12," + "ARRAY['alone'],'2345','a')";
+   PreparedStatement stmt = conn.prepareStatement(dml);
+   stmt.execute();
+   conn.commit();
+   return tableName;
+   }
+
+   @Test
+   public void testEmptyArrayModification() throws Exception {
+   ResultSet rs = conn.createStatement()
+   .executeQuery("SELECT 
ARRAY_REMOVE(nullVarChar,'34567') FROM " + tableName + " LIMIT 1");
+   

[1/5] phoenix git commit: PHOENIX-4619 Process transactional updates to local index on server-side

2018-03-23 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/5.x-HBase-2.0 2689b0a45 -> bf61ead7a


http://git-wip-us.apache.org/repos/asf/phoenix/blob/f32b32b3/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
index cc1c773..60f86d4 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
@@ -49,7 +49,7 @@ public class NonTxIndexBuilder extends BaseIndexBuilder {
 @Override
 public Collection> getIndexUpdate(Mutation 
mutation, IndexMetaData indexMetaData) throws IOException {
// create a state manager, so we can manage each batch
-LocalTableState state = new LocalTableState(env, localTable, mutation);
+LocalTableState state = new LocalTableState(localTable, mutation);
 // build the index updates for each group
 IndexUpdateManager manager = new IndexUpdateManager(indexMetaData);
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/f32b32b3/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
index a6b1133..c2e7a92 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
@@ -38,13 +38,6 @@ import 
org.apache.phoenix.hbase.index.covered.update.IndexedColumnGroup;
  */
 public interface TableState {
 
-  // use this to get batch ids/ptable stuff
-  /**
-   * WARNING: messing with this can affect the indexing plumbing. Use with 
caution :)
-   * @return get the current environment in which this table lives.
-   */
-  public RegionCoprocessorEnvironment getEnvironment();
-
   /**
* @return the current timestamp up-to-which we are releasing table state.
*/
@@ -80,4 +73,4 @@ public interface TableState {
* @return the keyvalues in the pending update to the table.
*/
   Collection getPendingUpdate();
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/phoenix/blob/f32b32b3/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java 
b/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java
index 50ef18e..29015b9 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java
@@ -194,13 +194,16 @@ public class IndexMaintainer implements Writable, 
Iterable {
  */
 public static void serialize(PTable dataTable, ImmutableBytesWritable ptr,
 List indexes, PhoenixConnection connection) {
-Iterator indexesItr = maintainedIndexes(indexes.iterator());
-if ((dataTable.isImmutableRows()) || !indexesItr.hasNext()) {
-indexesItr = maintainedLocalIndexes(indexesItr);
-if (!indexesItr.hasNext()) {
-ptr.set(ByteUtil.EMPTY_BYTE_ARRAY);
-return;
-}
+Iterator indexesItr;
+boolean onlyLocalIndexes = dataTable.isImmutableRows() || 
dataTable.isTransactional();
+if (onlyLocalIndexes) {
+indexesItr = maintainedLocalIndexes(indexes.iterator());
+} else {
+indexesItr = maintainedIndexes(indexes.iterator());
+}
+if (!indexesItr.hasNext()) {
+ptr.set(ByteUtil.EMPTY_BYTE_ARRAY);
+return;
 }
 int nIndexes = 0;
 while (indexesItr.hasNext()) {
@@ -214,9 +217,9 @@ public class IndexMaintainer implements Writable, 
Iterable {
 WritableUtils.writeVInt(output, nIndexes * 
(dataTable.getBucketNum() == null ? 1 : -1));
 // Write out data row key schema once, since it's the same for all 
index maintainers
 dataTable.getRowKeySchema().write(output);
-indexesItr =
-dataTable.isImmutableRows() ? 
maintainedLocalIndexes(indexes.iterator())
-: maintainedIndexes(indexes.iterator());
+indexesItr = onlyLocalIndexes 
+? maintainedLocalIndexes(indexes.iterator())
+: maintainedIndexes(indexes.iterator());
 while (indexesItr.hasNext()) {
   

Jenkins build is back to normal : Phoenix-4.x-HBase-1.2 #302

2018-03-23 Thread Apache Jenkins Server
See 




[phoenix] Git Push Summary

2018-03-23 Thread pboado
Repository: phoenix
Updated Branches:
  refs/heads/4.x-cdh5.11.2 [deleted] cdb77d468


[2/5] phoenix git commit: PHOENIX-4619 Process transactional updates to local index on server-side

2018-03-23 Thread pboado
PHOENIX-4619 Process transactional updates to local index on server-side


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

Branch: refs/heads/4.x-cdh5.14
Commit: c1827f2408fa118be269efc79eaadacd6de48bc9
Parents: 03fedf6
Author: James Taylor 
Authored: Sat Mar 17 19:52:38 2018 +
Committer: Pedro Boado 
Committed: Fri Mar 23 21:31:42 2018 +

--
 .../phoenix/end2end/index/BaseIndexIT.java  |  16 +-
 .../phoenix/end2end/index/ImmutableIndexIT.java |   3 +-
 .../end2end/index/MutableIndexFailureIT.java|   8 +-
 .../apache/phoenix/compile/DeleteCompiler.java  |  36 +-
 .../PhoenixTransactionalProcessor.java  |   2 +-
 .../apache/phoenix/execute/MutationState.java   | 103 +++-
 .../PhoenixTxIndexMutationGenerator.java| 449 
 .../PhoenixTxnIndexMutationGenerator.java   | 519 ---
 .../org/apache/phoenix/hbase/index/Indexer.java |   1 -
 .../hbase/index/builder/BaseIndexBuilder.java   |   4 +-
 .../hbase/index/builder/BaseIndexCodec.java |   7 -
 .../phoenix/hbase/index/covered/IndexCodec.java |  14 +-
 .../hbase/index/covered/LocalTableState.java|  10 +-
 .../hbase/index/covered/NonTxIndexBuilder.java  |   2 +-
 .../phoenix/hbase/index/covered/TableState.java |   8 -
 .../apache/phoenix/index/IndexMaintainer.java   |  23 +-
 .../phoenix/index/PhoenixIndexBuilder.java  |  21 +-
 .../apache/phoenix/index/PhoenixIndexCodec.java |  34 +-
 .../phoenix/index/PhoenixIndexMetaData.java |  78 +--
 .../index/PhoenixIndexMetaDataBuilder.java  | 106 
 .../index/PhoenixTransactionalIndexer.java  | 442 +---
 .../query/ConnectionQueryServicesImpl.java  |   8 +
 .../transaction/OmidTransactionContext.java |   2 +-
 .../transaction/PhoenixTransactionContext.java  |   2 +-
 .../transaction/TephraTransactionContext.java   |   2 +-
 .../index/covered/CoveredColumnIndexCodec.java  |   6 +-
 .../covered/CoveredIndexCodecForTesting.java|   5 +-
 .../index/covered/LocalTableStateTest.java  |  10 +-
 .../index/covered/NonTxIndexBuilderTest.java|   3 +
 .../covered/TestCoveredColumnIndexCodec.java|   6 +-
 30 files changed, 785 insertions(+), 1145 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c1827f24/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
index 1483c58..f914256 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
@@ -239,15 +239,17 @@ public abstract class BaseIndexIT extends 
ParallelStatsDisabledIT {
 }
 
 private void assertNoClientSideIndexMutations(Connection conn) throws 
SQLException {
-if (mutable) {
-Iterator> iterator = 
PhoenixRuntime.getUncommittedDataIterator(conn);
-if (iterator.hasNext()) {
-byte[] tableName = iterator.next().getFirst(); // skip data 
table mutations
-PTable table = PhoenixRuntime.getTable(conn, 
Bytes.toString(tableName));
+Iterator> iterator = 
PhoenixRuntime.getUncommittedDataIterator(conn);
+if (iterator.hasNext()) {
+byte[] tableName = iterator.next().getFirst(); // skip data table 
mutations
+PTable table = PhoenixRuntime.getTable(conn, 
Bytes.toString(tableName));
+boolean clientSideUpdate = !localIndex && (!mutable || 
transactional);
+if (!clientSideUpdate) {
 assertTrue(table.getType() == PTableType.TABLE); // should be 
data table
-boolean hasIndexData = iterator.hasNext();
-assertFalse(hasIndexData && !transactional); // should have no 
index data
 }
+boolean hasIndexData = iterator.hasNext();
+// global immutable and global transactional tables are processed 
client side
+assertEquals(clientSideUpdate, hasIndexData); 
 }
 }
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c1827f24/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
 

[5/5] phoenix git commit: Changes for CDH 5.14.x

2018-03-23 Thread pboado
Changes for CDH 5.14.x


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

Branch: refs/heads/4.x-cdh5.14
Commit: a80821d060317b827da631ddfef10d1bde89353d
Parents: 881d7aa
Author: Pedro Boado 
Authored: Sat Mar 10 17:54:04 2018 +
Committer: Pedro Boado 
Committed: Fri Mar 23 21:36:34 2018 +

--
 phoenix-assembly/pom.xml|  2 +-
 phoenix-client/pom.xml  |  2 +-
 phoenix-core/pom.xml|  2 +-
 .../hadoop/hbase/ipc/PhoenixRpcScheduler.java   | 34 ++--
 phoenix-flume/pom.xml   |  2 +-
 phoenix-hive/pom.xml|  2 +-
 phoenix-kafka/pom.xml   |  2 +-
 phoenix-load-balancer/pom.xml   |  2 +-
 phoenix-parcel/pom.xml  |  2 +-
 phoenix-pherf/pom.xml   |  2 +-
 phoenix-pig/pom.xml |  2 +-
 phoenix-queryserver-client/pom.xml  |  2 +-
 phoenix-queryserver/pom.xml |  2 +-
 phoenix-server/pom.xml  |  2 +-
 phoenix-spark/pom.xml   |  2 +-
 phoenix-tracing-webapp/pom.xml  |  2 +-
 pom.xml |  4 +--
 17 files changed, 49 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/a80821d0/phoenix-assembly/pom.xml
--
diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml
index 55a9a6e..862ec23 100644
--- a/phoenix-assembly/pom.xml
+++ b/phoenix-assembly/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-cdh5.11.2-SNAPSHOT
+4.14.0-cdh5.14.0-SNAPSHOT
   
   phoenix-assembly
   Phoenix Assembly

http://git-wip-us.apache.org/repos/asf/phoenix/blob/a80821d0/phoenix-client/pom.xml
--
diff --git a/phoenix-client/pom.xml b/phoenix-client/pom.xml
index 2454de6..470dd05 100644
--- a/phoenix-client/pom.xml
+++ b/phoenix-client/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-cdh5.11.2-SNAPSHOT
+4.14.0-cdh5.14.0-SNAPSHOT
   
   phoenix-client
   Phoenix Client

http://git-wip-us.apache.org/repos/asf/phoenix/blob/a80821d0/phoenix-core/pom.xml
--
diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml
index 2cb4c81..d24dbea 100644
--- a/phoenix-core/pom.xml
+++ b/phoenix-core/pom.xml
@@ -4,7 +4,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-cdh5.11.2-SNAPSHOT
+4.14.0-cdh5.14.0-SNAPSHOT
   
   phoenix-core
   Phoenix Core

http://git-wip-us.apache.org/repos/asf/phoenix/blob/a80821d0/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
 
b/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
index 4fdddf5..d1f05f8 100644
--- 
a/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
+++ 
b/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
@@ -124,6 +124,36 @@ public class PhoenixRpcScheduler extends RpcScheduler {
 public void setMetadataExecutorForTesting(RpcExecutor executor) {
 this.metadataCallExecutor = executor;
 }
-
-
+
+@Override
+public int getReadQueueLength() {
+return delegate.getReadQueueLength();
+}
+
+@Override
+public int getWriteQueueLength() {
+return delegate.getWriteQueueLength();
+}
+
+@Override
+public int getScanQueueLength() {
+return delegate.getScanQueueLength();
+}
+
+@Override
+public int getActiveReadRpcHandlerCount() {
+return delegate.getActiveReadRpcHandlerCount();
+}
+
+@Override
+public int getActiveWriteRpcHandlerCount() {
+return delegate.getActiveWriteRpcHandlerCount();
+}
+
+@Override
+public int getActiveScanRpcHandlerCount() {
+return delegate.getActiveScanRpcHandlerCount();
+}
+
+
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/a80821d0/phoenix-flume/pom.xml
--
diff --git a/phoenix-flume/pom.xml b/phoenix-flume/pom.xml
index 0883e5e..a7aef39 100644
--- a/phoenix-flume/pom.xml
+++ b/phoenix-flume/pom.xml
@@ -26,7 +26,7 @@
   
 

[3/5] phoenix git commit: PHOENIX-4660 Use TransactionProvider interface

2018-03-23 Thread pboado
PHOENIX-4660 Use TransactionProvider interface


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

Branch: refs/heads/4.x-cdh5.14
Commit: af0f68b919087553f9356142c223829ae5cf1bff
Parents: c1827f2
Author: James Taylor 
Authored: Sat Mar 17 22:16:24 2018 +
Committer: Pedro Boado 
Committed: Fri Mar 23 21:31:53 2018 +

--
 .../phoenix/tx/FlappingTransactionIT.java   |   8 +-
 .../PhoenixTransactionalProcessor.java  |   2 +-
 .../apache/phoenix/execute/MutationState.java   |   8 +-
 .../PhoenixTxIndexMutationGenerator.java|   2 +-
 .../apache/phoenix/index/IndexMaintainer.java   |   2 +-
 .../index/IndexMetaDataCacheFactory.java|   2 +-
 .../index/PhoenixIndexMetaDataBuilder.java  |   2 +-
 .../query/ConnectionQueryServicesImpl.java  |   2 +-
 .../query/ConnectionlessQueryServicesImpl.java  |   2 +-
 .../transaction/OmidTransactionProvider.java|  78 +
 .../transaction/TephraTransactionProvider.java  |  76 
 .../phoenix/transaction/TransactionFactory.java | 117 ++-
 .../transaction/TransactionProvider.java|  36 ++
 .../org/apache/phoenix/util/PhoenixRuntime.java |   2 +-
 .../apache/phoenix/util/TransactionUtil.java|   4 +-
 .../java/org/apache/phoenix/query/BaseTest.java |   6 +-
 16 files changed, 218 insertions(+), 131 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/af0f68b9/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
index 301768b..200cf1c 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
@@ -225,9 +225,9 @@ public class FlappingTransactionIT extends 
ParallelStatsDisabledIT {
 }
 
 PhoenixTransactionContext txContext =
-  
TransactionFactory.getTransactionFactory().getTransactionContext(pconn);
+  
TransactionFactory.getTransactionProvider().getTransactionContext(pconn);
 PhoenixTransactionalTable txTable =
-  
TransactionFactory.getTransactionFactory().getTransactionalTable(txContext, 
htable);
+  
TransactionFactory.getTransactionProvider().getTransactionalTable(txContext, 
htable);
 
 txContext.begin();
 
@@ -277,9 +277,9 @@ public class FlappingTransactionIT extends 
ParallelStatsDisabledIT {
 
 // Repeat the same as above, but this time abort the transaction
 txContext =
-  
TransactionFactory.getTransactionFactory().getTransactionContext(pconn);
+  
TransactionFactory.getTransactionProvider().getTransactionContext(pconn);
 txTable =
-  
TransactionFactory.getTransactionFactory().getTransactionalTable(txContext, 
htable);
+  
TransactionFactory.getTransactionProvider().getTransactionalTable(txContext, 
htable);
 
 txContext.begin();
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/af0f68b9/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
index ca0c997..0c26ecc 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
@@ -22,7 +22,7 @@ import org.apache.phoenix.transaction.TransactionFactory;
 public class PhoenixTransactionalProcessor extends DelegateRegionObserver {
 
 public PhoenixTransactionalProcessor() {
-
super(TransactionFactory.getTransactionFactory().getTransactionContext().getCoprocessor());
+
super(TransactionFactory.getTransactionProvider().getTransactionContext().getCoprocessor());
 }
 
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/af0f68b9/phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java 

[1/5] phoenix git commit: PHOENIX-4619 Process transactional updates to local index on server-side [Forced Update!]

2018-03-23 Thread pboado
Repository: phoenix
Updated Branches:
  refs/heads/4.x-cdh5.14 f86ada8c5 -> a80821d06 (forced update)


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c1827f24/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
index 9bd4db8..4f65416 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
@@ -21,7 +21,6 @@ import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.KeyValueUtil;
 import org.apache.hadoop.hbase.client.Mutation;
-import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
 import org.apache.hadoop.hbase.util.Pair;
 import org.apache.phoenix.hbase.index.ValueGetter;
 import org.apache.phoenix.hbase.index.covered.data.IndexMemStore;
@@ -44,7 +43,6 @@ import 
org.apache.phoenix.hbase.index.util.IndexManagementUtil;
 public class LocalTableState implements TableState {
 
 private long ts;
-private RegionCoprocessorEnvironment env;
 private KeyValueStore memstore;
 private LocalHBaseState table;
 private Mutation update;
@@ -54,8 +52,7 @@ public class LocalTableState implements TableState {
 private List hints;
 private CoveredColumns columnSet;
 
-public LocalTableState(RegionCoprocessorEnvironment environment, 
LocalHBaseState table, Mutation update) {
-this.env = environment;
+public LocalTableState(LocalHBaseState table, Mutation update) {
 this.table = table;
 this.update = update;
 this.memstore = new IndexMemStore();
@@ -104,11 +101,6 @@ public class LocalTableState implements TableState {
 }
 
 @Override
-public RegionCoprocessorEnvironment getEnvironment() {
-return this.env;
-}
-
-@Override
 public long getCurrentTimestamp() {
 return this.ts;
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c1827f24/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
index 8dd57c0..97ac30d 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
@@ -51,7 +51,7 @@ public class NonTxIndexBuilder extends BaseIndexBuilder {
 @Override
 public Collection> getIndexUpdate(Mutation 
mutation, IndexMetaData indexMetaData) throws IOException {
// create a state manager, so we can manage each batch
-LocalTableState state = new LocalTableState(env, localTable, mutation);
+LocalTableState state = new LocalTableState(localTable, mutation);
 // build the index updates for each group
 IndexUpdateManager manager = new IndexUpdateManager(indexMetaData);
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c1827f24/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
index 605cbe3..cb2b41f 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
@@ -23,7 +23,6 @@ import java.util.Collection;
 import java.util.List;
 
 import org.apache.hadoop.hbase.KeyValue;
-import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
 import org.apache.hadoop.hbase.util.Pair;
 import org.apache.phoenix.hbase.index.ValueGetter;
 import org.apache.phoenix.hbase.index.covered.update.ColumnReference;
@@ -36,13 +35,6 @@ import 
org.apache.phoenix.hbase.index.covered.update.IndexedColumnGroup;
  */
 public interface TableState {
 
-  // use this to get batch ids/ptable stuff
-  /**
-   * WARNING: messing with this can affect the indexing plumbing. Use with 
caution :)
-   * @return get the current environment in which this table lives.
-   */
-  public RegionCoprocessorEnvironment getEnvironment();
-
   /**
* @return the current timestamp up-to-which we are releasing table state.
*/


Build failed in Jenkins: Phoenix | Master #1969

2018-03-23 Thread Apache Jenkins Server
See 


Changes:

[jtaylor] PHOENIX-4619 Process transactional updates to local index on 
server-side

[jtaylor] PHOENIX-4659 Use coprocessor API to write local transactional indexes

[jtaylor] PHOENIX-4660 Use TransactionProvider interface

[jtaylor] PHOENIX-4643 Implement ARRAY_REMOVE built in function (Xavier Jodoin)

--
[...truncated 178.31 KB...]
[INFO] Tests run: 33, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 359.818 
s - in org.apache.phoenix.end2end.join.HashJoinNoIndexIT
[INFO] Running org.apache.phoenix.end2end.join.SubqueryUsingSortMergeJoinIT
[INFO] Tests run: 24, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 394.521 
s - in org.apache.phoenix.end2end.join.SubqueryIT
[INFO] Tests run: 72, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 819.193 
s - in org.apache.phoenix.end2end.index.MutableIndexIT
[INFO] Tests run: 34, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 375.259 
s - in org.apache.phoenix.end2end.join.SortMergeJoinNoIndexIT
[INFO] Tests run: 33, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 624.368 
s - in org.apache.phoenix.end2end.join.HashJoinGlobalIndexIT
[INFO] Running org.apache.phoenix.end2end.salted.SaltedTableIT
[INFO] Running org.apache.phoenix.end2end.salted.SaltedTableUpsertSelectIT
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 26.895 s 
- in org.apache.phoenix.end2end.salted.SaltedTableIT
[INFO] Running org.apache.phoenix.iterate.RoundRobinResultIteratorIT
[INFO] Running org.apache.phoenix.end2end.salted.SaltedTableVarLengthRowKeyIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.324 s 
- in org.apache.phoenix.end2end.salted.SaltedTableVarLengthRowKeyIT
[INFO] Running org.apache.phoenix.iterate.PhoenixQueryTimeoutIT
[INFO] Running org.apache.phoenix.replication.SystemCatalogWALEntryFilterIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.201 s 
- in org.apache.phoenix.replication.SystemCatalogWALEntryFilterIT
[INFO] Running org.apache.phoenix.rpc.UpdateCacheIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.933 s 
- in org.apache.phoenix.iterate.PhoenixQueryTimeoutIT
[INFO] Running org.apache.phoenix.trace.PhoenixTableMetricsWriterIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 14.415 s 
- in org.apache.phoenix.trace.PhoenixTableMetricsWriterIT
[INFO] Running org.apache.phoenix.trace.PhoenixTracingEndToEndIT
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 49.984 s 
- in org.apache.phoenix.end2end.salted.SaltedTableUpsertSelectIT
[INFO] Running org.apache.phoenix.tx.FlappingTransactionIT
[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 42.868 s 
- in org.apache.phoenix.rpc.UpdateCacheIT
[INFO] Running org.apache.phoenix.tx.ParameterizedTransactionIT
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 19.224 s 
- in org.apache.phoenix.tx.FlappingTransactionIT
[INFO] Running org.apache.phoenix.tx.TransactionIT
[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 76.319 s 
- in org.apache.phoenix.iterate.RoundRobinResultIteratorIT
[INFO] Running org.apache.phoenix.tx.TxCheckpointIT
[INFO] Tests run: 15, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 281.803 
s - in org.apache.phoenix.end2end.join.SubqueryUsingSortMergeJoinIT
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 103.935 
s - in org.apache.phoenix.trace.PhoenixTracingEndToEndIT
[INFO] Running org.apache.phoenix.util.IndexScrutinyIT
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 95.764 s 
- in org.apache.phoenix.tx.TransactionIT
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 29.281 s 
- in org.apache.phoenix.util.IndexScrutinyIT
[INFO] Tests run: 34, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 818.782 
s - in org.apache.phoenix.end2end.join.HashJoinLocalIndexIT
[INFO] Tests run: 34, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 644.261 
s - in org.apache.phoenix.end2end.join.SortMergeJoinGlobalIndexIT
[INFO] Tests run: 34, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 808.818 
s - in org.apache.phoenix.end2end.join.SortMergeJoinLocalIndexIT
[WARNING] Tests run: 52, Failures: 0, Errors: 0, Skipped: 4, Time elapsed: 
354.402 s - in org.apache.phoenix.tx.ParameterizedTransactionIT
[INFO] Tests run: 40, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 405.891 
s - in org.apache.phoenix.tx.TxCheckpointIT
[INFO] 
[INFO] Results:
[INFO] 
[ERROR] Failures: 
[ERROR]   ConcurrentMutationsIT.testConcurrentDeletesAndUpsertValues:214 
Expected to find PK in data table: (0,0)
[ERROR]   DefaultColumnValueIT.testDefaultIndexed:978
[ERROR]   RowValueConstructorIT.testRVCLastPkIsTable1stPkIndex:1584
[ERROR]   

[4/5] phoenix git commit: PHOENIX-4643 Implement ARRAY_REMOVE built in function (Xavier Jodoin)

2018-03-23 Thread pboado
PHOENIX-4643 Implement ARRAY_REMOVE built in function (Xavier Jodoin)


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

Branch: refs/heads/4.x-cdh5.14
Commit: 881d7aacbc443e8e4b82015bf193a2a26f121745
Parents: af0f68b
Author: James Taylor 
Authored: Fri Mar 23 19:00:45 2018 +
Committer: Pedro Boado 
Committed: Fri Mar 23 21:32:03 2018 +

--
 .../phoenix/end2end/ArrayRemoveFunctionIT.java  | 383 +++
 .../phoenix/expression/ExpressionType.java  |  10 +-
 .../function/ArrayRemoveFunction.java   |  88 +
 .../expression/ArrayRemoveFunctionTest.java | 285 ++
 4 files changed, 762 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/881d7aac/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
new file mode 100644
index 000..b5a468c
--- /dev/null
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
@@ -0,0 +1,383 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.phoenix.end2end;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+
+import org.apache.phoenix.schema.TypeMismatchException;
+import org.junit.Before;
+import org.junit.Test;
+
+public class ArrayRemoveFunctionIT extends ParallelStatsDisabledIT {
+
+   private Connection conn;
+   private String tableName;
+
+   @Before
+   public void setup() throws Exception {
+   conn = DriverManager.getConnection(getUrl());
+   tableName = initTables(conn);
+   }
+
+   private String initTables(Connection conn) throws Exception {
+   String tableName = generateUniqueName();
+   String ddl = "CREATE TABLE " + tableName
+   + " (region_name VARCHAR PRIMARY KEY,varchars 
VARCHAR[],integers INTEGER[],doubles DOUBLE[],bigints BIGINT[],"
+   + "chars CHAR(15)[],double1 DOUBLE,char1 
CHAR(17),nullcheck INTEGER,chars2 CHAR(15)[], nullVarchar VARCHAR[], nullBigInt 
BIGINT[],double2 DOUBLE,integer1 INTEGER,oneItem VARCHAR[],char2 
char(15),varchar1 VARCHAR)";
+   conn.createStatement().execute(ddl);
+   String dml = "UPSERT INTO " + tableName
+   + 
"(region_name,varchars,integers,doubles,bigints,chars,double1,char1,nullcheck,chars2,double2,integer1,oneItem,char2,varchar1)
 VALUES('SF Bay Area',"
+   + "ARRAY['2345','46345','23234']," + 
"ARRAY[2345,46345,23234,456],"
+   + "ARRAY[10.0,23.45,46.345,23.234,45.6,5.78]," 
+ "ARRAY[12,34,56,78,910],"
+   + "ARRAY['a','','c','ddd','e','c']," + 
"23.45," + "'wert'," + "NULL,"
+   + "ARRAY['a','','c','ddd','e','foo']," + 
"12," + "12," + "ARRAY['alone'],'2345','a')";
+   PreparedStatement stmt = conn.prepareStatement(dml);
+   stmt.execute();
+   conn.commit();
+   return tableName;
+   }
+
+   @Test
+   public void testEmptyArrayModification() throws Exception {
+   ResultSet rs = conn.createStatement()
+   .executeQuery("SELECT 
ARRAY_REMOVE(nullVarChar,'34567') FROM " + tableName + " LIMIT 1");
+   

[5/5] phoenix git commit: Changes for CDH 5.13.x

2018-03-23 Thread pboado
Changes for CDH 5.13.x


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

Branch: refs/heads/4.x-cdh5.13
Commit: 1d0339005b7d16a5a8914f6f2806c94d5dae1e1f
Parents: 881d7aa
Author: Pedro Boado 
Authored: Sat Mar 10 17:54:04 2018 +
Committer: Pedro Boado 
Committed: Fri Mar 23 21:35:43 2018 +

--
 phoenix-assembly/pom.xml|  2 +-
 phoenix-client/pom.xml  |  2 +-
 phoenix-core/pom.xml|  2 +-
 .../hadoop/hbase/ipc/PhoenixRpcScheduler.java   | 34 ++--
 phoenix-flume/pom.xml   |  2 +-
 phoenix-hive/pom.xml|  2 +-
 phoenix-kafka/pom.xml   |  2 +-
 phoenix-load-balancer/pom.xml   |  2 +-
 phoenix-parcel/pom.xml  |  2 +-
 phoenix-pherf/pom.xml   |  2 +-
 phoenix-pig/pom.xml |  2 +-
 phoenix-queryserver-client/pom.xml  |  2 +-
 phoenix-queryserver/pom.xml |  2 +-
 phoenix-server/pom.xml  |  2 +-
 phoenix-spark/pom.xml   |  2 +-
 phoenix-tracing-webapp/pom.xml  |  2 +-
 pom.xml |  4 +--
 17 files changed, 49 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/1d033900/phoenix-assembly/pom.xml
--
diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml
index 55a9a6e..f0cd238 100644
--- a/phoenix-assembly/pom.xml
+++ b/phoenix-assembly/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-cdh5.11.2-SNAPSHOT
+4.14.0-cdh5.13.2-SNAPSHOT
   
   phoenix-assembly
   Phoenix Assembly

http://git-wip-us.apache.org/repos/asf/phoenix/blob/1d033900/phoenix-client/pom.xml
--
diff --git a/phoenix-client/pom.xml b/phoenix-client/pom.xml
index 2454de6..b4da311 100644
--- a/phoenix-client/pom.xml
+++ b/phoenix-client/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-cdh5.11.2-SNAPSHOT
+4.14.0-cdh5.13.2-SNAPSHOT
   
   phoenix-client
   Phoenix Client

http://git-wip-us.apache.org/repos/asf/phoenix/blob/1d033900/phoenix-core/pom.xml
--
diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml
index 2cb4c81..4dacc3f 100644
--- a/phoenix-core/pom.xml
+++ b/phoenix-core/pom.xml
@@ -4,7 +4,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-cdh5.11.2-SNAPSHOT
+4.14.0-cdh5.13.2-SNAPSHOT
   
   phoenix-core
   Phoenix Core

http://git-wip-us.apache.org/repos/asf/phoenix/blob/1d033900/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
 
b/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
index 4fdddf5..d1f05f8 100644
--- 
a/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
+++ 
b/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
@@ -124,6 +124,36 @@ public class PhoenixRpcScheduler extends RpcScheduler {
 public void setMetadataExecutorForTesting(RpcExecutor executor) {
 this.metadataCallExecutor = executor;
 }
-
-
+
+@Override
+public int getReadQueueLength() {
+return delegate.getReadQueueLength();
+}
+
+@Override
+public int getWriteQueueLength() {
+return delegate.getWriteQueueLength();
+}
+
+@Override
+public int getScanQueueLength() {
+return delegate.getScanQueueLength();
+}
+
+@Override
+public int getActiveReadRpcHandlerCount() {
+return delegate.getActiveReadRpcHandlerCount();
+}
+
+@Override
+public int getActiveWriteRpcHandlerCount() {
+return delegate.getActiveWriteRpcHandlerCount();
+}
+
+@Override
+public int getActiveScanRpcHandlerCount() {
+return delegate.getActiveScanRpcHandlerCount();
+}
+
+
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/1d033900/phoenix-flume/pom.xml
--
diff --git a/phoenix-flume/pom.xml b/phoenix-flume/pom.xml
index 0883e5e..925b26f 100644
--- a/phoenix-flume/pom.xml
+++ b/phoenix-flume/pom.xml
@@ -26,7 +26,7 @@
   
 

[4/5] phoenix git commit: PHOENIX-4643 Implement ARRAY_REMOVE built in function (Xavier Jodoin)

2018-03-23 Thread pboado
PHOENIX-4643 Implement ARRAY_REMOVE built in function (Xavier Jodoin)


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

Branch: refs/heads/4.x-cdh5.13
Commit: 881d7aacbc443e8e4b82015bf193a2a26f121745
Parents: af0f68b
Author: James Taylor 
Authored: Fri Mar 23 19:00:45 2018 +
Committer: Pedro Boado 
Committed: Fri Mar 23 21:32:03 2018 +

--
 .../phoenix/end2end/ArrayRemoveFunctionIT.java  | 383 +++
 .../phoenix/expression/ExpressionType.java  |  10 +-
 .../function/ArrayRemoveFunction.java   |  88 +
 .../expression/ArrayRemoveFunctionTest.java | 285 ++
 4 files changed, 762 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/881d7aac/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
new file mode 100644
index 000..b5a468c
--- /dev/null
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
@@ -0,0 +1,383 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.phoenix.end2end;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+
+import org.apache.phoenix.schema.TypeMismatchException;
+import org.junit.Before;
+import org.junit.Test;
+
+public class ArrayRemoveFunctionIT extends ParallelStatsDisabledIT {
+
+   private Connection conn;
+   private String tableName;
+
+   @Before
+   public void setup() throws Exception {
+   conn = DriverManager.getConnection(getUrl());
+   tableName = initTables(conn);
+   }
+
+   private String initTables(Connection conn) throws Exception {
+   String tableName = generateUniqueName();
+   String ddl = "CREATE TABLE " + tableName
+   + " (region_name VARCHAR PRIMARY KEY,varchars 
VARCHAR[],integers INTEGER[],doubles DOUBLE[],bigints BIGINT[],"
+   + "chars CHAR(15)[],double1 DOUBLE,char1 
CHAR(17),nullcheck INTEGER,chars2 CHAR(15)[], nullVarchar VARCHAR[], nullBigInt 
BIGINT[],double2 DOUBLE,integer1 INTEGER,oneItem VARCHAR[],char2 
char(15),varchar1 VARCHAR)";
+   conn.createStatement().execute(ddl);
+   String dml = "UPSERT INTO " + tableName
+   + 
"(region_name,varchars,integers,doubles,bigints,chars,double1,char1,nullcheck,chars2,double2,integer1,oneItem,char2,varchar1)
 VALUES('SF Bay Area',"
+   + "ARRAY['2345','46345','23234']," + 
"ARRAY[2345,46345,23234,456],"
+   + "ARRAY[10.0,23.45,46.345,23.234,45.6,5.78]," 
+ "ARRAY[12,34,56,78,910],"
+   + "ARRAY['a','','c','ddd','e','c']," + 
"23.45," + "'wert'," + "NULL,"
+   + "ARRAY['a','','c','ddd','e','foo']," + 
"12," + "12," + "ARRAY['alone'],'2345','a')";
+   PreparedStatement stmt = conn.prepareStatement(dml);
+   stmt.execute();
+   conn.commit();
+   return tableName;
+   }
+
+   @Test
+   public void testEmptyArrayModification() throws Exception {
+   ResultSet rs = conn.createStatement()
+   .executeQuery("SELECT 
ARRAY_REMOVE(nullVarChar,'34567') FROM " + tableName + " LIMIT 1");
+   

[3/5] phoenix git commit: PHOENIX-4660 Use TransactionProvider interface

2018-03-23 Thread pboado
PHOENIX-4660 Use TransactionProvider interface


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

Branch: refs/heads/4.x-cdh5.13
Commit: af0f68b919087553f9356142c223829ae5cf1bff
Parents: c1827f2
Author: James Taylor 
Authored: Sat Mar 17 22:16:24 2018 +
Committer: Pedro Boado 
Committed: Fri Mar 23 21:31:53 2018 +

--
 .../phoenix/tx/FlappingTransactionIT.java   |   8 +-
 .../PhoenixTransactionalProcessor.java  |   2 +-
 .../apache/phoenix/execute/MutationState.java   |   8 +-
 .../PhoenixTxIndexMutationGenerator.java|   2 +-
 .../apache/phoenix/index/IndexMaintainer.java   |   2 +-
 .../index/IndexMetaDataCacheFactory.java|   2 +-
 .../index/PhoenixIndexMetaDataBuilder.java  |   2 +-
 .../query/ConnectionQueryServicesImpl.java  |   2 +-
 .../query/ConnectionlessQueryServicesImpl.java  |   2 +-
 .../transaction/OmidTransactionProvider.java|  78 +
 .../transaction/TephraTransactionProvider.java  |  76 
 .../phoenix/transaction/TransactionFactory.java | 117 ++-
 .../transaction/TransactionProvider.java|  36 ++
 .../org/apache/phoenix/util/PhoenixRuntime.java |   2 +-
 .../apache/phoenix/util/TransactionUtil.java|   4 +-
 .../java/org/apache/phoenix/query/BaseTest.java |   6 +-
 16 files changed, 218 insertions(+), 131 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/af0f68b9/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
index 301768b..200cf1c 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
@@ -225,9 +225,9 @@ public class FlappingTransactionIT extends 
ParallelStatsDisabledIT {
 }
 
 PhoenixTransactionContext txContext =
-  
TransactionFactory.getTransactionFactory().getTransactionContext(pconn);
+  
TransactionFactory.getTransactionProvider().getTransactionContext(pconn);
 PhoenixTransactionalTable txTable =
-  
TransactionFactory.getTransactionFactory().getTransactionalTable(txContext, 
htable);
+  
TransactionFactory.getTransactionProvider().getTransactionalTable(txContext, 
htable);
 
 txContext.begin();
 
@@ -277,9 +277,9 @@ public class FlappingTransactionIT extends 
ParallelStatsDisabledIT {
 
 // Repeat the same as above, but this time abort the transaction
 txContext =
-  
TransactionFactory.getTransactionFactory().getTransactionContext(pconn);
+  
TransactionFactory.getTransactionProvider().getTransactionContext(pconn);
 txTable =
-  
TransactionFactory.getTransactionFactory().getTransactionalTable(txContext, 
htable);
+  
TransactionFactory.getTransactionProvider().getTransactionalTable(txContext, 
htable);
 
 txContext.begin();
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/af0f68b9/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
index ca0c997..0c26ecc 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
@@ -22,7 +22,7 @@ import org.apache.phoenix.transaction.TransactionFactory;
 public class PhoenixTransactionalProcessor extends DelegateRegionObserver {
 
 public PhoenixTransactionalProcessor() {
-
super(TransactionFactory.getTransactionFactory().getTransactionContext().getCoprocessor());
+
super(TransactionFactory.getTransactionProvider().getTransactionContext().getCoprocessor());
 }
 
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/af0f68b9/phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java 

[2/5] phoenix git commit: PHOENIX-4619 Process transactional updates to local index on server-side

2018-03-23 Thread pboado
PHOENIX-4619 Process transactional updates to local index on server-side


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

Branch: refs/heads/4.x-cdh5.13
Commit: c1827f2408fa118be269efc79eaadacd6de48bc9
Parents: 03fedf6
Author: James Taylor 
Authored: Sat Mar 17 19:52:38 2018 +
Committer: Pedro Boado 
Committed: Fri Mar 23 21:31:42 2018 +

--
 .../phoenix/end2end/index/BaseIndexIT.java  |  16 +-
 .../phoenix/end2end/index/ImmutableIndexIT.java |   3 +-
 .../end2end/index/MutableIndexFailureIT.java|   8 +-
 .../apache/phoenix/compile/DeleteCompiler.java  |  36 +-
 .../PhoenixTransactionalProcessor.java  |   2 +-
 .../apache/phoenix/execute/MutationState.java   | 103 +++-
 .../PhoenixTxIndexMutationGenerator.java| 449 
 .../PhoenixTxnIndexMutationGenerator.java   | 519 ---
 .../org/apache/phoenix/hbase/index/Indexer.java |   1 -
 .../hbase/index/builder/BaseIndexBuilder.java   |   4 +-
 .../hbase/index/builder/BaseIndexCodec.java |   7 -
 .../phoenix/hbase/index/covered/IndexCodec.java |  14 +-
 .../hbase/index/covered/LocalTableState.java|  10 +-
 .../hbase/index/covered/NonTxIndexBuilder.java  |   2 +-
 .../phoenix/hbase/index/covered/TableState.java |   8 -
 .../apache/phoenix/index/IndexMaintainer.java   |  23 +-
 .../phoenix/index/PhoenixIndexBuilder.java  |  21 +-
 .../apache/phoenix/index/PhoenixIndexCodec.java |  34 +-
 .../phoenix/index/PhoenixIndexMetaData.java |  78 +--
 .../index/PhoenixIndexMetaDataBuilder.java  | 106 
 .../index/PhoenixTransactionalIndexer.java  | 442 +---
 .../query/ConnectionQueryServicesImpl.java  |   8 +
 .../transaction/OmidTransactionContext.java |   2 +-
 .../transaction/PhoenixTransactionContext.java  |   2 +-
 .../transaction/TephraTransactionContext.java   |   2 +-
 .../index/covered/CoveredColumnIndexCodec.java  |   6 +-
 .../covered/CoveredIndexCodecForTesting.java|   5 +-
 .../index/covered/LocalTableStateTest.java  |  10 +-
 .../index/covered/NonTxIndexBuilderTest.java|   3 +
 .../covered/TestCoveredColumnIndexCodec.java|   6 +-
 30 files changed, 785 insertions(+), 1145 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c1827f24/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
index 1483c58..f914256 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
@@ -239,15 +239,17 @@ public abstract class BaseIndexIT extends 
ParallelStatsDisabledIT {
 }
 
 private void assertNoClientSideIndexMutations(Connection conn) throws 
SQLException {
-if (mutable) {
-Iterator> iterator = 
PhoenixRuntime.getUncommittedDataIterator(conn);
-if (iterator.hasNext()) {
-byte[] tableName = iterator.next().getFirst(); // skip data 
table mutations
-PTable table = PhoenixRuntime.getTable(conn, 
Bytes.toString(tableName));
+Iterator> iterator = 
PhoenixRuntime.getUncommittedDataIterator(conn);
+if (iterator.hasNext()) {
+byte[] tableName = iterator.next().getFirst(); // skip data table 
mutations
+PTable table = PhoenixRuntime.getTable(conn, 
Bytes.toString(tableName));
+boolean clientSideUpdate = !localIndex && (!mutable || 
transactional);
+if (!clientSideUpdate) {
 assertTrue(table.getType() == PTableType.TABLE); // should be 
data table
-boolean hasIndexData = iterator.hasNext();
-assertFalse(hasIndexData && !transactional); // should have no 
index data
 }
+boolean hasIndexData = iterator.hasNext();
+// global immutable and global transactional tables are processed 
client side
+assertEquals(clientSideUpdate, hasIndexData); 
 }
 }
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c1827f24/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
 

[1/5] phoenix git commit: PHOENIX-4619 Process transactional updates to local index on server-side [Forced Update!]

2018-03-23 Thread pboado
Repository: phoenix
Updated Branches:
  refs/heads/4.x-cdh5.13 f56d99138 -> 1d0339005 (forced update)


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c1827f24/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
index 9bd4db8..4f65416 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
@@ -21,7 +21,6 @@ import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.KeyValueUtil;
 import org.apache.hadoop.hbase.client.Mutation;
-import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
 import org.apache.hadoop.hbase.util.Pair;
 import org.apache.phoenix.hbase.index.ValueGetter;
 import org.apache.phoenix.hbase.index.covered.data.IndexMemStore;
@@ -44,7 +43,6 @@ import 
org.apache.phoenix.hbase.index.util.IndexManagementUtil;
 public class LocalTableState implements TableState {
 
 private long ts;
-private RegionCoprocessorEnvironment env;
 private KeyValueStore memstore;
 private LocalHBaseState table;
 private Mutation update;
@@ -54,8 +52,7 @@ public class LocalTableState implements TableState {
 private List hints;
 private CoveredColumns columnSet;
 
-public LocalTableState(RegionCoprocessorEnvironment environment, 
LocalHBaseState table, Mutation update) {
-this.env = environment;
+public LocalTableState(LocalHBaseState table, Mutation update) {
 this.table = table;
 this.update = update;
 this.memstore = new IndexMemStore();
@@ -104,11 +101,6 @@ public class LocalTableState implements TableState {
 }
 
 @Override
-public RegionCoprocessorEnvironment getEnvironment() {
-return this.env;
-}
-
-@Override
 public long getCurrentTimestamp() {
 return this.ts;
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c1827f24/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
index 8dd57c0..97ac30d 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
@@ -51,7 +51,7 @@ public class NonTxIndexBuilder extends BaseIndexBuilder {
 @Override
 public Collection> getIndexUpdate(Mutation 
mutation, IndexMetaData indexMetaData) throws IOException {
// create a state manager, so we can manage each batch
-LocalTableState state = new LocalTableState(env, localTable, mutation);
+LocalTableState state = new LocalTableState(localTable, mutation);
 // build the index updates for each group
 IndexUpdateManager manager = new IndexUpdateManager(indexMetaData);
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c1827f24/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
index 605cbe3..cb2b41f 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
@@ -23,7 +23,6 @@ import java.util.Collection;
 import java.util.List;
 
 import org.apache.hadoop.hbase.KeyValue;
-import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
 import org.apache.hadoop.hbase.util.Pair;
 import org.apache.phoenix.hbase.index.ValueGetter;
 import org.apache.phoenix.hbase.index.covered.update.ColumnReference;
@@ -36,13 +35,6 @@ import 
org.apache.phoenix.hbase.index.covered.update.IndexedColumnGroup;
  */
 public interface TableState {
 
-  // use this to get batch ids/ptable stuff
-  /**
-   * WARNING: messing with this can affect the indexing plumbing. Use with 
caution :)
-   * @return get the current environment in which this table lives.
-   */
-  public RegionCoprocessorEnvironment getEnvironment();
-
   /**
* @return the current timestamp up-to-which we are releasing table state.
*/


[3/5] phoenix git commit: PHOENIX-4660 Use TransactionProvider interface

2018-03-23 Thread pboado
PHOENIX-4660 Use TransactionProvider interface


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

Branch: refs/heads/4.x-cdh5.12
Commit: af0f68b919087553f9356142c223829ae5cf1bff
Parents: c1827f2
Author: James Taylor 
Authored: Sat Mar 17 22:16:24 2018 +
Committer: Pedro Boado 
Committed: Fri Mar 23 21:31:53 2018 +

--
 .../phoenix/tx/FlappingTransactionIT.java   |   8 +-
 .../PhoenixTransactionalProcessor.java  |   2 +-
 .../apache/phoenix/execute/MutationState.java   |   8 +-
 .../PhoenixTxIndexMutationGenerator.java|   2 +-
 .../apache/phoenix/index/IndexMaintainer.java   |   2 +-
 .../index/IndexMetaDataCacheFactory.java|   2 +-
 .../index/PhoenixIndexMetaDataBuilder.java  |   2 +-
 .../query/ConnectionQueryServicesImpl.java  |   2 +-
 .../query/ConnectionlessQueryServicesImpl.java  |   2 +-
 .../transaction/OmidTransactionProvider.java|  78 +
 .../transaction/TephraTransactionProvider.java  |  76 
 .../phoenix/transaction/TransactionFactory.java | 117 ++-
 .../transaction/TransactionProvider.java|  36 ++
 .../org/apache/phoenix/util/PhoenixRuntime.java |   2 +-
 .../apache/phoenix/util/TransactionUtil.java|   4 +-
 .../java/org/apache/phoenix/query/BaseTest.java |   6 +-
 16 files changed, 218 insertions(+), 131 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/af0f68b9/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
index 301768b..200cf1c 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
@@ -225,9 +225,9 @@ public class FlappingTransactionIT extends 
ParallelStatsDisabledIT {
 }
 
 PhoenixTransactionContext txContext =
-  
TransactionFactory.getTransactionFactory().getTransactionContext(pconn);
+  
TransactionFactory.getTransactionProvider().getTransactionContext(pconn);
 PhoenixTransactionalTable txTable =
-  
TransactionFactory.getTransactionFactory().getTransactionalTable(txContext, 
htable);
+  
TransactionFactory.getTransactionProvider().getTransactionalTable(txContext, 
htable);
 
 txContext.begin();
 
@@ -277,9 +277,9 @@ public class FlappingTransactionIT extends 
ParallelStatsDisabledIT {
 
 // Repeat the same as above, but this time abort the transaction
 txContext =
-  
TransactionFactory.getTransactionFactory().getTransactionContext(pconn);
+  
TransactionFactory.getTransactionProvider().getTransactionContext(pconn);
 txTable =
-  
TransactionFactory.getTransactionFactory().getTransactionalTable(txContext, 
htable);
+  
TransactionFactory.getTransactionProvider().getTransactionalTable(txContext, 
htable);
 
 txContext.begin();
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/af0f68b9/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
index ca0c997..0c26ecc 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
@@ -22,7 +22,7 @@ import org.apache.phoenix.transaction.TransactionFactory;
 public class PhoenixTransactionalProcessor extends DelegateRegionObserver {
 
 public PhoenixTransactionalProcessor() {
-
super(TransactionFactory.getTransactionFactory().getTransactionContext().getCoprocessor());
+
super(TransactionFactory.getTransactionProvider().getTransactionContext().getCoprocessor());
 }
 
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/af0f68b9/phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java 

[2/5] phoenix git commit: PHOENIX-4619 Process transactional updates to local index on server-side

2018-03-23 Thread pboado
PHOENIX-4619 Process transactional updates to local index on server-side


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

Branch: refs/heads/4.x-cdh5.12
Commit: c1827f2408fa118be269efc79eaadacd6de48bc9
Parents: 03fedf6
Author: James Taylor 
Authored: Sat Mar 17 19:52:38 2018 +
Committer: Pedro Boado 
Committed: Fri Mar 23 21:31:42 2018 +

--
 .../phoenix/end2end/index/BaseIndexIT.java  |  16 +-
 .../phoenix/end2end/index/ImmutableIndexIT.java |   3 +-
 .../end2end/index/MutableIndexFailureIT.java|   8 +-
 .../apache/phoenix/compile/DeleteCompiler.java  |  36 +-
 .../PhoenixTransactionalProcessor.java  |   2 +-
 .../apache/phoenix/execute/MutationState.java   | 103 +++-
 .../PhoenixTxIndexMutationGenerator.java| 449 
 .../PhoenixTxnIndexMutationGenerator.java   | 519 ---
 .../org/apache/phoenix/hbase/index/Indexer.java |   1 -
 .../hbase/index/builder/BaseIndexBuilder.java   |   4 +-
 .../hbase/index/builder/BaseIndexCodec.java |   7 -
 .../phoenix/hbase/index/covered/IndexCodec.java |  14 +-
 .../hbase/index/covered/LocalTableState.java|  10 +-
 .../hbase/index/covered/NonTxIndexBuilder.java  |   2 +-
 .../phoenix/hbase/index/covered/TableState.java |   8 -
 .../apache/phoenix/index/IndexMaintainer.java   |  23 +-
 .../phoenix/index/PhoenixIndexBuilder.java  |  21 +-
 .../apache/phoenix/index/PhoenixIndexCodec.java |  34 +-
 .../phoenix/index/PhoenixIndexMetaData.java |  78 +--
 .../index/PhoenixIndexMetaDataBuilder.java  | 106 
 .../index/PhoenixTransactionalIndexer.java  | 442 +---
 .../query/ConnectionQueryServicesImpl.java  |   8 +
 .../transaction/OmidTransactionContext.java |   2 +-
 .../transaction/PhoenixTransactionContext.java  |   2 +-
 .../transaction/TephraTransactionContext.java   |   2 +-
 .../index/covered/CoveredColumnIndexCodec.java  |   6 +-
 .../covered/CoveredIndexCodecForTesting.java|   5 +-
 .../index/covered/LocalTableStateTest.java  |  10 +-
 .../index/covered/NonTxIndexBuilderTest.java|   3 +
 .../covered/TestCoveredColumnIndexCodec.java|   6 +-
 30 files changed, 785 insertions(+), 1145 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c1827f24/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
index 1483c58..f914256 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
@@ -239,15 +239,17 @@ public abstract class BaseIndexIT extends 
ParallelStatsDisabledIT {
 }
 
 private void assertNoClientSideIndexMutations(Connection conn) throws 
SQLException {
-if (mutable) {
-Iterator> iterator = 
PhoenixRuntime.getUncommittedDataIterator(conn);
-if (iterator.hasNext()) {
-byte[] tableName = iterator.next().getFirst(); // skip data 
table mutations
-PTable table = PhoenixRuntime.getTable(conn, 
Bytes.toString(tableName));
+Iterator> iterator = 
PhoenixRuntime.getUncommittedDataIterator(conn);
+if (iterator.hasNext()) {
+byte[] tableName = iterator.next().getFirst(); // skip data table 
mutations
+PTable table = PhoenixRuntime.getTable(conn, 
Bytes.toString(tableName));
+boolean clientSideUpdate = !localIndex && (!mutable || 
transactional);
+if (!clientSideUpdate) {
 assertTrue(table.getType() == PTableType.TABLE); // should be 
data table
-boolean hasIndexData = iterator.hasNext();
-assertFalse(hasIndexData && !transactional); // should have no 
index data
 }
+boolean hasIndexData = iterator.hasNext();
+// global immutable and global transactional tables are processed 
client side
+assertEquals(clientSideUpdate, hasIndexData); 
 }
 }
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c1827f24/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
 

[4/5] phoenix git commit: PHOENIX-4643 Implement ARRAY_REMOVE built in function (Xavier Jodoin)

2018-03-23 Thread pboado
PHOENIX-4643 Implement ARRAY_REMOVE built in function (Xavier Jodoin)


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

Branch: refs/heads/4.x-cdh5.12
Commit: 881d7aacbc443e8e4b82015bf193a2a26f121745
Parents: af0f68b
Author: James Taylor 
Authored: Fri Mar 23 19:00:45 2018 +
Committer: Pedro Boado 
Committed: Fri Mar 23 21:32:03 2018 +

--
 .../phoenix/end2end/ArrayRemoveFunctionIT.java  | 383 +++
 .../phoenix/expression/ExpressionType.java  |  10 +-
 .../function/ArrayRemoveFunction.java   |  88 +
 .../expression/ArrayRemoveFunctionTest.java | 285 ++
 4 files changed, 762 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/881d7aac/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
new file mode 100644
index 000..b5a468c
--- /dev/null
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
@@ -0,0 +1,383 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.phoenix.end2end;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+
+import org.apache.phoenix.schema.TypeMismatchException;
+import org.junit.Before;
+import org.junit.Test;
+
+public class ArrayRemoveFunctionIT extends ParallelStatsDisabledIT {
+
+   private Connection conn;
+   private String tableName;
+
+   @Before
+   public void setup() throws Exception {
+   conn = DriverManager.getConnection(getUrl());
+   tableName = initTables(conn);
+   }
+
+   private String initTables(Connection conn) throws Exception {
+   String tableName = generateUniqueName();
+   String ddl = "CREATE TABLE " + tableName
+   + " (region_name VARCHAR PRIMARY KEY,varchars 
VARCHAR[],integers INTEGER[],doubles DOUBLE[],bigints BIGINT[],"
+   + "chars CHAR(15)[],double1 DOUBLE,char1 
CHAR(17),nullcheck INTEGER,chars2 CHAR(15)[], nullVarchar VARCHAR[], nullBigInt 
BIGINT[],double2 DOUBLE,integer1 INTEGER,oneItem VARCHAR[],char2 
char(15),varchar1 VARCHAR)";
+   conn.createStatement().execute(ddl);
+   String dml = "UPSERT INTO " + tableName
+   + 
"(region_name,varchars,integers,doubles,bigints,chars,double1,char1,nullcheck,chars2,double2,integer1,oneItem,char2,varchar1)
 VALUES('SF Bay Area',"
+   + "ARRAY['2345','46345','23234']," + 
"ARRAY[2345,46345,23234,456],"
+   + "ARRAY[10.0,23.45,46.345,23.234,45.6,5.78]," 
+ "ARRAY[12,34,56,78,910],"
+   + "ARRAY['a','','c','ddd','e','c']," + 
"23.45," + "'wert'," + "NULL,"
+   + "ARRAY['a','','c','ddd','e','foo']," + 
"12," + "12," + "ARRAY['alone'],'2345','a')";
+   PreparedStatement stmt = conn.prepareStatement(dml);
+   stmt.execute();
+   conn.commit();
+   return tableName;
+   }
+
+   @Test
+   public void testEmptyArrayModification() throws Exception {
+   ResultSet rs = conn.createStatement()
+   .executeQuery("SELECT 
ARRAY_REMOVE(nullVarChar,'34567') FROM " + tableName + " LIMIT 1");
+   

[5/5] phoenix git commit: Changes for CDH 5.12.x

2018-03-23 Thread pboado
Changes for CDH 5.12.x


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

Branch: refs/heads/4.x-cdh5.12
Commit: e6bda5f670ded702a0c2749bef40644d0fa925c2
Parents: 881d7aa
Author: Pedro Boado 
Authored: Sat Mar 10 17:54:04 2018 +
Committer: Pedro Boado 
Committed: Fri Mar 23 21:33:02 2018 +

--
 phoenix-assembly/pom.xml|  2 +-
 phoenix-client/pom.xml  |  2 +-
 phoenix-core/pom.xml|  2 +-
 .../hadoop/hbase/ipc/PhoenixRpcScheduler.java   | 34 ++--
 phoenix-flume/pom.xml   |  2 +-
 phoenix-hive/pom.xml|  2 +-
 phoenix-kafka/pom.xml   |  2 +-
 phoenix-load-balancer/pom.xml   |  2 +-
 phoenix-parcel/pom.xml  |  2 +-
 phoenix-pherf/pom.xml   |  2 +-
 phoenix-pig/pom.xml |  2 +-
 phoenix-queryserver-client/pom.xml  |  2 +-
 phoenix-queryserver/pom.xml |  2 +-
 phoenix-server/pom.xml  |  2 +-
 phoenix-spark/pom.xml   |  2 +-
 phoenix-tracing-webapp/pom.xml  |  2 +-
 pom.xml |  4 +--
 17 files changed, 49 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/e6bda5f6/phoenix-assembly/pom.xml
--
diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml
index 55a9a6e..14225ee 100644
--- a/phoenix-assembly/pom.xml
+++ b/phoenix-assembly/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-cdh5.11.2-SNAPSHOT
+4.14.0-cdh5.12.2-SNAPSHOT
   
   phoenix-assembly
   Phoenix Assembly

http://git-wip-us.apache.org/repos/asf/phoenix/blob/e6bda5f6/phoenix-client/pom.xml
--
diff --git a/phoenix-client/pom.xml b/phoenix-client/pom.xml
index 2454de6..e211008 100644
--- a/phoenix-client/pom.xml
+++ b/phoenix-client/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-cdh5.11.2-SNAPSHOT
+4.14.0-cdh5.12.2-SNAPSHOT
   
   phoenix-client
   Phoenix Client

http://git-wip-us.apache.org/repos/asf/phoenix/blob/e6bda5f6/phoenix-core/pom.xml
--
diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml
index 2cb4c81..bda85eb 100644
--- a/phoenix-core/pom.xml
+++ b/phoenix-core/pom.xml
@@ -4,7 +4,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-cdh5.11.2-SNAPSHOT
+4.14.0-cdh5.12.2-SNAPSHOT
   
   phoenix-core
   Phoenix Core

http://git-wip-us.apache.org/repos/asf/phoenix/blob/e6bda5f6/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
 
b/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
index 4fdddf5..d1f05f8 100644
--- 
a/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
+++ 
b/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
@@ -124,6 +124,36 @@ public class PhoenixRpcScheduler extends RpcScheduler {
 public void setMetadataExecutorForTesting(RpcExecutor executor) {
 this.metadataCallExecutor = executor;
 }
-
-
+
+@Override
+public int getReadQueueLength() {
+return delegate.getReadQueueLength();
+}
+
+@Override
+public int getWriteQueueLength() {
+return delegate.getWriteQueueLength();
+}
+
+@Override
+public int getScanQueueLength() {
+return delegate.getScanQueueLength();
+}
+
+@Override
+public int getActiveReadRpcHandlerCount() {
+return delegate.getActiveReadRpcHandlerCount();
+}
+
+@Override
+public int getActiveWriteRpcHandlerCount() {
+return delegate.getActiveWriteRpcHandlerCount();
+}
+
+@Override
+public int getActiveScanRpcHandlerCount() {
+return delegate.getActiveScanRpcHandlerCount();
+}
+
+
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/e6bda5f6/phoenix-flume/pom.xml
--
diff --git a/phoenix-flume/pom.xml b/phoenix-flume/pom.xml
index 0883e5e..e1bde63 100644
--- a/phoenix-flume/pom.xml
+++ b/phoenix-flume/pom.xml
@@ -26,7 +26,7 @@
   
 

[1/5] phoenix git commit: PHOENIX-4619 Process transactional updates to local index on server-side [Forced Update!]

2018-03-23 Thread pboado
Repository: phoenix
Updated Branches:
  refs/heads/4.x-cdh5.12 5f9cb7ae4 -> e6bda5f67 (forced update)


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c1827f24/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
index 9bd4db8..4f65416 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
@@ -21,7 +21,6 @@ import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.KeyValueUtil;
 import org.apache.hadoop.hbase.client.Mutation;
-import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
 import org.apache.hadoop.hbase.util.Pair;
 import org.apache.phoenix.hbase.index.ValueGetter;
 import org.apache.phoenix.hbase.index.covered.data.IndexMemStore;
@@ -44,7 +43,6 @@ import 
org.apache.phoenix.hbase.index.util.IndexManagementUtil;
 public class LocalTableState implements TableState {
 
 private long ts;
-private RegionCoprocessorEnvironment env;
 private KeyValueStore memstore;
 private LocalHBaseState table;
 private Mutation update;
@@ -54,8 +52,7 @@ public class LocalTableState implements TableState {
 private List hints;
 private CoveredColumns columnSet;
 
-public LocalTableState(RegionCoprocessorEnvironment environment, 
LocalHBaseState table, Mutation update) {
-this.env = environment;
+public LocalTableState(LocalHBaseState table, Mutation update) {
 this.table = table;
 this.update = update;
 this.memstore = new IndexMemStore();
@@ -104,11 +101,6 @@ public class LocalTableState implements TableState {
 }
 
 @Override
-public RegionCoprocessorEnvironment getEnvironment() {
-return this.env;
-}
-
-@Override
 public long getCurrentTimestamp() {
 return this.ts;
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c1827f24/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
index 8dd57c0..97ac30d 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
@@ -51,7 +51,7 @@ public class NonTxIndexBuilder extends BaseIndexBuilder {
 @Override
 public Collection> getIndexUpdate(Mutation 
mutation, IndexMetaData indexMetaData) throws IOException {
// create a state manager, so we can manage each batch
-LocalTableState state = new LocalTableState(env, localTable, mutation);
+LocalTableState state = new LocalTableState(localTable, mutation);
 // build the index updates for each group
 IndexUpdateManager manager = new IndexUpdateManager(indexMetaData);
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c1827f24/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
index 605cbe3..cb2b41f 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
@@ -23,7 +23,6 @@ import java.util.Collection;
 import java.util.List;
 
 import org.apache.hadoop.hbase.KeyValue;
-import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
 import org.apache.hadoop.hbase.util.Pair;
 import org.apache.phoenix.hbase.index.ValueGetter;
 import org.apache.phoenix.hbase.index.covered.update.ColumnReference;
@@ -36,13 +35,6 @@ import 
org.apache.phoenix.hbase.index.covered.update.IndexedColumnGroup;
  */
 public interface TableState {
 
-  // use this to get batch ids/ptable stuff
-  /**
-   * WARNING: messing with this can affect the indexing plumbing. Use with 
caution :)
-   * @return get the current environment in which this table lives.
-   */
-  public RegionCoprocessorEnvironment getEnvironment();
-
   /**
* @return the current timestamp up-to-which we are releasing table state.
*/


[2/4] phoenix git commit: PHOENIX-4619 Process transactional updates to local index on server-side

2018-03-23 Thread pboado
PHOENIX-4619 Process transactional updates to local index on server-side


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

Branch: refs/heads/4.x-cdh5.11
Commit: c1827f2408fa118be269efc79eaadacd6de48bc9
Parents: 03fedf6
Author: James Taylor 
Authored: Sat Mar 17 19:52:38 2018 +
Committer: Pedro Boado 
Committed: Fri Mar 23 21:31:42 2018 +

--
 .../phoenix/end2end/index/BaseIndexIT.java  |  16 +-
 .../phoenix/end2end/index/ImmutableIndexIT.java |   3 +-
 .../end2end/index/MutableIndexFailureIT.java|   8 +-
 .../apache/phoenix/compile/DeleteCompiler.java  |  36 +-
 .../PhoenixTransactionalProcessor.java  |   2 +-
 .../apache/phoenix/execute/MutationState.java   | 103 +++-
 .../PhoenixTxIndexMutationGenerator.java| 449 
 .../PhoenixTxnIndexMutationGenerator.java   | 519 ---
 .../org/apache/phoenix/hbase/index/Indexer.java |   1 -
 .../hbase/index/builder/BaseIndexBuilder.java   |   4 +-
 .../hbase/index/builder/BaseIndexCodec.java |   7 -
 .../phoenix/hbase/index/covered/IndexCodec.java |  14 +-
 .../hbase/index/covered/LocalTableState.java|  10 +-
 .../hbase/index/covered/NonTxIndexBuilder.java  |   2 +-
 .../phoenix/hbase/index/covered/TableState.java |   8 -
 .../apache/phoenix/index/IndexMaintainer.java   |  23 +-
 .../phoenix/index/PhoenixIndexBuilder.java  |  21 +-
 .../apache/phoenix/index/PhoenixIndexCodec.java |  34 +-
 .../phoenix/index/PhoenixIndexMetaData.java |  78 +--
 .../index/PhoenixIndexMetaDataBuilder.java  | 106 
 .../index/PhoenixTransactionalIndexer.java  | 442 +---
 .../query/ConnectionQueryServicesImpl.java  |   8 +
 .../transaction/OmidTransactionContext.java |   2 +-
 .../transaction/PhoenixTransactionContext.java  |   2 +-
 .../transaction/TephraTransactionContext.java   |   2 +-
 .../index/covered/CoveredColumnIndexCodec.java  |   6 +-
 .../covered/CoveredIndexCodecForTesting.java|   5 +-
 .../index/covered/LocalTableStateTest.java  |  10 +-
 .../index/covered/NonTxIndexBuilderTest.java|   3 +
 .../covered/TestCoveredColumnIndexCodec.java|   6 +-
 30 files changed, 785 insertions(+), 1145 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c1827f24/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
index 1483c58..f914256 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
@@ -239,15 +239,17 @@ public abstract class BaseIndexIT extends 
ParallelStatsDisabledIT {
 }
 
 private void assertNoClientSideIndexMutations(Connection conn) throws 
SQLException {
-if (mutable) {
-Iterator> iterator = 
PhoenixRuntime.getUncommittedDataIterator(conn);
-if (iterator.hasNext()) {
-byte[] tableName = iterator.next().getFirst(); // skip data 
table mutations
-PTable table = PhoenixRuntime.getTable(conn, 
Bytes.toString(tableName));
+Iterator> iterator = 
PhoenixRuntime.getUncommittedDataIterator(conn);
+if (iterator.hasNext()) {
+byte[] tableName = iterator.next().getFirst(); // skip data table 
mutations
+PTable table = PhoenixRuntime.getTable(conn, 
Bytes.toString(tableName));
+boolean clientSideUpdate = !localIndex && (!mutable || 
transactional);
+if (!clientSideUpdate) {
 assertTrue(table.getType() == PTableType.TABLE); // should be 
data table
-boolean hasIndexData = iterator.hasNext();
-assertFalse(hasIndexData && !transactional); // should have no 
index data
 }
+boolean hasIndexData = iterator.hasNext();
+// global immutable and global transactional tables are processed 
client side
+assertEquals(clientSideUpdate, hasIndexData); 
 }
 }
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c1827f24/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
 

[3/4] phoenix git commit: PHOENIX-4660 Use TransactionProvider interface

2018-03-23 Thread pboado
PHOENIX-4660 Use TransactionProvider interface


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

Branch: refs/heads/4.x-cdh5.11
Commit: af0f68b919087553f9356142c223829ae5cf1bff
Parents: c1827f2
Author: James Taylor 
Authored: Sat Mar 17 22:16:24 2018 +
Committer: Pedro Boado 
Committed: Fri Mar 23 21:31:53 2018 +

--
 .../phoenix/tx/FlappingTransactionIT.java   |   8 +-
 .../PhoenixTransactionalProcessor.java  |   2 +-
 .../apache/phoenix/execute/MutationState.java   |   8 +-
 .../PhoenixTxIndexMutationGenerator.java|   2 +-
 .../apache/phoenix/index/IndexMaintainer.java   |   2 +-
 .../index/IndexMetaDataCacheFactory.java|   2 +-
 .../index/PhoenixIndexMetaDataBuilder.java  |   2 +-
 .../query/ConnectionQueryServicesImpl.java  |   2 +-
 .../query/ConnectionlessQueryServicesImpl.java  |   2 +-
 .../transaction/OmidTransactionProvider.java|  78 +
 .../transaction/TephraTransactionProvider.java  |  76 
 .../phoenix/transaction/TransactionFactory.java | 117 ++-
 .../transaction/TransactionProvider.java|  36 ++
 .../org/apache/phoenix/util/PhoenixRuntime.java |   2 +-
 .../apache/phoenix/util/TransactionUtil.java|   4 +-
 .../java/org/apache/phoenix/query/BaseTest.java |   6 +-
 16 files changed, 218 insertions(+), 131 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/af0f68b9/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
index 301768b..200cf1c 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
@@ -225,9 +225,9 @@ public class FlappingTransactionIT extends 
ParallelStatsDisabledIT {
 }
 
 PhoenixTransactionContext txContext =
-  
TransactionFactory.getTransactionFactory().getTransactionContext(pconn);
+  
TransactionFactory.getTransactionProvider().getTransactionContext(pconn);
 PhoenixTransactionalTable txTable =
-  
TransactionFactory.getTransactionFactory().getTransactionalTable(txContext, 
htable);
+  
TransactionFactory.getTransactionProvider().getTransactionalTable(txContext, 
htable);
 
 txContext.begin();
 
@@ -277,9 +277,9 @@ public class FlappingTransactionIT extends 
ParallelStatsDisabledIT {
 
 // Repeat the same as above, but this time abort the transaction
 txContext =
-  
TransactionFactory.getTransactionFactory().getTransactionContext(pconn);
+  
TransactionFactory.getTransactionProvider().getTransactionContext(pconn);
 txTable =
-  
TransactionFactory.getTransactionFactory().getTransactionalTable(txContext, 
htable);
+  
TransactionFactory.getTransactionProvider().getTransactionalTable(txContext, 
htable);
 
 txContext.begin();
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/af0f68b9/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
index ca0c997..0c26ecc 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
@@ -22,7 +22,7 @@ import org.apache.phoenix.transaction.TransactionFactory;
 public class PhoenixTransactionalProcessor extends DelegateRegionObserver {
 
 public PhoenixTransactionalProcessor() {
-
super(TransactionFactory.getTransactionFactory().getTransactionContext().getCoprocessor());
+
super(TransactionFactory.getTransactionProvider().getTransactionContext().getCoprocessor());
 }
 
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/af0f68b9/phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java 

[1/4] phoenix git commit: PHOENIX-4619 Process transactional updates to local index on server-side

2018-03-23 Thread pboado
Repository: phoenix
Updated Branches:
  refs/heads/4.x-cdh5.11 03fedf6ca -> 881d7aacb


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c1827f24/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
index 9bd4db8..4f65416 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
@@ -21,7 +21,6 @@ import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.KeyValueUtil;
 import org.apache.hadoop.hbase.client.Mutation;
-import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
 import org.apache.hadoop.hbase.util.Pair;
 import org.apache.phoenix.hbase.index.ValueGetter;
 import org.apache.phoenix.hbase.index.covered.data.IndexMemStore;
@@ -44,7 +43,6 @@ import 
org.apache.phoenix.hbase.index.util.IndexManagementUtil;
 public class LocalTableState implements TableState {
 
 private long ts;
-private RegionCoprocessorEnvironment env;
 private KeyValueStore memstore;
 private LocalHBaseState table;
 private Mutation update;
@@ -54,8 +52,7 @@ public class LocalTableState implements TableState {
 private List hints;
 private CoveredColumns columnSet;
 
-public LocalTableState(RegionCoprocessorEnvironment environment, 
LocalHBaseState table, Mutation update) {
-this.env = environment;
+public LocalTableState(LocalHBaseState table, Mutation update) {
 this.table = table;
 this.update = update;
 this.memstore = new IndexMemStore();
@@ -104,11 +101,6 @@ public class LocalTableState implements TableState {
 }
 
 @Override
-public RegionCoprocessorEnvironment getEnvironment() {
-return this.env;
-}
-
-@Override
 public long getCurrentTimestamp() {
 return this.ts;
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c1827f24/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
index 8dd57c0..97ac30d 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
@@ -51,7 +51,7 @@ public class NonTxIndexBuilder extends BaseIndexBuilder {
 @Override
 public Collection> getIndexUpdate(Mutation 
mutation, IndexMetaData indexMetaData) throws IOException {
// create a state manager, so we can manage each batch
-LocalTableState state = new LocalTableState(env, localTable, mutation);
+LocalTableState state = new LocalTableState(localTable, mutation);
 // build the index updates for each group
 IndexUpdateManager manager = new IndexUpdateManager(indexMetaData);
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c1827f24/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
index 605cbe3..cb2b41f 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
@@ -23,7 +23,6 @@ import java.util.Collection;
 import java.util.List;
 
 import org.apache.hadoop.hbase.KeyValue;
-import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
 import org.apache.hadoop.hbase.util.Pair;
 import org.apache.phoenix.hbase.index.ValueGetter;
 import org.apache.phoenix.hbase.index.covered.update.ColumnReference;
@@ -36,13 +35,6 @@ import 
org.apache.phoenix.hbase.index.covered.update.IndexedColumnGroup;
  */
 public interface TableState {
 
-  // use this to get batch ids/ptable stuff
-  /**
-   * WARNING: messing with this can affect the indexing plumbing. Use with 
caution :)
-   * @return get the current environment in which this table lives.
-   */
-  public RegionCoprocessorEnvironment getEnvironment();
-
   /**
* @return the current timestamp up-to-which we are releasing table state.
*/


[4/4] phoenix git commit: PHOENIX-4643 Implement ARRAY_REMOVE built in function (Xavier Jodoin)

2018-03-23 Thread pboado
PHOENIX-4643 Implement ARRAY_REMOVE built in function (Xavier Jodoin)


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

Branch: refs/heads/4.x-cdh5.11
Commit: 881d7aacbc443e8e4b82015bf193a2a26f121745
Parents: af0f68b
Author: James Taylor 
Authored: Fri Mar 23 19:00:45 2018 +
Committer: Pedro Boado 
Committed: Fri Mar 23 21:32:03 2018 +

--
 .../phoenix/end2end/ArrayRemoveFunctionIT.java  | 383 +++
 .../phoenix/expression/ExpressionType.java  |  10 +-
 .../function/ArrayRemoveFunction.java   |  88 +
 .../expression/ArrayRemoveFunctionTest.java | 285 ++
 4 files changed, 762 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/881d7aac/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
new file mode 100644
index 000..b5a468c
--- /dev/null
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
@@ -0,0 +1,383 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.phoenix.end2end;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+
+import org.apache.phoenix.schema.TypeMismatchException;
+import org.junit.Before;
+import org.junit.Test;
+
+public class ArrayRemoveFunctionIT extends ParallelStatsDisabledIT {
+
+   private Connection conn;
+   private String tableName;
+
+   @Before
+   public void setup() throws Exception {
+   conn = DriverManager.getConnection(getUrl());
+   tableName = initTables(conn);
+   }
+
+   private String initTables(Connection conn) throws Exception {
+   String tableName = generateUniqueName();
+   String ddl = "CREATE TABLE " + tableName
+   + " (region_name VARCHAR PRIMARY KEY,varchars 
VARCHAR[],integers INTEGER[],doubles DOUBLE[],bigints BIGINT[],"
+   + "chars CHAR(15)[],double1 DOUBLE,char1 
CHAR(17),nullcheck INTEGER,chars2 CHAR(15)[], nullVarchar VARCHAR[], nullBigInt 
BIGINT[],double2 DOUBLE,integer1 INTEGER,oneItem VARCHAR[],char2 
char(15),varchar1 VARCHAR)";
+   conn.createStatement().execute(ddl);
+   String dml = "UPSERT INTO " + tableName
+   + 
"(region_name,varchars,integers,doubles,bigints,chars,double1,char1,nullcheck,chars2,double2,integer1,oneItem,char2,varchar1)
 VALUES('SF Bay Area',"
+   + "ARRAY['2345','46345','23234']," + 
"ARRAY[2345,46345,23234,456],"
+   + "ARRAY[10.0,23.45,46.345,23.234,45.6,5.78]," 
+ "ARRAY[12,34,56,78,910],"
+   + "ARRAY['a','','c','ddd','e','c']," + 
"23.45," + "'wert'," + "NULL,"
+   + "ARRAY['a','','c','ddd','e','foo']," + 
"12," + "12," + "ARRAY['alone'],'2345','a')";
+   PreparedStatement stmt = conn.prepareStatement(dml);
+   stmt.execute();
+   conn.commit();
+   return tableName;
+   }
+
+   @Test
+   public void testEmptyArrayModification() throws Exception {
+   ResultSet rs = conn.createStatement()
+   .executeQuery("SELECT 
ARRAY_REMOVE(nullVarChar,'34567') FROM " + tableName + " LIMIT 1");
+   

phoenix git commit: Changes for CDH 5.14.x

2018-03-23 Thread pboado
Repository: phoenix
Updated Branches:
  refs/heads/4.x-cdh5.14 [created] f86ada8c5


Changes for CDH 5.14.x


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

Branch: refs/heads/4.x-cdh5.14
Commit: f86ada8c5546998a41fe2966808a5e46201a3e72
Parents: 03fedf6
Author: Pedro Boado 
Authored: Sat Mar 10 17:54:04 2018 +
Committer: Pedro Boado 
Committed: Fri Mar 23 21:24:33 2018 +

--
 phoenix-assembly/pom.xml|  2 +-
 phoenix-client/pom.xml  |  2 +-
 phoenix-core/pom.xml|  2 +-
 .../hadoop/hbase/ipc/PhoenixRpcScheduler.java   | 34 ++--
 phoenix-flume/pom.xml   |  2 +-
 phoenix-hive/pom.xml|  2 +-
 phoenix-kafka/pom.xml   |  2 +-
 phoenix-load-balancer/pom.xml   |  2 +-
 phoenix-parcel/pom.xml  |  2 +-
 phoenix-pherf/pom.xml   |  2 +-
 phoenix-pig/pom.xml |  2 +-
 phoenix-queryserver-client/pom.xml  |  2 +-
 phoenix-queryserver/pom.xml |  2 +-
 phoenix-server/pom.xml  |  2 +-
 phoenix-spark/pom.xml   |  2 +-
 phoenix-tracing-webapp/pom.xml  |  2 +-
 pom.xml |  4 +--
 17 files changed, 49 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/f86ada8c/phoenix-assembly/pom.xml
--
diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml
index 55a9a6e..862ec23 100644
--- a/phoenix-assembly/pom.xml
+++ b/phoenix-assembly/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-cdh5.11.2-SNAPSHOT
+4.14.0-cdh5.14.0-SNAPSHOT
   
   phoenix-assembly
   Phoenix Assembly

http://git-wip-us.apache.org/repos/asf/phoenix/blob/f86ada8c/phoenix-client/pom.xml
--
diff --git a/phoenix-client/pom.xml b/phoenix-client/pom.xml
index 2454de6..470dd05 100644
--- a/phoenix-client/pom.xml
+++ b/phoenix-client/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-cdh5.11.2-SNAPSHOT
+4.14.0-cdh5.14.0-SNAPSHOT
   
   phoenix-client
   Phoenix Client

http://git-wip-us.apache.org/repos/asf/phoenix/blob/f86ada8c/phoenix-core/pom.xml
--
diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml
index 2cb4c81..d24dbea 100644
--- a/phoenix-core/pom.xml
+++ b/phoenix-core/pom.xml
@@ -4,7 +4,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-cdh5.11.2-SNAPSHOT
+4.14.0-cdh5.14.0-SNAPSHOT
   
   phoenix-core
   Phoenix Core

http://git-wip-us.apache.org/repos/asf/phoenix/blob/f86ada8c/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
 
b/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
index 4fdddf5..d1f05f8 100644
--- 
a/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
+++ 
b/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
@@ -124,6 +124,36 @@ public class PhoenixRpcScheduler extends RpcScheduler {
 public void setMetadataExecutorForTesting(RpcExecutor executor) {
 this.metadataCallExecutor = executor;
 }
-
-
+
+@Override
+public int getReadQueueLength() {
+return delegate.getReadQueueLength();
+}
+
+@Override
+public int getWriteQueueLength() {
+return delegate.getWriteQueueLength();
+}
+
+@Override
+public int getScanQueueLength() {
+return delegate.getScanQueueLength();
+}
+
+@Override
+public int getActiveReadRpcHandlerCount() {
+return delegate.getActiveReadRpcHandlerCount();
+}
+
+@Override
+public int getActiveWriteRpcHandlerCount() {
+return delegate.getActiveWriteRpcHandlerCount();
+}
+
+@Override
+public int getActiveScanRpcHandlerCount() {
+return delegate.getActiveScanRpcHandlerCount();
+}
+
+
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/f86ada8c/phoenix-flume/pom.xml
--
diff --git a/phoenix-flume/pom.xml b/phoenix-flume/pom.xml
index 0883e5e..a7aef39 

phoenix git commit: Changes for CDH 5.13.x

2018-03-23 Thread pboado
Repository: phoenix
Updated Branches:
  refs/heads/4.x-cdh5.13 [created] f56d99138


Changes for CDH 5.13.x


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

Branch: refs/heads/4.x-cdh5.13
Commit: f56d99138e4de9ba2e0e0d0355272c696a6e7a90
Parents: 03fedf6
Author: Pedro Boado 
Authored: Sat Mar 10 17:54:04 2018 +
Committer: Pedro Boado 
Committed: Fri Mar 23 21:22:58 2018 +

--
 phoenix-assembly/pom.xml|  2 +-
 phoenix-client/pom.xml  |  2 +-
 phoenix-core/pom.xml|  2 +-
 .../hadoop/hbase/ipc/PhoenixRpcScheduler.java   | 34 ++--
 phoenix-flume/pom.xml   |  2 +-
 phoenix-hive/pom.xml|  2 +-
 phoenix-kafka/pom.xml   |  2 +-
 phoenix-load-balancer/pom.xml   |  2 +-
 phoenix-parcel/pom.xml  |  2 +-
 phoenix-pherf/pom.xml   |  2 +-
 phoenix-pig/pom.xml |  2 +-
 phoenix-queryserver-client/pom.xml  |  2 +-
 phoenix-queryserver/pom.xml |  2 +-
 phoenix-server/pom.xml  |  2 +-
 phoenix-spark/pom.xml   |  2 +-
 phoenix-tracing-webapp/pom.xml  |  2 +-
 pom.xml |  4 +--
 17 files changed, 49 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/f56d9913/phoenix-assembly/pom.xml
--
diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml
index 55a9a6e..f0cd238 100644
--- a/phoenix-assembly/pom.xml
+++ b/phoenix-assembly/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-cdh5.11.2-SNAPSHOT
+4.14.0-cdh5.13.2-SNAPSHOT
   
   phoenix-assembly
   Phoenix Assembly

http://git-wip-us.apache.org/repos/asf/phoenix/blob/f56d9913/phoenix-client/pom.xml
--
diff --git a/phoenix-client/pom.xml b/phoenix-client/pom.xml
index 2454de6..b4da311 100644
--- a/phoenix-client/pom.xml
+++ b/phoenix-client/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-cdh5.11.2-SNAPSHOT
+4.14.0-cdh5.13.2-SNAPSHOT
   
   phoenix-client
   Phoenix Client

http://git-wip-us.apache.org/repos/asf/phoenix/blob/f56d9913/phoenix-core/pom.xml
--
diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml
index 2cb4c81..4dacc3f 100644
--- a/phoenix-core/pom.xml
+++ b/phoenix-core/pom.xml
@@ -4,7 +4,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-cdh5.11.2-SNAPSHOT
+4.14.0-cdh5.13.2-SNAPSHOT
   
   phoenix-core
   Phoenix Core

http://git-wip-us.apache.org/repos/asf/phoenix/blob/f56d9913/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
 
b/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
index 4fdddf5..d1f05f8 100644
--- 
a/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
+++ 
b/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
@@ -124,6 +124,36 @@ public class PhoenixRpcScheduler extends RpcScheduler {
 public void setMetadataExecutorForTesting(RpcExecutor executor) {
 this.metadataCallExecutor = executor;
 }
-
-
+
+@Override
+public int getReadQueueLength() {
+return delegate.getReadQueueLength();
+}
+
+@Override
+public int getWriteQueueLength() {
+return delegate.getWriteQueueLength();
+}
+
+@Override
+public int getScanQueueLength() {
+return delegate.getScanQueueLength();
+}
+
+@Override
+public int getActiveReadRpcHandlerCount() {
+return delegate.getActiveReadRpcHandlerCount();
+}
+
+@Override
+public int getActiveWriteRpcHandlerCount() {
+return delegate.getActiveWriteRpcHandlerCount();
+}
+
+@Override
+public int getActiveScanRpcHandlerCount() {
+return delegate.getActiveScanRpcHandlerCount();
+}
+
+
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/f56d9913/phoenix-flume/pom.xml
--
diff --git a/phoenix-flume/pom.xml b/phoenix-flume/pom.xml
index 0883e5e..925b26f 

phoenix git commit: Changes for CDH 5.12.x

2018-03-23 Thread pboado
Repository: phoenix
Updated Branches:
  refs/heads/4.x-cdh5.12 [created] 5f9cb7ae4


Changes for CDH 5.12.x


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

Branch: refs/heads/4.x-cdh5.12
Commit: 5f9cb7ae4d589e26f608d8f36863974d55e8a81e
Parents: 03fedf6
Author: Pedro Boado 
Authored: Sat Mar 10 17:54:04 2018 +
Committer: Pedro Boado 
Committed: Fri Mar 23 19:32:48 2018 +

--
 phoenix-assembly/pom.xml|  2 +-
 phoenix-client/pom.xml  |  2 +-
 phoenix-core/pom.xml|  2 +-
 .../hadoop/hbase/ipc/PhoenixRpcScheduler.java   | 34 ++--
 phoenix-flume/pom.xml   |  2 +-
 phoenix-hive/pom.xml|  2 +-
 phoenix-kafka/pom.xml   |  2 +-
 phoenix-load-balancer/pom.xml   |  2 +-
 phoenix-parcel/pom.xml  |  2 +-
 phoenix-pherf/pom.xml   |  2 +-
 phoenix-pig/pom.xml |  2 +-
 phoenix-queryserver-client/pom.xml  |  2 +-
 phoenix-queryserver/pom.xml |  2 +-
 phoenix-server/pom.xml  |  2 +-
 phoenix-spark/pom.xml   |  2 +-
 phoenix-tracing-webapp/pom.xml  |  2 +-
 pom.xml |  4 +--
 17 files changed, 49 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/5f9cb7ae/phoenix-assembly/pom.xml
--
diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml
index 55a9a6e..14225ee 100644
--- a/phoenix-assembly/pom.xml
+++ b/phoenix-assembly/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-cdh5.11.2-SNAPSHOT
+4.14.0-cdh5.12.2-SNAPSHOT
   
   phoenix-assembly
   Phoenix Assembly

http://git-wip-us.apache.org/repos/asf/phoenix/blob/5f9cb7ae/phoenix-client/pom.xml
--
diff --git a/phoenix-client/pom.xml b/phoenix-client/pom.xml
index 2454de6..e211008 100644
--- a/phoenix-client/pom.xml
+++ b/phoenix-client/pom.xml
@@ -27,7 +27,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-cdh5.11.2-SNAPSHOT
+4.14.0-cdh5.12.2-SNAPSHOT
   
   phoenix-client
   Phoenix Client

http://git-wip-us.apache.org/repos/asf/phoenix/blob/5f9cb7ae/phoenix-core/pom.xml
--
diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml
index 2cb4c81..bda85eb 100644
--- a/phoenix-core/pom.xml
+++ b/phoenix-core/pom.xml
@@ -4,7 +4,7 @@
   
 org.apache.phoenix
 phoenix
-4.14.0-cdh5.11.2-SNAPSHOT
+4.14.0-cdh5.12.2-SNAPSHOT
   
   phoenix-core
   Phoenix Core

http://git-wip-us.apache.org/repos/asf/phoenix/blob/5f9cb7ae/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
 
b/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
index 4fdddf5..d1f05f8 100644
--- 
a/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
+++ 
b/phoenix-core/src/main/java/org/apache/hadoop/hbase/ipc/PhoenixRpcScheduler.java
@@ -124,6 +124,36 @@ public class PhoenixRpcScheduler extends RpcScheduler {
 public void setMetadataExecutorForTesting(RpcExecutor executor) {
 this.metadataCallExecutor = executor;
 }
-
-
+
+@Override
+public int getReadQueueLength() {
+return delegate.getReadQueueLength();
+}
+
+@Override
+public int getWriteQueueLength() {
+return delegate.getWriteQueueLength();
+}
+
+@Override
+public int getScanQueueLength() {
+return delegate.getScanQueueLength();
+}
+
+@Override
+public int getActiveReadRpcHandlerCount() {
+return delegate.getActiveReadRpcHandlerCount();
+}
+
+@Override
+public int getActiveWriteRpcHandlerCount() {
+return delegate.getActiveWriteRpcHandlerCount();
+}
+
+@Override
+public int getActiveScanRpcHandlerCount() {
+return delegate.getActiveScanRpcHandlerCount();
+}
+
+
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/5f9cb7ae/phoenix-flume/pom.xml
--
diff --git a/phoenix-flume/pom.xml b/phoenix-flume/pom.xml
index 0883e5e..e1bde63 

Build failed in Jenkins: Phoenix-4.x-HBase-1.3 #74

2018-03-23 Thread Apache Jenkins Server
See 


Changes:

[jtaylor] PHOENIX-4643 Implement ARRAY_REMOVE built in function (Xavier Jodoin)

--
[...truncated 171.83 KB...]
at org.apache.hadoop.hbase.regionserver.HRegion.put(HRegion.java:2794)
at 
org.apache.tephra.hbase.coprocessor.TransactionProcessor.preDelete(TransactionProcessor.java:242)
at 
org.apache.phoenix.coprocessor.DelegateRegionObserver.preDelete(DelegateRegionObserver.java:422)
at 
org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost$33.call(RegionCoprocessorHost.java:974)
at 
org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost$RegionOperation.call(RegionCoprocessorHost.java:1673)
at 
org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.execOperation(RegionCoprocessorHost.java:1749)
at 
org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.execOperation(RegionCoprocessorHost.java:1705)
at 
org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.preDelete(RegionCoprocessorHost.java:970)
at 
org.apache.hadoop.hbase.regionserver.HRegion.doPreMutationHook(HRegion.java:3007)
at 
org.apache.hadoop.hbase.regionserver.HRegion.batchMutate(HRegion.java:2971)
at 
org.apache.hadoop.hbase.regionserver.HRegion.batchMutate(HRegion.java:2917)
at 
org.apache.hadoop.hbase.regionserver.RSRpcServices.doBatchOp(RSRpcServices.java:829)
at 
org.apache.hadoop.hbase.regionserver.RSRpcServices.doNonAtomicRegionMutation(RSRpcServices.java:791)
at 
org.apache.hadoop.hbase.regionserver.RSRpcServices.multi(RSRpcServices.java:2249)
at 
org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:34958)
at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2347)
at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:123)
at 
org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:188)
at 
org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:168)
Caused by: java.lang.NullPointerException
at 
org.apache.phoenix.util.TransactionUtil.convertIfDelete(TransactionUtil.java:105)
at 
org.apache.phoenix.index.PhoenixTransactionalIndexer.preBatchMutate(PhoenixTransactionalIndexer.java:194)
... 29 more
: 1 time, servers with issues: asf923.gq1.ygridcore.net,34992,1521836037291, 

[INFO] Running org.apache.phoenix.end2end.join.SubqueryIT
[INFO] Tests run: 33, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 187.659 
s - in org.apache.phoenix.end2end.join.HashJoinNoIndexIT
[INFO] Running org.apache.phoenix.end2end.join.SubqueryUsingSortMergeJoinIT
[INFO] Tests run: 33, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 335.753 
s - in org.apache.phoenix.end2end.join.HashJoinGlobalIndexIT
[INFO] Running org.apache.phoenix.end2end.salted.SaltedTableIT
[INFO] Tests run: 34, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 196.069 
s - in org.apache.phoenix.end2end.join.SortMergeJoinNoIndexIT
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 15.679 s 
- in org.apache.phoenix.end2end.salted.SaltedTableIT
[INFO] Running org.apache.phoenix.end2end.salted.SaltedTableVarLengthRowKeyIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.251 s 
- in org.apache.phoenix.end2end.salted.SaltedTableVarLengthRowKeyIT
[INFO] Running org.apache.phoenix.iterate.PhoenixQueryTimeoutIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.82 s - 
in org.apache.phoenix.iterate.PhoenixQueryTimeoutIT
[INFO] Running org.apache.phoenix.iterate.RoundRobinResultIteratorIT
[INFO] Tests run: 72, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 573.283 
s - in org.apache.phoenix.end2end.index.MutableIndexIT
[INFO] Running org.apache.phoenix.end2end.salted.SaltedTableUpsertSelectIT
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 28.128 s 
- in org.apache.phoenix.end2end.salted.SaltedTableUpsertSelectIT
[INFO] Running org.apache.phoenix.rpc.UpdateCacheIT
[INFO] Running org.apache.phoenix.replication.SystemCatalogWALEntryFilterIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.135 s 
- in org.apache.phoenix.replication.SystemCatalogWALEntryFilterIT
[INFO] Running org.apache.phoenix.trace.PhoenixTableMetricsWriterIT
[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 50.475 s 
- in org.apache.phoenix.iterate.RoundRobinResultIteratorIT
[INFO] Running org.apache.phoenix.trace.PhoenixTracingEndToEndIT
[INFO] Tests run: 34, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 341.97 
s - in org.apache.phoenix.end2end.join.SortMergeJoinGlobalIndexIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 12.298 s 
- in org.apache.phoenix.trace.PhoenixTableMetricsWriterIT
[INFO] Running 

[2/8] phoenix git commit: PHOENIX-4278 Implement pure client side transactional index maintenance (Ohad Shacham)

2018-03-23 Thread jamestaylor
PHOENIX-4278 Implement pure client side transactional index maintenance (Ohad 
Shacham)


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

Branch: refs/heads/4.x-HBase-0.98
Commit: 514f576c1528df43654362bd1519f4a2082ab80f
Parents: 70e1be9
Author: James Taylor 
Authored: Mon Feb 12 12:27:10 2018 -0800
Committer: James Taylor 
Committed: Fri Mar 23 13:13:58 2018 -0700

--
 .../phoenix/end2end/index/BaseIndexIT.java  |   2 +-
 .../phoenix/end2end/index/ImmutableIndexIT.java |   4 +-
 .../org/apache/phoenix/cache/HashCache.java |   1 +
 .../phoenix/cache/IndexMetaDataCache.java   |   8 +
 .../apache/phoenix/cache/ServerCacheClient.java |   7 +-
 .../org/apache/phoenix/cache/TenantCache.java   |   2 +-
 .../apache/phoenix/cache/TenantCacheImpl.java   |   4 +-
 .../apache/phoenix/compile/DeleteCompiler.java  |   3 +
 .../apache/phoenix/compile/UpsertCompiler.java  |   2 +
 .../coprocessor/MetaDataRegionObserver.java |   4 +-
 .../coprocessor/ServerCachingEndpointImpl.java  |   4 +-
 .../coprocessor/ServerCachingProtocol.java  |   2 +-
 .../UngroupedAggregateRegionObserver.java   |  41 +-
 .../generated/ServerCachingProtos.java  | 117 -
 .../apache/phoenix/execute/MutationState.java   |  30 +-
 .../PhoenixTxnIndexMutationGenerator.java   | 519 +++
 .../hbase/index/covered/LocalTableState.java|   6 -
 .../phoenix/hbase/index/covered/TableState.java |   7 -
 .../index/IndexMetaDataCacheFactory.java|   7 +-
 .../apache/phoenix/index/PhoenixIndexCodec.java |   3 +-
 .../phoenix/index/PhoenixIndexMetaData.java |  12 +
 .../index/PhoenixTransactionalIndexer.java  |   9 +-
 .../phoenix/jdbc/PhoenixDatabaseMetaData.java   |   1 +
 .../apache/phoenix/join/HashCacheFactory.java   |  15 +-
 .../index/PhoenixIndexPartialBuildMapper.java   |   5 +
 .../query/ConnectionQueryServicesImpl.java  |   8 -
 .../org/apache/phoenix/schema/PTableImpl.java   |  25 +-
 .../apache/phoenix/cache/TenantCacheTest.java   |  14 +-
 .../src/main/ServerCachingService.proto |   1 +
 29 files changed, 753 insertions(+), 110 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/514f576c/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
index b92da4a..1483c58 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
@@ -246,7 +246,7 @@ public abstract class BaseIndexIT extends 
ParallelStatsDisabledIT {
 PTable table = PhoenixRuntime.getTable(conn, 
Bytes.toString(tableName));
 assertTrue(table.getType() == PTableType.TABLE); // should be 
data table
 boolean hasIndexData = iterator.hasNext();
-assertFalse(hasIndexData); // should have no index data
+assertFalse(hasIndexData && !transactional); // should have no 
index data
 }
 }
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/514f576c/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
index e0398c7..d520824 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
@@ -75,6 +75,7 @@ import com.google.common.collect.Maps;
 public class ImmutableIndexIT extends BaseUniqueNamesOwnClusterIT {
 
 private final boolean localIndex;
+private final boolean transactional;
 private final String tableDDLOptions;
 
 private volatile boolean stopThreads = false;
@@ -86,6 +87,7 @@ public class ImmutableIndexIT extends 
BaseUniqueNamesOwnClusterIT {
 public ImmutableIndexIT(boolean localIndex, boolean transactional, boolean 
columnEncoded) {
 StringBuilder optionBuilder = new StringBuilder("IMMUTABLE_ROWS=true");
 this.localIndex = localIndex;
+this.transactional = transactional;
 if (!columnEncoded) {
 if (optionBuilder.length()!=0)
 optionBuilder.append(",");
@@ 

[1/8] phoenix git commit: PHOENIX-4278 Implement pure client side transactional index maintenance (Ohad Shacham)

2018-03-23 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-0.98 70e1be931 -> dbed33cad


http://git-wip-us.apache.org/repos/asf/phoenix/blob/514f576c/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/PhoenixIndexPartialBuildMapper.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/PhoenixIndexPartialBuildMapper.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/PhoenixIndexPartialBuildMapper.java
index 5b85da5..7c154f0 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/PhoenixIndexPartialBuildMapper.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/index/PhoenixIndexPartialBuildMapper.java
@@ -33,9 +33,11 @@ import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
 import org.apache.hadoop.hbase.mapreduce.TableMapper;
+import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.io.IntWritable;
 import org.apache.phoenix.cache.ServerCacheClient;
 import org.apache.phoenix.coprocessor.BaseScannerRegionObserver;
+import org.apache.phoenix.coprocessor.MetaDataProtocol;
 import org.apache.phoenix.hbase.index.util.ImmutableBytesPtr;
 import org.apache.phoenix.index.PhoenixIndexCodec;
 import org.apache.phoenix.jdbc.PhoenixConnection;
@@ -105,6 +107,7 @@ public class PhoenixIndexPartialBuildMapper extends 
TableMapperhttp://git-wip-us.apache.org/repos/asf/phoenix/blob/514f576c/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index 624544f..35f047f 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -177,7 +177,6 @@ import org.apache.phoenix.hbase.index.util.KeyValueBuilder;
 import org.apache.phoenix.hbase.index.util.VersionUtil;
 import org.apache.phoenix.index.PhoenixIndexBuilder;
 import org.apache.phoenix.index.PhoenixIndexCodec;
-import org.apache.phoenix.index.PhoenixTransactionalIndexer;
 import org.apache.phoenix.iterate.TableResultIterator;
 import org.apache.phoenix.iterate.TableResultIterator.RenewLeaseStatus;
 import org.apache.phoenix.jdbc.PhoenixConnection;
@@ -851,19 +850,12 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
 && !SchemaUtil.isMetaTable(tableName)
 && !SchemaUtil.isStatsTable(tableName)) {
 if (isTransactional) {
-if 
(!descriptor.hasCoprocessor(PhoenixTransactionalIndexer.class.getName())) {
-
descriptor.addCoprocessor(PhoenixTransactionalIndexer.class.getName(), null, 
priority, null);
-}
 // For alter table, remove non transactional index 
coprocessor
 if (descriptor.hasCoprocessor(Indexer.class.getName())) {
 descriptor.removeCoprocessor(Indexer.class.getName());
 }
 } else {
 if (!descriptor.hasCoprocessor(Indexer.class.getName())) {
-// If exception on alter table to transition back to 
non transactional
-if 
(descriptor.hasCoprocessor(PhoenixTransactionalIndexer.class.getName())) {
-
descriptor.removeCoprocessor(PhoenixTransactionalIndexer.class.getName());
-}
 Map opts = 
Maps.newHashMapWithExpectedSize(1);
 opts.put(NonTxIndexBuilder.CODEC_CLASS_NAME_KEY, 
PhoenixIndexCodec.class.getName());
 Indexer.enableIndexing(descriptor, 
PhoenixIndexBuilder.class, opts, priority);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/514f576c/phoenix-core/src/main/java/org/apache/phoenix/schema/PTableImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/PTableImpl.java 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/PTableImpl.java
index 9525127..fb30bc7 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/schema/PTableImpl.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/PTableImpl.java
@@ -1038,32 +1038,21 @@ public class PTableImpl implements PTable {
 @Override
 public void delete() {
 newMutations();
-// we're using the Tephra column family delete marker here to 
prevent the translation 
-// of deletes to puts by the Tephra's TransactionProcessor
- 

[7/8] phoenix git commit: PHOENIX-4660 Use TransactionProvider interface

2018-03-23 Thread jamestaylor
PHOENIX-4660 Use TransactionProvider interface


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

Branch: refs/heads/4.x-HBase-0.98
Commit: a751c6c055fd53aec81c03d9c330f936c8eb2dd9
Parents: e934f1c
Author: James Taylor 
Authored: Sat Mar 17 15:16:24 2018 -0700
Committer: James Taylor 
Committed: Fri Mar 23 13:32:23 2018 -0700

--
 .../phoenix/tx/FlappingTransactionIT.java   |   8 +-
 .../PhoenixTransactionalProcessor.java  |   2 +-
 .../apache/phoenix/execute/MutationState.java   |   8 +-
 .../PhoenixTxIndexMutationGenerator.java|   2 +-
 .../apache/phoenix/index/IndexMaintainer.java   |   2 +-
 .../index/IndexMetaDataCacheFactory.java|   2 +-
 .../index/PhoenixIndexMetaDataBuilder.java  |   2 +-
 .../query/ConnectionQueryServicesImpl.java  |   2 +-
 .../query/ConnectionlessQueryServicesImpl.java  |   2 +-
 .../transaction/OmidTransactionProvider.java|  78 +
 .../transaction/TephraTransactionProvider.java  |  76 
 .../phoenix/transaction/TransactionFactory.java | 117 ++-
 .../transaction/TransactionProvider.java|  36 ++
 .../org/apache/phoenix/util/PhoenixRuntime.java |   2 +-
 .../apache/phoenix/util/TransactionUtil.java|   4 +-
 .../java/org/apache/phoenix/query/BaseTest.java |   6 +-
 16 files changed, 218 insertions(+), 131 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/a751c6c0/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
index 166d83f..6ce8f5f 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
@@ -225,9 +225,9 @@ public class FlappingTransactionIT extends 
ParallelStatsDisabledIT {
 }
 
 PhoenixTransactionContext txContext =
-  
TransactionFactory.getTransactionFactory().getTransactionContext(pconn);
+  
TransactionFactory.getTransactionProvider().getTransactionContext(pconn);
 PhoenixTransactionalTable txTable =
-  
TransactionFactory.getTransactionFactory().getTransactionalTable(txContext, 
htable);
+  
TransactionFactory.getTransactionProvider().getTransactionalTable(txContext, 
htable);
 
 txContext.begin();
 
@@ -277,9 +277,9 @@ public class FlappingTransactionIT extends 
ParallelStatsDisabledIT {
 
 // Repeat the same as above, but this time abort the transaction
 txContext =
-  
TransactionFactory.getTransactionFactory().getTransactionContext(pconn);
+  
TransactionFactory.getTransactionProvider().getTransactionContext(pconn);
 txTable =
-  
TransactionFactory.getTransactionFactory().getTransactionalTable(txContext, 
htable);
+  
TransactionFactory.getTransactionProvider().getTransactionalTable(txContext, 
htable);
 
 txContext.begin();
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/a751c6c0/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
index ca0c997..0c26ecc 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
@@ -22,7 +22,7 @@ import org.apache.phoenix.transaction.TransactionFactory;
 public class PhoenixTransactionalProcessor extends DelegateRegionObserver {
 
 public PhoenixTransactionalProcessor() {
-
super(TransactionFactory.getTransactionFactory().getTransactionContext().getCoprocessor());
+
super(TransactionFactory.getTransactionProvider().getTransactionContext().getCoprocessor());
 }
 
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/a751c6c0/phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java 

[5/8] phoenix git commit: PHOENIX-4619 Process transactional updates to local index on server-side

2018-03-23 Thread jamestaylor
http://git-wip-us.apache.org/repos/asf/phoenix/blob/e934f1cb/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
index 9bd4db8..4f65416 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
@@ -21,7 +21,6 @@ import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.KeyValueUtil;
 import org.apache.hadoop.hbase.client.Mutation;
-import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
 import org.apache.hadoop.hbase.util.Pair;
 import org.apache.phoenix.hbase.index.ValueGetter;
 import org.apache.phoenix.hbase.index.covered.data.IndexMemStore;
@@ -44,7 +43,6 @@ import 
org.apache.phoenix.hbase.index.util.IndexManagementUtil;
 public class LocalTableState implements TableState {
 
 private long ts;
-private RegionCoprocessorEnvironment env;
 private KeyValueStore memstore;
 private LocalHBaseState table;
 private Mutation update;
@@ -54,8 +52,7 @@ public class LocalTableState implements TableState {
 private List hints;
 private CoveredColumns columnSet;
 
-public LocalTableState(RegionCoprocessorEnvironment environment, 
LocalHBaseState table, Mutation update) {
-this.env = environment;
+public LocalTableState(LocalHBaseState table, Mutation update) {
 this.table = table;
 this.update = update;
 this.memstore = new IndexMemStore();
@@ -104,11 +101,6 @@ public class LocalTableState implements TableState {
 }
 
 @Override
-public RegionCoprocessorEnvironment getEnvironment() {
-return this.env;
-}
-
-@Override
 public long getCurrentTimestamp() {
 return this.ts;
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/e934f1cb/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
index 8dd57c0..97ac30d 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
@@ -51,7 +51,7 @@ public class NonTxIndexBuilder extends BaseIndexBuilder {
 @Override
 public Collection> getIndexUpdate(Mutation 
mutation, IndexMetaData indexMetaData) throws IOException {
// create a state manager, so we can manage each batch
-LocalTableState state = new LocalTableState(env, localTable, mutation);
+LocalTableState state = new LocalTableState(localTable, mutation);
 // build the index updates for each group
 IndexUpdateManager manager = new IndexUpdateManager(indexMetaData);
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/e934f1cb/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
index 605cbe3..cb2b41f 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
@@ -23,7 +23,6 @@ import java.util.Collection;
 import java.util.List;
 
 import org.apache.hadoop.hbase.KeyValue;
-import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
 import org.apache.hadoop.hbase.util.Pair;
 import org.apache.phoenix.hbase.index.ValueGetter;
 import org.apache.phoenix.hbase.index.covered.update.ColumnReference;
@@ -36,13 +35,6 @@ import 
org.apache.phoenix.hbase.index.covered.update.IndexedColumnGroup;
  */
 public interface TableState {
 
-  // use this to get batch ids/ptable stuff
-  /**
-   * WARNING: messing with this can affect the indexing plumbing. Use with 
caution :)
-   * @return get the current environment in which this table lives.
-   */
-  public RegionCoprocessorEnvironment getEnvironment();
-
   /**
* @return the current timestamp up-to-which we are releasing table state.
*/

http://git-wip-us.apache.org/repos/asf/phoenix/blob/e934f1cb/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java
--
diff --git 

[3/8] phoenix git commit: PHOENIX-4603 Remove check for table existence in MetaDataClient.createTableInternal()

2018-03-23 Thread jamestaylor
PHOENIX-4603 Remove check for table existence in 
MetaDataClient.createTableInternal()


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

Branch: refs/heads/4.x-HBase-0.98
Commit: 41ea571b02ba3f5ed310680260ab9823195f4741
Parents: 514f576
Author: James Taylor 
Authored: Tue Feb 13 14:29:02 2018 -0800
Committer: James Taylor 
Committed: Fri Mar 23 13:14:41 2018 -0700

--
 .../apache/phoenix/end2end/DynamicColumnIT.java |  2 +-
 .../phoenix/end2end/MappingTableDataTypeIT.java |  2 +-
 .../end2end/NamespaceSchemaMappingIT.java   | 19 --
 .../apache/phoenix/schema/MetaDataClient.java   | 21 +---
 4 files changed, 11 insertions(+), 33 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/41ea571b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DynamicColumnIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DynamicColumnIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DynamicColumnIT.java
index 3f02113..f55d01a 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DynamicColumnIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DynamicColumnIT.java
@@ -106,7 +106,7 @@ public class DynamicColumnIT extends 
ParallelStatsDisabledIT {
 "A.F1v1 varchar," +
 "A.F1v2 varchar," +
 "B.F2v1 varchar" +
-"CONSTRAINT pk PRIMARY KEY (entry))");
+"CONSTRAINT pk PRIMARY KEY (entry)) 
COLUMN_ENCODED_BYTES=NONE");
 }
 
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/41ea571b/phoenix-core/src/it/java/org/apache/phoenix/end2end/MappingTableDataTypeIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/MappingTableDataTypeIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/MappingTableDataTypeIT.java
index 768b005..52e22bf 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/MappingTableDataTypeIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/MappingTableDataTypeIT.java
@@ -119,7 +119,7 @@ public class MappingTableDataTypeIT extends 
ParallelStatsDisabledIT {
  */
 private void createPhoenixTable(String tableName) throws SQLException {
 String ddl = "create table IF NOT EXISTS " + tableName+ " (" + " id 
varchar NOT NULL primary key,"
-+ " \"cf1\".\"q1\" varchar" + " ) ";
++ " \"cf1\".\"q1\" varchar" + " ) COLUMN_ENCODED_BYTES=NONE";
 Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
 Connection conn = DriverManager.getConnection(getUrl(), props);
 conn.createStatement().execute(ddl);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/41ea571b/phoenix-core/src/it/java/org/apache/phoenix/end2end/NamespaceSchemaMappingIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/NamespaceSchemaMappingIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/NamespaceSchemaMappingIT.java
index bebc41d..97735df 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/NamespaceSchemaMappingIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/NamespaceSchemaMappingIT.java
@@ -35,9 +35,9 @@ import org.apache.hadoop.hbase.client.Put;
 import org.apache.phoenix.jdbc.PhoenixConnection;
 import org.apache.phoenix.jdbc.PhoenixDatabaseMetaData;
 import org.apache.phoenix.query.QueryConstants;
-import org.apache.phoenix.query.QueryServices;
 import org.apache.phoenix.schema.types.PBoolean;
 import org.apache.phoenix.schema.types.PVarchar;
+import org.apache.phoenix.util.PropertiesUtil;
 import org.apache.phoenix.util.SchemaUtil;
 import org.apache.phoenix.util.TestUtil;
 import org.junit.Test;
@@ -55,7 +55,7 @@ public class NamespaceSchemaMappingIT extends 
ParallelStatsDisabledIT {
 @SuppressWarnings("deprecation")
 public void testBackWardCompatibility() throws Exception {
 
-String namespace = "TEST_SCHEMA";
+String namespace = generateUniqueName();
 String schemaName = namespace;
 String tableName = generateUniqueName();
 
@@ -75,24 +75,24 @@ public class NamespaceSchemaMappingIT extends 
ParallelStatsDisabledIT {
 QueryConstants.EMPTY_COLUMN_VALUE_BYTES);
 HTable phoenixSchematable = new HTable(admin.getConfiguration(), 
phoenixFullTableName);
   

[6/8] phoenix git commit: PHOENIX-4619 Process transactional updates to local index on server-side

2018-03-23 Thread jamestaylor
PHOENIX-4619 Process transactional updates to local index on server-side


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

Branch: refs/heads/4.x-HBase-0.98
Commit: e934f1cb0dfa6090a34d20c09bcdb2d1cbeabae5
Parents: 7d521ed
Author: James Taylor 
Authored: Sat Mar 17 12:52:38 2018 -0700
Committer: James Taylor 
Committed: Fri Mar 23 13:27:51 2018 -0700

--
 .../phoenix/end2end/index/BaseIndexIT.java  |  16 +-
 .../phoenix/end2end/index/ImmutableIndexIT.java |   3 +-
 .../end2end/index/MutableIndexFailureIT.java|   8 +-
 .../apache/phoenix/compile/DeleteCompiler.java  |  36 +-
 .../PhoenixTransactionalProcessor.java  |   2 +-
 .../apache/phoenix/execute/MutationState.java   | 103 +++-
 .../PhoenixTxIndexMutationGenerator.java| 449 
 .../PhoenixTxnIndexMutationGenerator.java   | 519 ---
 .../org/apache/phoenix/hbase/index/Indexer.java |   1 -
 .../hbase/index/builder/BaseIndexBuilder.java   |   4 +-
 .../hbase/index/builder/BaseIndexCodec.java |   7 -
 .../phoenix/hbase/index/covered/IndexCodec.java |  14 +-
 .../hbase/index/covered/LocalTableState.java|  10 +-
 .../hbase/index/covered/NonTxIndexBuilder.java  |   2 +-
 .../phoenix/hbase/index/covered/TableState.java |   8 -
 .../apache/phoenix/index/IndexMaintainer.java   |  23 +-
 .../phoenix/index/PhoenixIndexBuilder.java  |  21 +-
 .../apache/phoenix/index/PhoenixIndexCodec.java |  34 +-
 .../phoenix/index/PhoenixIndexMetaData.java |  78 +--
 .../index/PhoenixIndexMetaDataBuilder.java  | 106 
 .../index/PhoenixTransactionalIndexer.java  | 442 +---
 .../query/ConnectionQueryServicesImpl.java  |   8 +
 .../transaction/OmidTransactionContext.java |   2 +-
 .../transaction/PhoenixTransactionContext.java  |   2 +-
 .../transaction/TephraTransactionContext.java   |   2 +-
 .../index/covered/CoveredColumnIndexCodec.java  |   6 +-
 .../covered/CoveredIndexCodecForTesting.java|   5 +-
 .../index/covered/LocalTableStateTest.java  |  10 +-
 .../index/covered/NonTxIndexBuilderTest.java|   3 +
 .../covered/TestCoveredColumnIndexCodec.java|   6 +-
 30 files changed, 785 insertions(+), 1145 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/e934f1cb/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
index 1483c58..f914256 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
@@ -239,15 +239,17 @@ public abstract class BaseIndexIT extends 
ParallelStatsDisabledIT {
 }
 
 private void assertNoClientSideIndexMutations(Connection conn) throws 
SQLException {
-if (mutable) {
-Iterator> iterator = 
PhoenixRuntime.getUncommittedDataIterator(conn);
-if (iterator.hasNext()) {
-byte[] tableName = iterator.next().getFirst(); // skip data 
table mutations
-PTable table = PhoenixRuntime.getTable(conn, 
Bytes.toString(tableName));
+Iterator> iterator = 
PhoenixRuntime.getUncommittedDataIterator(conn);
+if (iterator.hasNext()) {
+byte[] tableName = iterator.next().getFirst(); // skip data table 
mutations
+PTable table = PhoenixRuntime.getTable(conn, 
Bytes.toString(tableName));
+boolean clientSideUpdate = !localIndex && (!mutable || 
transactional);
+if (!clientSideUpdate) {
 assertTrue(table.getType() == PTableType.TABLE); // should be 
data table
-boolean hasIndexData = iterator.hasNext();
-assertFalse(hasIndexData && !transactional); // should have no 
index data
 }
+boolean hasIndexData = iterator.hasNext();
+// global immutable and global transactional tables are processed 
client side
+assertEquals(clientSideUpdate, hasIndexData); 
 }
 }
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/e934f1cb/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
 

[4/8] phoenix git commit: PHOENIX-2566 Support NOT NULL constraint for any column for immutable table

2018-03-23 Thread jamestaylor
PHOENIX-2566 Support NOT NULL constraint for any column for immutable table


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

Branch: refs/heads/4.x-HBase-0.98
Commit: 7d521ed9e8e4790e556d6b3ce978addb5a2a46d1
Parents: 41ea571
Author: James Taylor 
Authored: Tue Feb 13 23:14:58 2018 -0800
Committer: James Taylor 
Committed: Fri Mar 23 13:16:59 2018 -0700

--
 .../apache/phoenix/end2end/AlterTableIT.java|  2 +-
 .../apache/phoenix/end2end/CreateTableIT.java   |  5 +-
 .../end2end/QueryDatabaseMetaDataIT.java|  4 +-
 .../compile/TupleProjectionCompiler.java|  3 +-
 .../apache/phoenix/compile/UpsertCompiler.java  | 38 
 .../phoenix/exception/SQLExceptionCode.java |  5 +-
 .../apache/phoenix/jdbc/PhoenixStatement.java   |  8 +-
 .../apache/phoenix/schema/MetaDataClient.java   | 37 
 .../org/apache/phoenix/schema/PColumnImpl.java  |  6 +-
 .../org/apache/phoenix/schema/PTableImpl.java   |  1 -
 .../org/apache/phoenix/util/SchemaUtil.java |  6 ++
 .../phoenix/compile/QueryCompilerTest.java  | 98 +++-
 12 files changed, 158 insertions(+), 55 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/7d521ed9/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 ab75d34..e6087b8 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
@@ -477,7 +477,7 @@ public class AlterTableIT extends ParallelStatsDisabledIT {
 stmt.execute();
 fail("Should have failed since altering a table by adding a 
non-nullable column is not allowed.");
 } catch (SQLException e) {
-
assertEquals(SQLExceptionCode.CANNOT_ADD_NOT_NULLABLE_COLUMN.getErrorCode(), 
e.getErrorCode());
+
assertEquals(SQLExceptionCode.KEY_VALUE_NOT_NULL.getErrorCode(), 
e.getErrorCode());
 } finally {
 closeStatement(stmt);
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/7d521ed9/phoenix-core/src/it/java/org/apache/phoenix/end2end/CreateTableIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CreateTableIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CreateTableIT.java
index 1abc653..491889d 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/CreateTableIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/CreateTableIT.java
@@ -36,7 +36,6 @@ import java.util.Properties;
 
 import org.apache.hadoop.hbase.HColumnDescriptor;
 import org.apache.hadoop.hbase.client.HBaseAdmin;
-import 
org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.GlobalPermissionOrBuilder;
 import org.apache.hadoop.hbase.regionserver.BloomType;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.phoenix.exception.SQLExceptionCode;
@@ -416,7 +415,7 @@ public class CreateTableIT extends ParallelStatsDisabledIT {
 conn.createStatement().execute(ddl);
 fail(" Non pk column ENTRY_POINT_NAME has a NOT NULL constraint");
 } catch (SQLException sqle) {
-
assertEquals(SQLExceptionCode.INVALID_NOT_NULL_CONSTRAINT.getErrorCode(),
+assertEquals(SQLExceptionCode.KEY_VALUE_NOT_NULL.getErrorCode(),
 sqle.getErrorCode());
 }
 }
@@ -432,7 +431,7 @@ public class CreateTableIT extends ParallelStatsDisabledIT {
 conn.createStatement().execute(ddl);
 fail(" Non pk column V has a NOT NULL constraint");
 } catch (SQLException sqle) {
-
assertEquals(SQLExceptionCode.INVALID_NOT_NULL_CONSTRAINT.getErrorCode(),
+assertEquals(SQLExceptionCode.KEY_VALUE_NOT_NULL.getErrorCode(),
 sqle.getErrorCode());
 }
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/7d521ed9/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryDatabaseMetaDataIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryDatabaseMetaDataIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryDatabaseMetaDataIT.java
index 8615bac..7a2d3e1 100644
--- 

[8/8] phoenix git commit: PHOENIX-4643 Implement ARRAY_REMOVE built in function (Xavier Jodoin)

2018-03-23 Thread jamestaylor
PHOENIX-4643 Implement ARRAY_REMOVE built in function (Xavier Jodoin)


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

Branch: refs/heads/4.x-HBase-0.98
Commit: dbed33cadf284d0774131d11f59d9e26d1d4
Parents: a751c6c
Author: James Taylor 
Authored: Fri Mar 23 12:00:45 2018 -0700
Committer: James Taylor 
Committed: Fri Mar 23 13:32:45 2018 -0700

--
 .../phoenix/end2end/ArrayRemoveFunctionIT.java  | 383 +++
 .../phoenix/expression/ExpressionType.java  |  10 +-
 .../function/ArrayRemoveFunction.java   |  88 +
 .../expression/ArrayRemoveFunctionTest.java | 285 ++
 4 files changed, 762 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/dbed33ca/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
new file mode 100644
index 000..b5a468c
--- /dev/null
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
@@ -0,0 +1,383 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.phoenix.end2end;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+
+import org.apache.phoenix.schema.TypeMismatchException;
+import org.junit.Before;
+import org.junit.Test;
+
+public class ArrayRemoveFunctionIT extends ParallelStatsDisabledIT {
+
+   private Connection conn;
+   private String tableName;
+
+   @Before
+   public void setup() throws Exception {
+   conn = DriverManager.getConnection(getUrl());
+   tableName = initTables(conn);
+   }
+
+   private String initTables(Connection conn) throws Exception {
+   String tableName = generateUniqueName();
+   String ddl = "CREATE TABLE " + tableName
+   + " (region_name VARCHAR PRIMARY KEY,varchars 
VARCHAR[],integers INTEGER[],doubles DOUBLE[],bigints BIGINT[],"
+   + "chars CHAR(15)[],double1 DOUBLE,char1 
CHAR(17),nullcheck INTEGER,chars2 CHAR(15)[], nullVarchar VARCHAR[], nullBigInt 
BIGINT[],double2 DOUBLE,integer1 INTEGER,oneItem VARCHAR[],char2 
char(15),varchar1 VARCHAR)";
+   conn.createStatement().execute(ddl);
+   String dml = "UPSERT INTO " + tableName
+   + 
"(region_name,varchars,integers,doubles,bigints,chars,double1,char1,nullcheck,chars2,double2,integer1,oneItem,char2,varchar1)
 VALUES('SF Bay Area',"
+   + "ARRAY['2345','46345','23234']," + 
"ARRAY[2345,46345,23234,456],"
+   + "ARRAY[10.0,23.45,46.345,23.234,45.6,5.78]," 
+ "ARRAY[12,34,56,78,910],"
+   + "ARRAY['a','','c','ddd','e','c']," + 
"23.45," + "'wert'," + "NULL,"
+   + "ARRAY['a','','c','ddd','e','foo']," + 
"12," + "12," + "ARRAY['alone'],'2345','a')";
+   PreparedStatement stmt = conn.prepareStatement(dml);
+   stmt.execute();
+   conn.commit();
+   return tableName;
+   }
+
+   @Test
+   public void testEmptyArrayModification() throws Exception {
+   ResultSet rs = conn.createStatement()
+   .executeQuery("SELECT 
ARRAY_REMOVE(nullVarChar,'34567') FROM " + tableName + " LIMIT 1");
+   

[3/4] phoenix git commit: PHOENIX-4660 Use TransactionProvider interface

2018-03-23 Thread jamestaylor
PHOENIX-4660 Use TransactionProvider interface


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

Branch: refs/heads/4.x-cdh5.11.2
Commit: 6c1d6c2c1205f751104ca970924be933754a9ef8
Parents: a9dcf3f
Author: James Taylor 
Authored: Sat Mar 17 15:16:24 2018 -0700
Committer: James Taylor 
Committed: Fri Mar 23 12:31:08 2018 -0700

--
 .../phoenix/tx/FlappingTransactionIT.java   |   8 +-
 .../PhoenixTransactionalProcessor.java  |   2 +-
 .../apache/phoenix/execute/MutationState.java   |   8 +-
 .../PhoenixTxIndexMutationGenerator.java|   2 +-
 .../apache/phoenix/index/IndexMaintainer.java   |   2 +-
 .../index/IndexMetaDataCacheFactory.java|   2 +-
 .../index/PhoenixIndexMetaDataBuilder.java  |   2 +-
 .../query/ConnectionQueryServicesImpl.java  |   2 +-
 .../query/ConnectionlessQueryServicesImpl.java  |   2 +-
 .../transaction/OmidTransactionProvider.java|  78 +
 .../transaction/TephraTransactionProvider.java  |  76 
 .../phoenix/transaction/TransactionFactory.java | 117 ++-
 .../transaction/TransactionProvider.java|  36 ++
 .../org/apache/phoenix/util/PhoenixRuntime.java |   2 +-
 .../apache/phoenix/util/TransactionUtil.java|   4 +-
 .../java/org/apache/phoenix/query/BaseTest.java |   6 +-
 16 files changed, 218 insertions(+), 131 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/6c1d6c2c/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
index 301768b..200cf1c 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
@@ -225,9 +225,9 @@ public class FlappingTransactionIT extends 
ParallelStatsDisabledIT {
 }
 
 PhoenixTransactionContext txContext =
-  
TransactionFactory.getTransactionFactory().getTransactionContext(pconn);
+  
TransactionFactory.getTransactionProvider().getTransactionContext(pconn);
 PhoenixTransactionalTable txTable =
-  
TransactionFactory.getTransactionFactory().getTransactionalTable(txContext, 
htable);
+  
TransactionFactory.getTransactionProvider().getTransactionalTable(txContext, 
htable);
 
 txContext.begin();
 
@@ -277,9 +277,9 @@ public class FlappingTransactionIT extends 
ParallelStatsDisabledIT {
 
 // Repeat the same as above, but this time abort the transaction
 txContext =
-  
TransactionFactory.getTransactionFactory().getTransactionContext(pconn);
+  
TransactionFactory.getTransactionProvider().getTransactionContext(pconn);
 txTable =
-  
TransactionFactory.getTransactionFactory().getTransactionalTable(txContext, 
htable);
+  
TransactionFactory.getTransactionProvider().getTransactionalTable(txContext, 
htable);
 
 txContext.begin();
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/6c1d6c2c/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
index ca0c997..0c26ecc 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
@@ -22,7 +22,7 @@ import org.apache.phoenix.transaction.TransactionFactory;
 public class PhoenixTransactionalProcessor extends DelegateRegionObserver {
 
 public PhoenixTransactionalProcessor() {
-
super(TransactionFactory.getTransactionFactory().getTransactionContext().getCoprocessor());
+
super(TransactionFactory.getTransactionProvider().getTransactionContext().getCoprocessor());
 }
 
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/6c1d6c2c/phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java 

[4/4] phoenix git commit: PHOENIX-4643 Implement ARRAY_REMOVE built in function (Xavier Jodoin)

2018-03-23 Thread jamestaylor
PHOENIX-4643 Implement ARRAY_REMOVE built in function (Xavier Jodoin)


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

Branch: refs/heads/4.x-cdh5.11.2
Commit: cdb77d468bc5bc8bbba8eef11935ff79620a3106
Parents: 6c1d6c2
Author: James Taylor 
Authored: Fri Mar 23 12:00:45 2018 -0700
Committer: James Taylor 
Committed: Fri Mar 23 12:31:22 2018 -0700

--
 .../phoenix/end2end/ArrayRemoveFunctionIT.java  | 383 +++
 .../phoenix/expression/ExpressionType.java  |  10 +-
 .../function/ArrayRemoveFunction.java   |  88 +
 .../expression/ArrayRemoveFunctionTest.java | 285 ++
 4 files changed, 762 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/cdb77d46/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
new file mode 100644
index 000..b5a468c
--- /dev/null
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
@@ -0,0 +1,383 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.phoenix.end2end;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+
+import org.apache.phoenix.schema.TypeMismatchException;
+import org.junit.Before;
+import org.junit.Test;
+
+public class ArrayRemoveFunctionIT extends ParallelStatsDisabledIT {
+
+   private Connection conn;
+   private String tableName;
+
+   @Before
+   public void setup() throws Exception {
+   conn = DriverManager.getConnection(getUrl());
+   tableName = initTables(conn);
+   }
+
+   private String initTables(Connection conn) throws Exception {
+   String tableName = generateUniqueName();
+   String ddl = "CREATE TABLE " + tableName
+   + " (region_name VARCHAR PRIMARY KEY,varchars 
VARCHAR[],integers INTEGER[],doubles DOUBLE[],bigints BIGINT[],"
+   + "chars CHAR(15)[],double1 DOUBLE,char1 
CHAR(17),nullcheck INTEGER,chars2 CHAR(15)[], nullVarchar VARCHAR[], nullBigInt 
BIGINT[],double2 DOUBLE,integer1 INTEGER,oneItem VARCHAR[],char2 
char(15),varchar1 VARCHAR)";
+   conn.createStatement().execute(ddl);
+   String dml = "UPSERT INTO " + tableName
+   + 
"(region_name,varchars,integers,doubles,bigints,chars,double1,char1,nullcheck,chars2,double2,integer1,oneItem,char2,varchar1)
 VALUES('SF Bay Area',"
+   + "ARRAY['2345','46345','23234']," + 
"ARRAY[2345,46345,23234,456],"
+   + "ARRAY[10.0,23.45,46.345,23.234,45.6,5.78]," 
+ "ARRAY[12,34,56,78,910],"
+   + "ARRAY['a','','c','ddd','e','c']," + 
"23.45," + "'wert'," + "NULL,"
+   + "ARRAY['a','','c','ddd','e','foo']," + 
"12," + "12," + "ARRAY['alone'],'2345','a')";
+   PreparedStatement stmt = conn.prepareStatement(dml);
+   stmt.execute();
+   conn.commit();
+   return tableName;
+   }
+
+   @Test
+   public void testEmptyArrayModification() throws Exception {
+   ResultSet rs = conn.createStatement()
+   .executeQuery("SELECT 
ARRAY_REMOVE(nullVarChar,'34567') FROM " + tableName + " LIMIT 1");
+   

[1/4] phoenix git commit: PHOENIX-4619 Process transactional updates to local index on server-side

2018-03-23 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-cdh5.11.2 [created] cdb77d468


http://git-wip-us.apache.org/repos/asf/phoenix/blob/a9dcf3f3/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
index 9bd4db8..4f65416 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
@@ -21,7 +21,6 @@ import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.KeyValueUtil;
 import org.apache.hadoop.hbase.client.Mutation;
-import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
 import org.apache.hadoop.hbase.util.Pair;
 import org.apache.phoenix.hbase.index.ValueGetter;
 import org.apache.phoenix.hbase.index.covered.data.IndexMemStore;
@@ -44,7 +43,6 @@ import 
org.apache.phoenix.hbase.index.util.IndexManagementUtil;
 public class LocalTableState implements TableState {
 
 private long ts;
-private RegionCoprocessorEnvironment env;
 private KeyValueStore memstore;
 private LocalHBaseState table;
 private Mutation update;
@@ -54,8 +52,7 @@ public class LocalTableState implements TableState {
 private List hints;
 private CoveredColumns columnSet;
 
-public LocalTableState(RegionCoprocessorEnvironment environment, 
LocalHBaseState table, Mutation update) {
-this.env = environment;
+public LocalTableState(LocalHBaseState table, Mutation update) {
 this.table = table;
 this.update = update;
 this.memstore = new IndexMemStore();
@@ -104,11 +101,6 @@ public class LocalTableState implements TableState {
 }
 
 @Override
-public RegionCoprocessorEnvironment getEnvironment() {
-return this.env;
-}
-
-@Override
 public long getCurrentTimestamp() {
 return this.ts;
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/a9dcf3f3/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
index 8dd57c0..97ac30d 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
@@ -51,7 +51,7 @@ public class NonTxIndexBuilder extends BaseIndexBuilder {
 @Override
 public Collection> getIndexUpdate(Mutation 
mutation, IndexMetaData indexMetaData) throws IOException {
// create a state manager, so we can manage each batch
-LocalTableState state = new LocalTableState(env, localTable, mutation);
+LocalTableState state = new LocalTableState(localTable, mutation);
 // build the index updates for each group
 IndexUpdateManager manager = new IndexUpdateManager(indexMetaData);
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/a9dcf3f3/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
index 605cbe3..cb2b41f 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
@@ -23,7 +23,6 @@ import java.util.Collection;
 import java.util.List;
 
 import org.apache.hadoop.hbase.KeyValue;
-import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
 import org.apache.hadoop.hbase.util.Pair;
 import org.apache.phoenix.hbase.index.ValueGetter;
 import org.apache.phoenix.hbase.index.covered.update.ColumnReference;
@@ -36,13 +35,6 @@ import 
org.apache.phoenix.hbase.index.covered.update.IndexedColumnGroup;
  */
 public interface TableState {
 
-  // use this to get batch ids/ptable stuff
-  /**
-   * WARNING: messing with this can affect the indexing plumbing. Use with 
caution :)
-   * @return get the current environment in which this table lives.
-   */
-  public RegionCoprocessorEnvironment getEnvironment();
-
   /**
* @return the current timestamp up-to-which we are releasing table state.
*/


[2/4] phoenix git commit: PHOENIX-4619 Process transactional updates to local index on server-side

2018-03-23 Thread jamestaylor
PHOENIX-4619 Process transactional updates to local index on server-side


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

Branch: refs/heads/4.x-cdh5.11.2
Commit: a9dcf3f375cd72d032aa5f4f6fd21a1bed6b8dc2
Parents: a41c7f4
Author: James Taylor 
Authored: Sat Mar 17 12:52:38 2018 -0700
Committer: James Taylor 
Committed: Fri Mar 23 12:30:43 2018 -0700

--
 .../phoenix/end2end/index/BaseIndexIT.java  |  16 +-
 .../phoenix/end2end/index/ImmutableIndexIT.java |   3 +-
 .../end2end/index/MutableIndexFailureIT.java|   8 +-
 .../apache/phoenix/compile/DeleteCompiler.java  |  36 +-
 .../PhoenixTransactionalProcessor.java  |   2 +-
 .../apache/phoenix/execute/MutationState.java   | 103 +++-
 .../PhoenixTxIndexMutationGenerator.java| 449 
 .../PhoenixTxnIndexMutationGenerator.java   | 519 ---
 .../org/apache/phoenix/hbase/index/Indexer.java |   1 -
 .../hbase/index/builder/BaseIndexBuilder.java   |   4 +-
 .../hbase/index/builder/BaseIndexCodec.java |   7 -
 .../phoenix/hbase/index/covered/IndexCodec.java |  14 +-
 .../hbase/index/covered/LocalTableState.java|  10 +-
 .../hbase/index/covered/NonTxIndexBuilder.java  |   2 +-
 .../phoenix/hbase/index/covered/TableState.java |   8 -
 .../apache/phoenix/index/IndexMaintainer.java   |  23 +-
 .../phoenix/index/PhoenixIndexBuilder.java  |  21 +-
 .../apache/phoenix/index/PhoenixIndexCodec.java |  34 +-
 .../phoenix/index/PhoenixIndexMetaData.java |  78 +--
 .../index/PhoenixIndexMetaDataBuilder.java  | 106 
 .../index/PhoenixTransactionalIndexer.java  | 442 +---
 .../query/ConnectionQueryServicesImpl.java  |   8 +
 .../transaction/OmidTransactionContext.java |   2 +-
 .../transaction/PhoenixTransactionContext.java  |   2 +-
 .../transaction/TephraTransactionContext.java   |   2 +-
 .../index/covered/CoveredColumnIndexCodec.java  |   6 +-
 .../covered/CoveredIndexCodecForTesting.java|   5 +-
 .../index/covered/LocalTableStateTest.java  |  10 +-
 .../index/covered/NonTxIndexBuilderTest.java|   3 +
 .../covered/TestCoveredColumnIndexCodec.java|   6 +-
 30 files changed, 785 insertions(+), 1145 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/a9dcf3f3/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
index 1483c58..f914256 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
@@ -239,15 +239,17 @@ public abstract class BaseIndexIT extends 
ParallelStatsDisabledIT {
 }
 
 private void assertNoClientSideIndexMutations(Connection conn) throws 
SQLException {
-if (mutable) {
-Iterator> iterator = 
PhoenixRuntime.getUncommittedDataIterator(conn);
-if (iterator.hasNext()) {
-byte[] tableName = iterator.next().getFirst(); // skip data 
table mutations
-PTable table = PhoenixRuntime.getTable(conn, 
Bytes.toString(tableName));
+Iterator> iterator = 
PhoenixRuntime.getUncommittedDataIterator(conn);
+if (iterator.hasNext()) {
+byte[] tableName = iterator.next().getFirst(); // skip data table 
mutations
+PTable table = PhoenixRuntime.getTable(conn, 
Bytes.toString(tableName));
+boolean clientSideUpdate = !localIndex && (!mutable || 
transactional);
+if (!clientSideUpdate) {
 assertTrue(table.getType() == PTableType.TABLE); // should be 
data table
-boolean hasIndexData = iterator.hasNext();
-assertFalse(hasIndexData && !transactional); // should have no 
index data
 }
+boolean hasIndexData = iterator.hasNext();
+// global immutable and global transactional tables are processed 
client side
+assertEquals(clientSideUpdate, hasIndexData); 
 }
 }
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/a9dcf3f3/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
 

phoenix git commit: PHOENIX-4670 Increase parcel compatibility to minor versions

2018-03-23 Thread pboado
Repository: phoenix
Updated Branches:
  refs/heads/4.x-cdh5.11 03fd0bab5 -> 03fedf6ca


PHOENIX-4670 Increase parcel compatibility to minor versions


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

Branch: refs/heads/4.x-cdh5.11
Commit: 03fedf6caba5458108de40cbfcab49c1099d7183
Parents: 03fd0ba
Author: Pedro Boado 
Authored: Fri Mar 23 19:29:15 2018 +
Committer: Pedro Boado 
Committed: Fri Mar 23 19:31:07 2018 +

--
 phoenix-parcel/pom.xml | 18 --
 phoenix-parcel/src/parcel/meta/parcel.json |  2 +-
 2 files changed, 17 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/03fedf6c/phoenix-parcel/pom.xml
--
diff --git a/phoenix-parcel/pom.xml b/phoenix-parcel/pom.xml
index 31b502f..5e6fccc 100644
--- a/phoenix-parcel/pom.xml
+++ b/phoenix-parcel/pom.xml
@@ -48,7 +48,7 @@
 
${phoenix.version}+${cdh.version}+${parcel.patch.count}
 
${phoenix.version}-${cdh.version}
 
${cdh.version}.p${parcel.release}
-CDH (= ${cdh.version.number})
+CDH (= ${cdh.minor.version})
   
 
   
@@ -59,7 +59,7 @@
 3.0.0
 
   
-regex-property
+regex-property-phoenix-version
 initialize
 
   regex-property
@@ -72,6 +72,20 @@
   true
 
   
+  
+regex-property-cdh-minor-version
+initialize
+
+  regex-property
+
+
+  cdh.minor.version
+  ${cdh.version.number}
+  ^([0-9]+)\.([0-9]+)\.([0-9]+)(-.*)?$
+  $1.$2
+  true
+
+  
 
   
   

http://git-wip-us.apache.org/repos/asf/phoenix/blob/03fedf6c/phoenix-parcel/src/parcel/meta/parcel.json
--
diff --git a/phoenix-parcel/src/parcel/meta/parcel.json 
b/phoenix-parcel/src/parcel/meta/parcel.json
index 0be423a..57e4d59 100644
--- a/phoenix-parcel/src/parcel/meta/parcel.json
+++ b/phoenix-parcel/src/parcel/meta/parcel.json
@@ -27,7 +27,7 @@
 },
 "depends": "${parcel.depends}",
 "provides": [
-"hbase-plugin"
+"phoenix"
 ],
 "setActiveSymlink": true,
 "users": {}



[4/4] phoenix git commit: PHOENIX-4643 Implement ARRAY_REMOVE built in function (Xavier Jodoin)

2018-03-23 Thread jamestaylor
PHOENIX-4643 Implement ARRAY_REMOVE built in function (Xavier Jodoin)


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

Branch: refs/heads/4.x-HBase-1.1
Commit: c6b98ce85f2bbf5c76b4b8287f44efef0a0cb133
Parents: 49c9f53
Author: James Taylor 
Authored: Fri Mar 23 12:00:45 2018 -0700
Committer: James Taylor 
Committed: Fri Mar 23 12:24:53 2018 -0700

--
 .../phoenix/end2end/ArrayRemoveFunctionIT.java  | 383 +++
 .../phoenix/expression/ExpressionType.java  |  10 +-
 .../function/ArrayRemoveFunction.java   |  88 +
 .../expression/ArrayRemoveFunctionTest.java | 285 ++
 4 files changed, 762 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c6b98ce8/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
new file mode 100644
index 000..b5a468c
--- /dev/null
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
@@ -0,0 +1,383 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.phoenix.end2end;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+
+import org.apache.phoenix.schema.TypeMismatchException;
+import org.junit.Before;
+import org.junit.Test;
+
+public class ArrayRemoveFunctionIT extends ParallelStatsDisabledIT {
+
+   private Connection conn;
+   private String tableName;
+
+   @Before
+   public void setup() throws Exception {
+   conn = DriverManager.getConnection(getUrl());
+   tableName = initTables(conn);
+   }
+
+   private String initTables(Connection conn) throws Exception {
+   String tableName = generateUniqueName();
+   String ddl = "CREATE TABLE " + tableName
+   + " (region_name VARCHAR PRIMARY KEY,varchars 
VARCHAR[],integers INTEGER[],doubles DOUBLE[],bigints BIGINT[],"
+   + "chars CHAR(15)[],double1 DOUBLE,char1 
CHAR(17),nullcheck INTEGER,chars2 CHAR(15)[], nullVarchar VARCHAR[], nullBigInt 
BIGINT[],double2 DOUBLE,integer1 INTEGER,oneItem VARCHAR[],char2 
char(15),varchar1 VARCHAR)";
+   conn.createStatement().execute(ddl);
+   String dml = "UPSERT INTO " + tableName
+   + 
"(region_name,varchars,integers,doubles,bigints,chars,double1,char1,nullcheck,chars2,double2,integer1,oneItem,char2,varchar1)
 VALUES('SF Bay Area',"
+   + "ARRAY['2345','46345','23234']," + 
"ARRAY[2345,46345,23234,456],"
+   + "ARRAY[10.0,23.45,46.345,23.234,45.6,5.78]," 
+ "ARRAY[12,34,56,78,910],"
+   + "ARRAY['a','','c','ddd','e','c']," + 
"23.45," + "'wert'," + "NULL,"
+   + "ARRAY['a','','c','ddd','e','foo']," + 
"12," + "12," + "ARRAY['alone'],'2345','a')";
+   PreparedStatement stmt = conn.prepareStatement(dml);
+   stmt.execute();
+   conn.commit();
+   return tableName;
+   }
+
+   @Test
+   public void testEmptyArrayModification() throws Exception {
+   ResultSet rs = conn.createStatement()
+   .executeQuery("SELECT 
ARRAY_REMOVE(nullVarChar,'34567') FROM " + tableName + " LIMIT 1");
+   

[3/4] phoenix git commit: PHOENIX-4660 Use TransactionProvider interface

2018-03-23 Thread jamestaylor
PHOENIX-4660 Use TransactionProvider interface


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

Branch: refs/heads/4.x-HBase-1.1
Commit: 49c9f53aa2f14e8e46aaa2dfe97f8c24b157a5e9
Parents: 7dae4e3
Author: James Taylor 
Authored: Sat Mar 17 15:16:24 2018 -0700
Committer: James Taylor 
Committed: Fri Mar 23 12:24:33 2018 -0700

--
 .../phoenix/tx/FlappingTransactionIT.java   |   8 +-
 .../PhoenixTransactionalProcessor.java  |   2 +-
 .../apache/phoenix/execute/MutationState.java   |   8 +-
 .../PhoenixTxIndexMutationGenerator.java|   2 +-
 .../apache/phoenix/index/IndexMaintainer.java   |   2 +-
 .../index/IndexMetaDataCacheFactory.java|   2 +-
 .../index/PhoenixIndexMetaDataBuilder.java  |   2 +-
 .../query/ConnectionQueryServicesImpl.java  |   2 +-
 .../query/ConnectionlessQueryServicesImpl.java  |   2 +-
 .../transaction/OmidTransactionProvider.java|  78 +
 .../transaction/TephraTransactionProvider.java  |  76 
 .../phoenix/transaction/TransactionFactory.java | 117 ++-
 .../transaction/TransactionProvider.java|  36 ++
 .../org/apache/phoenix/util/PhoenixRuntime.java |   2 +-
 .../apache/phoenix/util/TransactionUtil.java|   4 +-
 .../java/org/apache/phoenix/query/BaseTest.java |   6 +-
 16 files changed, 218 insertions(+), 131 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/49c9f53a/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
index 301768b..200cf1c 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
@@ -225,9 +225,9 @@ public class FlappingTransactionIT extends 
ParallelStatsDisabledIT {
 }
 
 PhoenixTransactionContext txContext =
-  
TransactionFactory.getTransactionFactory().getTransactionContext(pconn);
+  
TransactionFactory.getTransactionProvider().getTransactionContext(pconn);
 PhoenixTransactionalTable txTable =
-  
TransactionFactory.getTransactionFactory().getTransactionalTable(txContext, 
htable);
+  
TransactionFactory.getTransactionProvider().getTransactionalTable(txContext, 
htable);
 
 txContext.begin();
 
@@ -277,9 +277,9 @@ public class FlappingTransactionIT extends 
ParallelStatsDisabledIT {
 
 // Repeat the same as above, but this time abort the transaction
 txContext =
-  
TransactionFactory.getTransactionFactory().getTransactionContext(pconn);
+  
TransactionFactory.getTransactionProvider().getTransactionContext(pconn);
 txTable =
-  
TransactionFactory.getTransactionFactory().getTransactionalTable(txContext, 
htable);
+  
TransactionFactory.getTransactionProvider().getTransactionalTable(txContext, 
htable);
 
 txContext.begin();
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/49c9f53a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
index ca0c997..0c26ecc 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
@@ -22,7 +22,7 @@ import org.apache.phoenix.transaction.TransactionFactory;
 public class PhoenixTransactionalProcessor extends DelegateRegionObserver {
 
 public PhoenixTransactionalProcessor() {
-
super(TransactionFactory.getTransactionFactory().getTransactionContext().getCoprocessor());
+
super(TransactionFactory.getTransactionProvider().getTransactionContext().getCoprocessor());
 }
 
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/49c9f53a/phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java 

[1/4] phoenix git commit: PHOENIX-4619 Process transactional updates to local index on server-side

2018-03-23 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.1 94ae688d1 -> c6b98ce85


http://git-wip-us.apache.org/repos/asf/phoenix/blob/7dae4e31/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
index 9bd4db8..4f65416 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
@@ -21,7 +21,6 @@ import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.KeyValueUtil;
 import org.apache.hadoop.hbase.client.Mutation;
-import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
 import org.apache.hadoop.hbase.util.Pair;
 import org.apache.phoenix.hbase.index.ValueGetter;
 import org.apache.phoenix.hbase.index.covered.data.IndexMemStore;
@@ -44,7 +43,6 @@ import 
org.apache.phoenix.hbase.index.util.IndexManagementUtil;
 public class LocalTableState implements TableState {
 
 private long ts;
-private RegionCoprocessorEnvironment env;
 private KeyValueStore memstore;
 private LocalHBaseState table;
 private Mutation update;
@@ -54,8 +52,7 @@ public class LocalTableState implements TableState {
 private List hints;
 private CoveredColumns columnSet;
 
-public LocalTableState(RegionCoprocessorEnvironment environment, 
LocalHBaseState table, Mutation update) {
-this.env = environment;
+public LocalTableState(LocalHBaseState table, Mutation update) {
 this.table = table;
 this.update = update;
 this.memstore = new IndexMemStore();
@@ -104,11 +101,6 @@ public class LocalTableState implements TableState {
 }
 
 @Override
-public RegionCoprocessorEnvironment getEnvironment() {
-return this.env;
-}
-
-@Override
 public long getCurrentTimestamp() {
 return this.ts;
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/7dae4e31/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
index 8dd57c0..97ac30d 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
@@ -51,7 +51,7 @@ public class NonTxIndexBuilder extends BaseIndexBuilder {
 @Override
 public Collection> getIndexUpdate(Mutation 
mutation, IndexMetaData indexMetaData) throws IOException {
// create a state manager, so we can manage each batch
-LocalTableState state = new LocalTableState(env, localTable, mutation);
+LocalTableState state = new LocalTableState(localTable, mutation);
 // build the index updates for each group
 IndexUpdateManager manager = new IndexUpdateManager(indexMetaData);
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/7dae4e31/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
index 605cbe3..cb2b41f 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
@@ -23,7 +23,6 @@ import java.util.Collection;
 import java.util.List;
 
 import org.apache.hadoop.hbase.KeyValue;
-import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
 import org.apache.hadoop.hbase.util.Pair;
 import org.apache.phoenix.hbase.index.ValueGetter;
 import org.apache.phoenix.hbase.index.covered.update.ColumnReference;
@@ -36,13 +35,6 @@ import 
org.apache.phoenix.hbase.index.covered.update.IndexedColumnGroup;
  */
 public interface TableState {
 
-  // use this to get batch ids/ptable stuff
-  /**
-   * WARNING: messing with this can affect the indexing plumbing. Use with 
caution :)
-   * @return get the current environment in which this table lives.
-   */
-  public RegionCoprocessorEnvironment getEnvironment();
-
   /**
* @return the current timestamp up-to-which we are releasing table state.
*/


[2/4] phoenix git commit: PHOENIX-4619 Process transactional updates to local index on server-side

2018-03-23 Thread jamestaylor
PHOENIX-4619 Process transactional updates to local index on server-side


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

Branch: refs/heads/4.x-HBase-1.1
Commit: 7dae4e31c0d088978c6272f63fff69fdcb38ce53
Parents: 94ae688
Author: James Taylor 
Authored: Sat Mar 17 12:52:38 2018 -0700
Committer: James Taylor 
Committed: Fri Mar 23 12:23:08 2018 -0700

--
 .../phoenix/end2end/index/BaseIndexIT.java  |  16 +-
 .../phoenix/end2end/index/ImmutableIndexIT.java |   3 +-
 .../end2end/index/MutableIndexFailureIT.java|   8 +-
 .../apache/phoenix/compile/DeleteCompiler.java  |  36 +-
 .../PhoenixTransactionalProcessor.java  |   2 +-
 .../apache/phoenix/execute/MutationState.java   | 103 +++-
 .../PhoenixTxIndexMutationGenerator.java| 449 
 .../PhoenixTxnIndexMutationGenerator.java   | 519 ---
 .../org/apache/phoenix/hbase/index/Indexer.java |   1 -
 .../hbase/index/builder/BaseIndexBuilder.java   |   4 +-
 .../hbase/index/builder/BaseIndexCodec.java |   7 -
 .../phoenix/hbase/index/covered/IndexCodec.java |  14 +-
 .../hbase/index/covered/LocalTableState.java|  10 +-
 .../hbase/index/covered/NonTxIndexBuilder.java  |   2 +-
 .../phoenix/hbase/index/covered/TableState.java |   8 -
 .../apache/phoenix/index/IndexMaintainer.java   |  23 +-
 .../phoenix/index/PhoenixIndexBuilder.java  |  21 +-
 .../apache/phoenix/index/PhoenixIndexCodec.java |  34 +-
 .../phoenix/index/PhoenixIndexMetaData.java |  78 +--
 .../index/PhoenixIndexMetaDataBuilder.java  | 106 
 .../index/PhoenixTransactionalIndexer.java  | 442 +---
 .../query/ConnectionQueryServicesImpl.java  |   8 +
 .../transaction/OmidTransactionContext.java |   2 +-
 .../transaction/PhoenixTransactionContext.java  |   2 +-
 .../transaction/TephraTransactionContext.java   |   2 +-
 .../index/covered/CoveredColumnIndexCodec.java  |   6 +-
 .../covered/CoveredIndexCodecForTesting.java|   5 +-
 .../index/covered/LocalTableStateTest.java  |  10 +-
 .../index/covered/NonTxIndexBuilderTest.java|   3 +
 .../covered/TestCoveredColumnIndexCodec.java|   6 +-
 30 files changed, 785 insertions(+), 1145 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/7dae4e31/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
index 1483c58..f914256 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
@@ -239,15 +239,17 @@ public abstract class BaseIndexIT extends 
ParallelStatsDisabledIT {
 }
 
 private void assertNoClientSideIndexMutations(Connection conn) throws 
SQLException {
-if (mutable) {
-Iterator> iterator = 
PhoenixRuntime.getUncommittedDataIterator(conn);
-if (iterator.hasNext()) {
-byte[] tableName = iterator.next().getFirst(); // skip data 
table mutations
-PTable table = PhoenixRuntime.getTable(conn, 
Bytes.toString(tableName));
+Iterator> iterator = 
PhoenixRuntime.getUncommittedDataIterator(conn);
+if (iterator.hasNext()) {
+byte[] tableName = iterator.next().getFirst(); // skip data table 
mutations
+PTable table = PhoenixRuntime.getTable(conn, 
Bytes.toString(tableName));
+boolean clientSideUpdate = !localIndex && (!mutable || 
transactional);
+if (!clientSideUpdate) {
 assertTrue(table.getType() == PTableType.TABLE); // should be 
data table
-boolean hasIndexData = iterator.hasNext();
-assertFalse(hasIndexData && !transactional); // should have no 
index data
 }
+boolean hasIndexData = iterator.hasNext();
+// global immutable and global transactional tables are processed 
client side
+assertEquals(clientSideUpdate, hasIndexData); 
 }
 }
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/7dae4e31/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
 

[4/4] phoenix git commit: PHOENIX-4643 Implement ARRAY_REMOVE built in function (Xavier Jodoin)

2018-03-23 Thread jamestaylor
PHOENIX-4643 Implement ARRAY_REMOVE built in function (Xavier Jodoin)


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

Branch: refs/heads/4.x-HBase-1.2
Commit: 8da901e1ce4c11cfef8b34ebdfed91c684e4abc4
Parents: ca6721a
Author: James Taylor 
Authored: Fri Mar 23 12:00:45 2018 -0700
Committer: James Taylor 
Committed: Fri Mar 23 12:15:08 2018 -0700

--
 .../phoenix/end2end/ArrayRemoveFunctionIT.java  | 383 +++
 .../phoenix/expression/ExpressionType.java  |  10 +-
 .../function/ArrayRemoveFunction.java   |  88 +
 .../expression/ArrayRemoveFunctionTest.java | 285 ++
 4 files changed, 762 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/8da901e1/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
new file mode 100644
index 000..b5a468c
--- /dev/null
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
@@ -0,0 +1,383 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.phoenix.end2end;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+
+import org.apache.phoenix.schema.TypeMismatchException;
+import org.junit.Before;
+import org.junit.Test;
+
+public class ArrayRemoveFunctionIT extends ParallelStatsDisabledIT {
+
+   private Connection conn;
+   private String tableName;
+
+   @Before
+   public void setup() throws Exception {
+   conn = DriverManager.getConnection(getUrl());
+   tableName = initTables(conn);
+   }
+
+   private String initTables(Connection conn) throws Exception {
+   String tableName = generateUniqueName();
+   String ddl = "CREATE TABLE " + tableName
+   + " (region_name VARCHAR PRIMARY KEY,varchars 
VARCHAR[],integers INTEGER[],doubles DOUBLE[],bigints BIGINT[],"
+   + "chars CHAR(15)[],double1 DOUBLE,char1 
CHAR(17),nullcheck INTEGER,chars2 CHAR(15)[], nullVarchar VARCHAR[], nullBigInt 
BIGINT[],double2 DOUBLE,integer1 INTEGER,oneItem VARCHAR[],char2 
char(15),varchar1 VARCHAR)";
+   conn.createStatement().execute(ddl);
+   String dml = "UPSERT INTO " + tableName
+   + 
"(region_name,varchars,integers,doubles,bigints,chars,double1,char1,nullcheck,chars2,double2,integer1,oneItem,char2,varchar1)
 VALUES('SF Bay Area',"
+   + "ARRAY['2345','46345','23234']," + 
"ARRAY[2345,46345,23234,456],"
+   + "ARRAY[10.0,23.45,46.345,23.234,45.6,5.78]," 
+ "ARRAY[12,34,56,78,910],"
+   + "ARRAY['a','','c','ddd','e','c']," + 
"23.45," + "'wert'," + "NULL,"
+   + "ARRAY['a','','c','ddd','e','foo']," + 
"12," + "12," + "ARRAY['alone'],'2345','a')";
+   PreparedStatement stmt = conn.prepareStatement(dml);
+   stmt.execute();
+   conn.commit();
+   return tableName;
+   }
+
+   @Test
+   public void testEmptyArrayModification() throws Exception {
+   ResultSet rs = conn.createStatement()
+   .executeQuery("SELECT 
ARRAY_REMOVE(nullVarChar,'34567') FROM " + tableName + " LIMIT 1");
+   

[2/4] phoenix git commit: PHOENIX-4619 Process transactional updates to local index on server-side

2018-03-23 Thread jamestaylor
PHOENIX-4619 Process transactional updates to local index on server-side


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

Branch: refs/heads/4.x-HBase-1.2
Commit: eb38820691432f32582e3fa597a79cf0c9e3220f
Parents: 64b9f6f
Author: James Taylor 
Authored: Sat Mar 17 12:52:38 2018 -0700
Committer: James Taylor 
Committed: Fri Mar 23 12:06:35 2018 -0700

--
 .../phoenix/end2end/index/BaseIndexIT.java  |  16 +-
 .../phoenix/end2end/index/ImmutableIndexIT.java |   3 +-
 .../end2end/index/MutableIndexFailureIT.java|   8 +-
 .../apache/phoenix/compile/DeleteCompiler.java  |  36 +-
 .../PhoenixTransactionalProcessor.java  |   2 +-
 .../apache/phoenix/execute/MutationState.java   | 103 +++-
 .../PhoenixTxIndexMutationGenerator.java| 449 
 .../PhoenixTxnIndexMutationGenerator.java   | 519 ---
 .../org/apache/phoenix/hbase/index/Indexer.java |   1 -
 .../hbase/index/builder/BaseIndexBuilder.java   |   4 +-
 .../hbase/index/builder/BaseIndexCodec.java |   7 -
 .../phoenix/hbase/index/covered/IndexCodec.java |  14 +-
 .../hbase/index/covered/LocalTableState.java|  10 +-
 .../hbase/index/covered/NonTxIndexBuilder.java  |   2 +-
 .../phoenix/hbase/index/covered/TableState.java |   8 -
 .../apache/phoenix/index/IndexMaintainer.java   |  23 +-
 .../phoenix/index/PhoenixIndexBuilder.java  |  21 +-
 .../apache/phoenix/index/PhoenixIndexCodec.java |  34 +-
 .../phoenix/index/PhoenixIndexMetaData.java |  78 +--
 .../index/PhoenixIndexMetaDataBuilder.java  | 106 
 .../index/PhoenixTransactionalIndexer.java  | 442 +---
 .../query/ConnectionQueryServicesImpl.java  |   8 +
 .../transaction/OmidTransactionContext.java |   2 +-
 .../transaction/PhoenixTransactionContext.java  |   2 +-
 .../transaction/TephraTransactionContext.java   |   2 +-
 .../index/covered/CoveredColumnIndexCodec.java  |   6 +-
 .../covered/CoveredIndexCodecForTesting.java|   5 +-
 .../index/covered/LocalTableStateTest.java  |  10 +-
 .../index/covered/NonTxIndexBuilderTest.java|   3 +
 .../covered/TestCoveredColumnIndexCodec.java|   6 +-
 30 files changed, 785 insertions(+), 1145 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/eb388206/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
index 1483c58..f914256 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
@@ -239,15 +239,17 @@ public abstract class BaseIndexIT extends 
ParallelStatsDisabledIT {
 }
 
 private void assertNoClientSideIndexMutations(Connection conn) throws 
SQLException {
-if (mutable) {
-Iterator> iterator = 
PhoenixRuntime.getUncommittedDataIterator(conn);
-if (iterator.hasNext()) {
-byte[] tableName = iterator.next().getFirst(); // skip data 
table mutations
-PTable table = PhoenixRuntime.getTable(conn, 
Bytes.toString(tableName));
+Iterator> iterator = 
PhoenixRuntime.getUncommittedDataIterator(conn);
+if (iterator.hasNext()) {
+byte[] tableName = iterator.next().getFirst(); // skip data table 
mutations
+PTable table = PhoenixRuntime.getTable(conn, 
Bytes.toString(tableName));
+boolean clientSideUpdate = !localIndex && (!mutable || 
transactional);
+if (!clientSideUpdate) {
 assertTrue(table.getType() == PTableType.TABLE); // should be 
data table
-boolean hasIndexData = iterator.hasNext();
-assertFalse(hasIndexData && !transactional); // should have no 
index data
 }
+boolean hasIndexData = iterator.hasNext();
+// global immutable and global transactional tables are processed 
client side
+assertEquals(clientSideUpdate, hasIndexData); 
 }
 }
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/eb388206/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
 

[3/4] phoenix git commit: PHOENIX-4660 Use TransactionProvider interface

2018-03-23 Thread jamestaylor
PHOENIX-4660 Use TransactionProvider interface


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

Branch: refs/heads/4.x-HBase-1.2
Commit: ca6721a892edf430c2fea7b22439fb2e96777ff7
Parents: eb38820
Author: James Taylor 
Authored: Sat Mar 17 15:16:24 2018 -0700
Committer: James Taylor 
Committed: Fri Mar 23 12:12:49 2018 -0700

--
 .../phoenix/tx/FlappingTransactionIT.java   |   8 +-
 .../PhoenixTransactionalProcessor.java  |   2 +-
 .../apache/phoenix/execute/MutationState.java   |   8 +-
 .../PhoenixTxIndexMutationGenerator.java|   2 +-
 .../apache/phoenix/index/IndexMaintainer.java   |   2 +-
 .../index/IndexMetaDataCacheFactory.java|   2 +-
 .../index/PhoenixIndexMetaDataBuilder.java  |   2 +-
 .../query/ConnectionQueryServicesImpl.java  |   2 +-
 .../query/ConnectionlessQueryServicesImpl.java  |   2 +-
 .../transaction/OmidTransactionProvider.java|  78 +
 .../transaction/TephraTransactionProvider.java  |  76 
 .../phoenix/transaction/TransactionFactory.java | 117 ++-
 .../transaction/TransactionProvider.java|  36 ++
 .../org/apache/phoenix/util/PhoenixRuntime.java |   2 +-
 .../apache/phoenix/util/TransactionUtil.java|   4 +-
 .../java/org/apache/phoenix/query/BaseTest.java |   6 +-
 16 files changed, 218 insertions(+), 131 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/ca6721a8/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
index 301768b..200cf1c 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
@@ -225,9 +225,9 @@ public class FlappingTransactionIT extends 
ParallelStatsDisabledIT {
 }
 
 PhoenixTransactionContext txContext =
-  
TransactionFactory.getTransactionFactory().getTransactionContext(pconn);
+  
TransactionFactory.getTransactionProvider().getTransactionContext(pconn);
 PhoenixTransactionalTable txTable =
-  
TransactionFactory.getTransactionFactory().getTransactionalTable(txContext, 
htable);
+  
TransactionFactory.getTransactionProvider().getTransactionalTable(txContext, 
htable);
 
 txContext.begin();
 
@@ -277,9 +277,9 @@ public class FlappingTransactionIT extends 
ParallelStatsDisabledIT {
 
 // Repeat the same as above, but this time abort the transaction
 txContext =
-  
TransactionFactory.getTransactionFactory().getTransactionContext(pconn);
+  
TransactionFactory.getTransactionProvider().getTransactionContext(pconn);
 txTable =
-  
TransactionFactory.getTransactionFactory().getTransactionalTable(txContext, 
htable);
+  
TransactionFactory.getTransactionProvider().getTransactionalTable(txContext, 
htable);
 
 txContext.begin();
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/ca6721a8/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
index ca0c997..0c26ecc 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
@@ -22,7 +22,7 @@ import org.apache.phoenix.transaction.TransactionFactory;
 public class PhoenixTransactionalProcessor extends DelegateRegionObserver {
 
 public PhoenixTransactionalProcessor() {
-
super(TransactionFactory.getTransactionFactory().getTransactionContext().getCoprocessor());
+
super(TransactionFactory.getTransactionProvider().getTransactionContext().getCoprocessor());
 }
 
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/ca6721a8/phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java 

[1/4] phoenix git commit: PHOENIX-4619 Process transactional updates to local index on server-side

2018-03-23 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.2 64b9f6ffc -> 8da901e1c


http://git-wip-us.apache.org/repos/asf/phoenix/blob/eb388206/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
index 9bd4db8..4f65416 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
@@ -21,7 +21,6 @@ import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.KeyValueUtil;
 import org.apache.hadoop.hbase.client.Mutation;
-import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
 import org.apache.hadoop.hbase.util.Pair;
 import org.apache.phoenix.hbase.index.ValueGetter;
 import org.apache.phoenix.hbase.index.covered.data.IndexMemStore;
@@ -44,7 +43,6 @@ import 
org.apache.phoenix.hbase.index.util.IndexManagementUtil;
 public class LocalTableState implements TableState {
 
 private long ts;
-private RegionCoprocessorEnvironment env;
 private KeyValueStore memstore;
 private LocalHBaseState table;
 private Mutation update;
@@ -54,8 +52,7 @@ public class LocalTableState implements TableState {
 private List hints;
 private CoveredColumns columnSet;
 
-public LocalTableState(RegionCoprocessorEnvironment environment, 
LocalHBaseState table, Mutation update) {
-this.env = environment;
+public LocalTableState(LocalHBaseState table, Mutation update) {
 this.table = table;
 this.update = update;
 this.memstore = new IndexMemStore();
@@ -104,11 +101,6 @@ public class LocalTableState implements TableState {
 }
 
 @Override
-public RegionCoprocessorEnvironment getEnvironment() {
-return this.env;
-}
-
-@Override
 public long getCurrentTimestamp() {
 return this.ts;
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/eb388206/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
index 8dd57c0..97ac30d 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
@@ -51,7 +51,7 @@ public class NonTxIndexBuilder extends BaseIndexBuilder {
 @Override
 public Collection> getIndexUpdate(Mutation 
mutation, IndexMetaData indexMetaData) throws IOException {
// create a state manager, so we can manage each batch
-LocalTableState state = new LocalTableState(env, localTable, mutation);
+LocalTableState state = new LocalTableState(localTable, mutation);
 // build the index updates for each group
 IndexUpdateManager manager = new IndexUpdateManager(indexMetaData);
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/eb388206/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
index 605cbe3..cb2b41f 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
@@ -23,7 +23,6 @@ import java.util.Collection;
 import java.util.List;
 
 import org.apache.hadoop.hbase.KeyValue;
-import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
 import org.apache.hadoop.hbase.util.Pair;
 import org.apache.phoenix.hbase.index.ValueGetter;
 import org.apache.phoenix.hbase.index.covered.update.ColumnReference;
@@ -36,13 +35,6 @@ import 
org.apache.phoenix.hbase.index.covered.update.IndexedColumnGroup;
  */
 public interface TableState {
 
-  // use this to get batch ids/ptable stuff
-  /**
-   * WARNING: messing with this can affect the indexing plumbing. Use with 
caution :)
-   * @return get the current environment in which this table lives.
-   */
-  public RegionCoprocessorEnvironment getEnvironment();
-
   /**
* @return the current timestamp up-to-which we are releasing table state.
*/


phoenix git commit: PHOENIX-4643 Implement ARRAY_REMOVE built in function (Xavier Jodoin)

2018-03-23 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.3 d1c48b6d7 -> c51c70438


PHOENIX-4643 Implement ARRAY_REMOVE built in function (Xavier Jodoin)


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

Branch: refs/heads/4.x-HBase-1.3
Commit: c51c70438d396f9040a647874a55580024e60ff0
Parents: d1c48b6
Author: James Taylor 
Authored: Fri Mar 23 12:00:45 2018 -0700
Committer: James Taylor 
Committed: Fri Mar 23 12:05:08 2018 -0700

--
 .../phoenix/end2end/ArrayRemoveFunctionIT.java  | 383 +++
 .../phoenix/expression/ExpressionType.java  |  10 +-
 .../function/ArrayRemoveFunction.java   |  88 +
 .../expression/ArrayRemoveFunctionTest.java | 285 ++
 4 files changed, 762 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c51c7043/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
new file mode 100644
index 000..b5a468c
--- /dev/null
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
@@ -0,0 +1,383 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.phoenix.end2end;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+
+import org.apache.phoenix.schema.TypeMismatchException;
+import org.junit.Before;
+import org.junit.Test;
+
+public class ArrayRemoveFunctionIT extends ParallelStatsDisabledIT {
+
+   private Connection conn;
+   private String tableName;
+
+   @Before
+   public void setup() throws Exception {
+   conn = DriverManager.getConnection(getUrl());
+   tableName = initTables(conn);
+   }
+
+   private String initTables(Connection conn) throws Exception {
+   String tableName = generateUniqueName();
+   String ddl = "CREATE TABLE " + tableName
+   + " (region_name VARCHAR PRIMARY KEY,varchars 
VARCHAR[],integers INTEGER[],doubles DOUBLE[],bigints BIGINT[],"
+   + "chars CHAR(15)[],double1 DOUBLE,char1 
CHAR(17),nullcheck INTEGER,chars2 CHAR(15)[], nullVarchar VARCHAR[], nullBigInt 
BIGINT[],double2 DOUBLE,integer1 INTEGER,oneItem VARCHAR[],char2 
char(15),varchar1 VARCHAR)";
+   conn.createStatement().execute(ddl);
+   String dml = "UPSERT INTO " + tableName
+   + 
"(region_name,varchars,integers,doubles,bigints,chars,double1,char1,nullcheck,chars2,double2,integer1,oneItem,char2,varchar1)
 VALUES('SF Bay Area',"
+   + "ARRAY['2345','46345','23234']," + 
"ARRAY[2345,46345,23234,456],"
+   + "ARRAY[10.0,23.45,46.345,23.234,45.6,5.78]," 
+ "ARRAY[12,34,56,78,910],"
+   + "ARRAY['a','','c','ddd','e','c']," + 
"23.45," + "'wert'," + "NULL,"
+   + "ARRAY['a','','c','ddd','e','foo']," + 
"12," + "12," + "ARRAY['alone'],'2345','a')";
+   PreparedStatement stmt = conn.prepareStatement(dml);
+   stmt.execute();
+   conn.commit();
+   return tableName;
+   }
+
+   @Test
+   public void testEmptyArrayModification() throws Exception {
+   ResultSet rs = conn.createStatement()
+   .executeQuery("SELECT 

phoenix git commit: PHOENIX-4662 Avoid NPE when server-caches are null (Csaba Skrabak)

2018-03-23 Thread pboado
Repository: phoenix
Updated Branches:
  refs/heads/4.x-cdh5.11 13c1309c2 -> 03fd0bab5


PHOENIX-4662 Avoid NPE when server-caches are null (Csaba Skrabak)


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

Branch: refs/heads/4.x-cdh5.11
Commit: 03fd0bab54e8752935db939b75bbc317690f8f45
Parents: 13c1309
Author: Josh Elser 
Authored: Thu Mar 22 20:03:21 2018 +
Committer: Pedro Boado 
Committed: Fri Mar 23 19:02:31 2018 +

--
 .../java/org/apache/phoenix/iterate/TableResultIterator.java  | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/03fd0bab/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableResultIterator.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableResultIterator.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableResultIterator.java
index e812854..f6902cc 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableResultIterator.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/iterate/TableResultIterator.java
@@ -198,9 +198,12 @@ public class TableResultIterator implements ResultIterator 
{
retry--;
try {
Long cacheId = 
((HashJoinCacheNotFoundException) e1).getCacheId();
+
+   ServerCache 
cache = caches == null ? null :
+   
caches.get(new ImmutableBytesPtr(Bytes.toBytes(cacheId)));
+
if 
(!hashCacheClient.addHashCacheToServer(newScan.getStartRow(),
-   
caches.get(new ImmutableBytesPtr(Bytes.toBytes(cacheId))),
-   
plan.getTableRef().getTable())) {
+   
cache, plan.getTableRef().getTable())) {
throw 
e1;
}

this.scanIterator = ((BaseQueryPlan) plan).iterator(caches, scanGrouper, 
newScan);



[phoenix] Git Push Summary

2018-03-23 Thread pboado
Repository: phoenix
Updated Branches:
  refs/heads/4.x-cdh5.11.2 [deleted] 13c1309c2


[1/5] phoenix git commit: PHOENIX-4619 Process transactional updates to local index on server-side

2018-03-23 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/master e3889e2c1 -> 3c7d72541


http://git-wip-us.apache.org/repos/asf/phoenix/blob/e301ec2f/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
index 9bd4db8..4f65416 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/LocalTableState.java
@@ -21,7 +21,6 @@ import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.KeyValue;
 import org.apache.hadoop.hbase.KeyValueUtil;
 import org.apache.hadoop.hbase.client.Mutation;
-import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
 import org.apache.hadoop.hbase.util.Pair;
 import org.apache.phoenix.hbase.index.ValueGetter;
 import org.apache.phoenix.hbase.index.covered.data.IndexMemStore;
@@ -44,7 +43,6 @@ import 
org.apache.phoenix.hbase.index.util.IndexManagementUtil;
 public class LocalTableState implements TableState {
 
 private long ts;
-private RegionCoprocessorEnvironment env;
 private KeyValueStore memstore;
 private LocalHBaseState table;
 private Mutation update;
@@ -54,8 +52,7 @@ public class LocalTableState implements TableState {
 private List hints;
 private CoveredColumns columnSet;
 
-public LocalTableState(RegionCoprocessorEnvironment environment, 
LocalHBaseState table, Mutation update) {
-this.env = environment;
+public LocalTableState(LocalHBaseState table, Mutation update) {
 this.table = table;
 this.update = update;
 this.memstore = new IndexMemStore();
@@ -104,11 +101,6 @@ public class LocalTableState implements TableState {
 }
 
 @Override
-public RegionCoprocessorEnvironment getEnvironment() {
-return this.env;
-}
-
-@Override
 public long getCurrentTimestamp() {
 return this.ts;
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/e301ec2f/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
index 8dd57c0..97ac30d 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java
@@ -51,7 +51,7 @@ public class NonTxIndexBuilder extends BaseIndexBuilder {
 @Override
 public Collection> getIndexUpdate(Mutation 
mutation, IndexMetaData indexMetaData) throws IOException {
// create a state manager, so we can manage each batch
-LocalTableState state = new LocalTableState(env, localTable, mutation);
+LocalTableState state = new LocalTableState(localTable, mutation);
 // build the index updates for each group
 IndexUpdateManager manager = new IndexUpdateManager(indexMetaData);
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/e301ec2f/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
index 605cbe3..cb2b41f 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/TableState.java
@@ -23,7 +23,6 @@ import java.util.Collection;
 import java.util.List;
 
 import org.apache.hadoop.hbase.KeyValue;
-import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
 import org.apache.hadoop.hbase.util.Pair;
 import org.apache.phoenix.hbase.index.ValueGetter;
 import org.apache.phoenix.hbase.index.covered.update.ColumnReference;
@@ -36,13 +35,6 @@ import 
org.apache.phoenix.hbase.index.covered.update.IndexedColumnGroup;
  */
 public interface TableState {
 
-  // use this to get batch ids/ptable stuff
-  /**
-   * WARNING: messing with this can affect the indexing plumbing. Use with 
caution :)
-   * @return get the current environment in which this table lives.
-   */
-  public RegionCoprocessorEnvironment getEnvironment();
-
   /**
* @return the current timestamp up-to-which we are releasing table state.
*/

http://git-wip-us.apache.org/repos/asf/phoenix/blob/e301ec2f/phoenix-core/src/main/java/org/apache/phoenix/index/IndexMaintainer.java

[2/5] phoenix git commit: PHOENIX-4619 Process transactional updates to local index on server-side

2018-03-23 Thread jamestaylor
PHOENIX-4619 Process transactional updates to local index on server-side


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

Branch: refs/heads/master
Commit: e301ec2f9d731bdc7d529a7f08ec35b684efe419
Parents: e3889e2
Author: James Taylor 
Authored: Sat Mar 17 12:52:38 2018 -0700
Committer: James Taylor 
Committed: Fri Mar 23 11:46:32 2018 -0700

--
 .../phoenix/end2end/index/BaseIndexIT.java  |  16 +-
 .../phoenix/end2end/index/ImmutableIndexIT.java |   3 +-
 .../end2end/index/MutableIndexFailureIT.java|   8 +-
 .../apache/phoenix/compile/DeleteCompiler.java  |  36 +-
 .../PhoenixTransactionalProcessor.java  |   2 +-
 .../apache/phoenix/execute/MutationState.java   | 103 +++-
 .../PhoenixTxIndexMutationGenerator.java| 449 
 .../PhoenixTxnIndexMutationGenerator.java   | 519 ---
 .../org/apache/phoenix/hbase/index/Indexer.java |   1 -
 .../hbase/index/builder/BaseIndexBuilder.java   |   4 +-
 .../hbase/index/builder/BaseIndexCodec.java |   7 -
 .../phoenix/hbase/index/covered/IndexCodec.java |  14 +-
 .../hbase/index/covered/LocalTableState.java|  10 +-
 .../hbase/index/covered/NonTxIndexBuilder.java  |   2 +-
 .../phoenix/hbase/index/covered/TableState.java |   8 -
 .../apache/phoenix/index/IndexMaintainer.java   |  23 +-
 .../phoenix/index/PhoenixIndexBuilder.java  |  21 +-
 .../apache/phoenix/index/PhoenixIndexCodec.java |  34 +-
 .../phoenix/index/PhoenixIndexMetaData.java |  78 +--
 .../index/PhoenixIndexMetaDataBuilder.java  | 106 
 .../index/PhoenixTransactionalIndexer.java  | 442 +---
 .../query/ConnectionQueryServicesImpl.java  |   8 +
 .../transaction/OmidTransactionContext.java |   2 +-
 .../transaction/PhoenixTransactionContext.java  |   2 +-
 .../transaction/TephraTransactionContext.java   |   2 +-
 .../index/covered/CoveredColumnIndexCodec.java  |   6 +-
 .../covered/CoveredIndexCodecForTesting.java|   5 +-
 .../index/covered/LocalTableStateTest.java  |  10 +-
 .../index/covered/NonTxIndexBuilderTest.java|   3 +
 .../covered/TestCoveredColumnIndexCodec.java|   6 +-
 30 files changed, 785 insertions(+), 1145 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/e301ec2f/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
index 1483c58..f914256 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/BaseIndexIT.java
@@ -239,15 +239,17 @@ public abstract class BaseIndexIT extends 
ParallelStatsDisabledIT {
 }
 
 private void assertNoClientSideIndexMutations(Connection conn) throws 
SQLException {
-if (mutable) {
-Iterator> iterator = 
PhoenixRuntime.getUncommittedDataIterator(conn);
-if (iterator.hasNext()) {
-byte[] tableName = iterator.next().getFirst(); // skip data 
table mutations
-PTable table = PhoenixRuntime.getTable(conn, 
Bytes.toString(tableName));
+Iterator> iterator = 
PhoenixRuntime.getUncommittedDataIterator(conn);
+if (iterator.hasNext()) {
+byte[] tableName = iterator.next().getFirst(); // skip data table 
mutations
+PTable table = PhoenixRuntime.getTable(conn, 
Bytes.toString(tableName));
+boolean clientSideUpdate = !localIndex && (!mutable || 
transactional);
+if (!clientSideUpdate) {
 assertTrue(table.getType() == PTableType.TABLE); // should be 
data table
-boolean hasIndexData = iterator.hasNext();
-assertFalse(hasIndexData && !transactional); // should have no 
index data
 }
+boolean hasIndexData = iterator.hasNext();
+// global immutable and global transactional tables are processed 
client side
+assertEquals(clientSideUpdate, hasIndexData); 
 }
 }
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/e301ec2f/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
 

[4/5] phoenix git commit: PHOENIX-4660 Use TransactionProvider interface

2018-03-23 Thread jamestaylor
PHOENIX-4660 Use TransactionProvider interface


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

Branch: refs/heads/master
Commit: 8ff8cd3daa28ccaf8edc7fc0bc4b563ee8aa6f06
Parents: d1f015d
Author: James Taylor 
Authored: Sat Mar 17 15:16:24 2018 -0700
Committer: James Taylor 
Committed: Fri Mar 23 11:47:54 2018 -0700

--
 .../phoenix/tx/FlappingTransactionIT.java   |   8 +-
 .../PhoenixTransactionalProcessor.java  |   2 +-
 .../apache/phoenix/execute/MutationState.java   |   8 +-
 .../PhoenixTxIndexMutationGenerator.java|   2 +-
 .../apache/phoenix/index/IndexMaintainer.java   |   2 +-
 .../index/IndexMetaDataCacheFactory.java|   2 +-
 .../index/PhoenixIndexMetaDataBuilder.java  |   2 +-
 .../query/ConnectionQueryServicesImpl.java  |   2 +-
 .../query/ConnectionlessQueryServicesImpl.java  |   2 +-
 .../transaction/OmidTransactionProvider.java|  78 +++
 .../transaction/TephraTransactionProvider.java  |  76 +++
 .../phoenix/transaction/TransactionFactory.java | 129 +--
 .../transaction/TransactionProvider.java|  36 ++
 .../org/apache/phoenix/util/PhoenixRuntime.java |   2 +-
 .../apache/phoenix/util/TransactionUtil.java|   8 +-
 .../java/org/apache/phoenix/query/BaseTest.java |   6 +-
 16 files changed, 220 insertions(+), 145 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/8ff8cd3d/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
index 301768b..200cf1c 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/tx/FlappingTransactionIT.java
@@ -225,9 +225,9 @@ public class FlappingTransactionIT extends 
ParallelStatsDisabledIT {
 }
 
 PhoenixTransactionContext txContext =
-  
TransactionFactory.getTransactionFactory().getTransactionContext(pconn);
+  
TransactionFactory.getTransactionProvider().getTransactionContext(pconn);
 PhoenixTransactionalTable txTable =
-  
TransactionFactory.getTransactionFactory().getTransactionalTable(txContext, 
htable);
+  
TransactionFactory.getTransactionProvider().getTransactionalTable(txContext, 
htable);
 
 txContext.begin();
 
@@ -277,9 +277,9 @@ public class FlappingTransactionIT extends 
ParallelStatsDisabledIT {
 
 // Repeat the same as above, but this time abort the transaction
 txContext =
-  
TransactionFactory.getTransactionFactory().getTransactionContext(pconn);
+  
TransactionFactory.getTransactionProvider().getTransactionContext(pconn);
 txTable =
-  
TransactionFactory.getTransactionFactory().getTransactionalTable(txContext, 
htable);
+  
TransactionFactory.getTransactionProvider().getTransactionalTable(txContext, 
htable);
 
 txContext.begin();
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/8ff8cd3d/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
index ca0c997..0c26ecc 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PhoenixTransactionalProcessor.java
@@ -22,7 +22,7 @@ import org.apache.phoenix.transaction.TransactionFactory;
 public class PhoenixTransactionalProcessor extends DelegateRegionObserver {
 
 public PhoenixTransactionalProcessor() {
-
super(TransactionFactory.getTransactionFactory().getTransactionContext().getCoprocessor());
+
super(TransactionFactory.getTransactionProvider().getTransactionContext().getCoprocessor());
 }
 
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/8ff8cd3d/phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java 

[3/5] phoenix git commit: PHOENIX-4659 Use coprocessor API to write local transactional indexes

2018-03-23 Thread jamestaylor
PHOENIX-4659 Use coprocessor API to write local transactional indexes


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

Branch: refs/heads/master
Commit: d1f015dd27fbf072a3e664f273a922b22c0251d7
Parents: e301ec2
Author: James Taylor 
Authored: Sat Mar 17 14:18:59 2018 -0700
Committer: James Taylor 
Committed: Fri Mar 23 11:46:51 2018 -0700

--
 .../end2end/index/MutableIndexFailureIT.java|  7 ++-
 .../end2end/index/txn/TxWriteFailureIT.java |  6 +--
 .../index/PhoenixTransactionalIndexer.java  | 29 +++-
 .../phoenix/transaction/TransactionFactory.java | 13 ++
 .../apache/phoenix/util/TransactionUtil.java| 47 
 5 files changed, 96 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/d1f015dd/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexFailureIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexFailureIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexFailureIT.java
index 38bde7f..dfbaf3f 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexFailureIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexFailureIT.java
@@ -469,6 +469,7 @@ public class MutableIndexFailureIT extends BaseTest {
 // uncommitted data when the DELETE is executed.
 FailingRegionObserver.FAIL_WRITE = true;
 try {
+FailingRegionObserver.FAIL_NEXT_WRITE = localIndex && 
transactional;
 conn.commit();
 if (commitShouldFail && (!localIndex || transactional) && 
this.throwIndexWriteFailure) {
 fail();
@@ -504,13 +505,17 @@ public class MutableIndexFailureIT extends BaseTest {
 
 public static class FailingRegionObserver extends SimpleRegionObserver {
 public static volatile boolean FAIL_WRITE = false;
+public static volatile boolean FAIL_NEXT_WRITE = false;
 public static final String FAIL_INDEX_NAME = "FAIL_IDX";
 public static final String FAIL_TABLE_NAME = "FAIL_TABLE";
 
 @Override
 public void 
preBatchMutate(ObserverContext c, 
MiniBatchOperationInProgress miniBatchOp) throws IOException {
 boolean throwException = false;
-if 
(c.getEnvironment().getRegionInfo().getTable().getNameAsString().endsWith("A_" 
+ FAIL_INDEX_NAME)
+if (FAIL_NEXT_WRITE) {
+throwException = true;
+FAIL_NEXT_WRITE = false;
+} else if 
(c.getEnvironment().getRegionInfo().getTable().getNameAsString().endsWith("A_" 
+ FAIL_INDEX_NAME)
 && FAIL_WRITE) {
 throwException = true;
 } else {

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d1f015dd/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/txn/TxWriteFailureIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/txn/TxWriteFailureIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/txn/TxWriteFailureIT.java
index ec60151..049611c 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/txn/TxWriteFailureIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/txn/TxWriteFailureIT.java
@@ -105,7 +105,9 @@ public class TxWriteFailureIT extends 
BaseUniqueNamesOwnClusterIT {

@Test
 public void testIndexTableWriteFailure() throws Exception {
-helpTestWriteFailure(true);
+   if (!localIndex) { // We cannot fail the index write for local 
indexes because of the way they're written
+   helpTestWriteFailure(true);
+   }
}

@Test
@@ -175,8 +177,6 @@ public class TxWriteFailureIT extends 
BaseUniqueNamesOwnClusterIT {
 assertEquals("k3", rs.getString(1));
 assertEquals("v3", rs.getString(2));
 assertFalse(rs.next());
-
-conn.createStatement().execute("DROP TABLE " + dataTableFullName);
}



http://git-wip-us.apache.org/repos/asf/phoenix/blob/d1f015dd/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixTransactionalIndexer.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixTransactionalIndexer.java
 

[5/5] phoenix git commit: PHOENIX-4643 Implement ARRAY_REMOVE built in function (Xavier Jodoin)

2018-03-23 Thread jamestaylor
PHOENIX-4643 Implement ARRAY_REMOVE built in function (Xavier Jodoin)


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

Branch: refs/heads/master
Commit: 3c7d72541d4fd45c19a1e3b1c9da8f5c8a260714
Parents: 8ff8cd3
Author: James Taylor 
Authored: Fri Mar 23 12:00:45 2018 -0700
Committer: James Taylor 
Committed: Fri Mar 23 12:00:45 2018 -0700

--
 .../phoenix/end2end/ArrayRemoveFunctionIT.java  | 383 +++
 .../phoenix/expression/ExpressionType.java  |  10 +-
 .../function/ArrayRemoveFunction.java   |  88 +
 .../expression/ArrayRemoveFunctionTest.java | 285 ++
 4 files changed, 762 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/3c7d7254/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
new file mode 100644
index 000..b5a468c
--- /dev/null
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/ArrayRemoveFunctionIT.java
@@ -0,0 +1,383 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.phoenix.end2end;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+
+import org.apache.phoenix.schema.TypeMismatchException;
+import org.junit.Before;
+import org.junit.Test;
+
+public class ArrayRemoveFunctionIT extends ParallelStatsDisabledIT {
+
+   private Connection conn;
+   private String tableName;
+
+   @Before
+   public void setup() throws Exception {
+   conn = DriverManager.getConnection(getUrl());
+   tableName = initTables(conn);
+   }
+
+   private String initTables(Connection conn) throws Exception {
+   String tableName = generateUniqueName();
+   String ddl = "CREATE TABLE " + tableName
+   + " (region_name VARCHAR PRIMARY KEY,varchars 
VARCHAR[],integers INTEGER[],doubles DOUBLE[],bigints BIGINT[],"
+   + "chars CHAR(15)[],double1 DOUBLE,char1 
CHAR(17),nullcheck INTEGER,chars2 CHAR(15)[], nullVarchar VARCHAR[], nullBigInt 
BIGINT[],double2 DOUBLE,integer1 INTEGER,oneItem VARCHAR[],char2 
char(15),varchar1 VARCHAR)";
+   conn.createStatement().execute(ddl);
+   String dml = "UPSERT INTO " + tableName
+   + 
"(region_name,varchars,integers,doubles,bigints,chars,double1,char1,nullcheck,chars2,double2,integer1,oneItem,char2,varchar1)
 VALUES('SF Bay Area',"
+   + "ARRAY['2345','46345','23234']," + 
"ARRAY[2345,46345,23234,456],"
+   + "ARRAY[10.0,23.45,46.345,23.234,45.6,5.78]," 
+ "ARRAY[12,34,56,78,910],"
+   + "ARRAY['a','','c','ddd','e','c']," + 
"23.45," + "'wert'," + "NULL,"
+   + "ARRAY['a','','c','ddd','e','foo']," + 
"12," + "12," + "ARRAY['alone'],'2345','a')";
+   PreparedStatement stmt = conn.prepareStatement(dml);
+   stmt.execute();
+   conn.commit();
+   return tableName;
+   }
+
+   @Test
+   public void testEmptyArrayModification() throws Exception {
+   ResultSet rs = conn.createStatement()
+   .executeQuery("SELECT 
ARRAY_REMOVE(nullVarChar,'34567') FROM " + tableName + " LIMIT 1");
+   

[phoenix] Git Push Summary

2018-03-23 Thread pboado
Repository: phoenix
Updated Branches:
  refs/heads/4.x-cdh5.11 [created] 13c1309c2


[phoenix] Git Push Summary

2018-03-23 Thread pboado
Repository: phoenix
Updated Branches:
  refs/heads/4.x-cdh5.11.x [deleted] 13c1309c2


[phoenix] Git Push Summary

2018-03-23 Thread pboado
Repository: phoenix
Updated Branches:
  refs/heads/4.x-cdh5.11.x [created] 13c1309c2


svn commit: r1827578 - in /phoenix/site: publish/language/ publish/phoenixcon-2018/ source/src/site/resources/phoenixcon-2018/

2018-03-23 Thread elserj
Author: elserj
Date: Fri Mar 23 15:54:58 2018
New Revision: 1827578

URL: http://svn.apache.org/viewvc?rev=1827578=rev
Log:
Publish some word-smithing changes for phoenixcon

Modified:
phoenix/site/publish/language/datatypes.html
phoenix/site/publish/language/functions.html
phoenix/site/publish/language/index.html
phoenix/site/publish/phoenixcon-2018/feed.xml
phoenix/site/publish/phoenixcon-2018/index.html
phoenix/site/source/src/site/resources/phoenixcon-2018/feed.xml
phoenix/site/source/src/site/resources/phoenixcon-2018/index.html

Modified: phoenix/site/publish/language/datatypes.html
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/language/datatypes.html?rev=1827578=1827577=1827578=diff
==
--- phoenix/site/publish/language/datatypes.html (original)
+++ phoenix/site/publish/language/datatypes.html Fri Mar 23 15:54:58 2018
@@ -1,7 +1,7 @@
 
 
 
 

Modified: phoenix/site/publish/language/functions.html
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/language/functions.html?rev=1827578=1827577=1827578=diff
==
--- phoenix/site/publish/language/functions.html (original)
+++ phoenix/site/publish/language/functions.html Fri Mar 23 15:54:58 2018
@@ -1,7 +1,7 @@
 
 
 
 

Modified: phoenix/site/publish/language/index.html
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/language/index.html?rev=1827578=1827577=1827578=diff
==
--- phoenix/site/publish/language/index.html (original)
+++ phoenix/site/publish/language/index.html Fri Mar 23 15:54:58 2018
@@ -1,7 +1,7 @@
 
 
 
 

Modified: phoenix/site/publish/phoenixcon-2018/feed.xml
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/phoenixcon-2018/feed.xml?rev=1827578=1827577=1827578=diff
==
--- phoenix/site/publish/phoenixcon-2018/feed.xml (original)
+++ phoenix/site/publish/phoenixcon-2018/feed.xml Fri Mar 23 15:54:58 2018
@@ -4,7 +4,7 @@
   https://jekyllrb.com/; version="3.7.3">Jekyll
   https://phoenix.apache.org/phoenixcon-2018//phoenixcon-2018/feed.xml; 
rel="self" type="application/atom+xml" />
   https://phoenix.apache.org/phoenixcon-2018//phoenixcon-2018/; 
rel="alternate" type="text/html" />
-  2018-03-22T15:55:34-04:00
+  2018-03-23T11:38:54-04:00
   https://phoenix.apache.org/phoenixcon-2018//phoenixcon-2018/
 
   

Modified: phoenix/site/publish/phoenixcon-2018/index.html
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/phoenixcon-2018/index.html?rev=1827578=1827577=1827578=diff
==
--- phoenix/site/publish/phoenixcon-2018/index.html (original)
+++ phoenix/site/publish/phoenixcon-2018/index.html Fri Mar 23 15:54:58 2018
@@ -105,23 +105,19 @@
 
 
 
-HBaseCon (founded in 2012) is the premier conference 
for the https://hbase.apache.org;>Apache HBase
- community—including committers/contributors, 
developers, operators, learners, and users (including some of those
- managing the largest deployments in the world). If you 
run Apache HBase in production or aspire to do so, HBaseCon
- has no substitute!
-
 PhoenixCon (founded in 2016) is the leading event 
covering https://phoenix.apache.org;>Apache Phoenix.
 PhoenixCon is the best venue in which to learn something 
new or share real-life stories about Phoenix.
 
-2018 is the first year in which both HBaseCon and 
PhoenixCon will be held in the same venue and on the same day.
-This is specifically designed to maximize the value that 
attendees will receive from speakers about both HBase
-and Phoenix. This event is also scheduled for the same 
week as the DataWorks Summit; attendees are encouraged to consider
-attendance to all events!
+This year, PhoenixCon will take place on the Monday of 
the
+https://dataworkssummit.com/san-jose-2018/;>DataWorks Summit San Jose 
2018 at the
+https://www.sanjose.org/convention-center;>San 
Jose Convention Center.
+Of note, HBaseCon  will be held in the same venue on the 
same day. We will make it so that attendees will be
+able to pass freely between the two events. As the 
DataWorks Summit is happening this same week, attendees
+are encouraged to consider attending all events!
 
-https://hbase.apache.org;>Apache HBase is 
a native distributed data store for the Apache Hadoop
- ecosystem. https://phoenix.apache.org;>Apache 
Phoenix enables OLTP 

Build failed in Jenkins: Phoenix Compile Compatibility with HBase #584

2018-03-23 Thread Apache Jenkins Server
See 


--
[...truncated 39.68 KB...]
[ERROR] 
:[364,5]
 method does not override or implement a method from a supertype
[ERROR] 
:[370,5]
 method does not override or implement a method from a supertype
[ERROR] 
:[376,5]
 method does not override or implement a method from a supertype
[ERROR] 
:[382,5]
 method does not override or implement a method from a supertype
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on 
project phoenix-core: Compilation failure: Compilation failure: 
[ERROR] 
:[34,39]
 cannot find symbol
[ERROR]   symbol:   class MetricRegistry
[ERROR]   location: package org.apache.hadoop.hbase.metrics
[ERROR] 
:[144,16]
 cannot find symbol
[ERROR]   symbol:   class MetricRegistry
[ERROR]   location: class 
org.apache.phoenix.coprocessor.PhoenixMetaDataCoprocessorHost.PhoenixMetaDataControllerEnvironment
[ERROR] 
:[24,35]
 cannot find symbol
[ERROR]   symbol:   class DelegatingHBaseRpcController
[ERROR]   location: package org.apache.hadoop.hbase.ipc
[ERROR] 
:[25,35]
 cannot find symbol
[ERROR]   symbol:   class HBaseRpcController
[ERROR]   location: package org.apache.hadoop.hbase.ipc
[ERROR] 
:[37,37]
 cannot find symbol
[ERROR]   symbol: class DelegatingHBaseRpcController
[ERROR] 
:[56,38]
 cannot find symbol
[ERROR]   symbol:   class HBaseRpcController
[ERROR]   location: class 
org.apache.hadoop.hbase.ipc.controller.MetadataRpcController
[ERROR] 
:[26,35]
 cannot find symbol
[ERROR]   symbol:   class HBaseRpcController
[ERROR]   location: package org.apache.hadoop.hbase.ipc
[ERROR] 
:[40,12]
 cannot find symbol
[ERROR]   symbol:   class HBaseRpcController
[ERROR]   location: class 
org.apache.hadoop.hbase.ipc.controller.InterRegionServerMetadataRpcControllerFactory
[ERROR] 
:[46,12]
 cannot find symbol
[ERROR]   symbol:   class HBaseRpcController
[ERROR]   location: class 
org.apache.hadoop.hbase.ipc.controller.InterRegionServerMetadataRpcControllerFactory
[ERROR] 
:[52,12]
 cannot find symbol
[ERROR]   symbol:   class HBaseRpcController
[ERROR]   location: class 
org.apache.hadoop.hbase.ipc.controller.InterRegionServerMetadataRpcControllerFactory
[ERROR] 
:[57,46]
 cannot