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

2018-02-23 Thread rajeshbabu
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/1123f96c
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/1123f96c
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/1123f96c

Branch: refs/heads/5.x-HBase-2.0
Commit: 1123f96cb03ef15e26a4aa2bd77d9a931a33e707
Parents: 9ff02ea
Author: Rajeshbabu Chintaguntla 
Authored: Fri Feb 23 23:34:17 2018 +0530
Committer: Rajeshbabu Chintaguntla 
Committed: Fri Feb 23 23:34:17 2018 +0530

--
 .../phoenix/end2end/index/BaseIndexIT.java  |   2 +-
 .../phoenix/end2end/index/ImmutableIndexIT.java |   2 +
 .../org/apache/phoenix/cache/HashCache.java |   1 +
 .../phoenix/cache/IndexMetaDataCache.java   |   8 +
 .../apache/phoenix/cache/ServerCacheClient.java |   2 +
 .../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 |   2 +
 .../coprocessor/ServerCachingEndpointImpl.java  |   4 +-
 .../coprocessor/ServerCachingProtocol.java  |   2 +-
 .../UngroupedAggregateRegionObserver.java   |  23 +-
 .../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 |   5 -
 .../index/IndexMetaDataCacheFactory.java|   7 +-
 .../apache/phoenix/index/PhoenixIndexCodec.java |   3 +-
 .../phoenix/index/PhoenixIndexMetaData.java |  12 +
 .../index/PhoenixTransactionalIndexer.java  |   8 +-
 .../phoenix/jdbc/PhoenixDatabaseMetaData.java   |   1 +
 .../apache/phoenix/join/HashCacheFactory.java   |  34 +-
 .../index/PhoenixIndexPartialBuildMapper.java   |   5 +
 .../query/ConnectionQueryServicesImpl.java  |   8 -
 .../org/apache/phoenix/schema/PTableImpl.java   |  22 +-
 .../apache/phoenix/cache/TenantCacheTest.java   |  14 +-
 .../src/main/ServerCachingService.proto |   1 +
 29 files changed, 757 insertions(+), 92 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/1123f96c/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 c2f00e7..48268dd 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/1123f96c/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 c83ca4a..85a26f9 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
@@ -72,6 +72,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;
@@ -83,6 +84,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)
 

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

2018-02-12 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/47dc9359
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/47dc9359
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/47dc9359

Branch: refs/heads/4.x-HBase-1.1
Commit: 47dc935945cda24e0a507a032c3b7c2fe5b2cd43
Parents: aef828d
Author: James Taylor 
Authored: Mon Feb 12 12:27:10 2018 -0800
Committer: James Taylor 
Committed: Mon Feb 12 15:30:00 2018 -0800

--
 .../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   |  21 +-
 .../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   |  34 +-
 .../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, 759 insertions(+), 103 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/47dc9359/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/47dc9359/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(",");
@@ -250,7 

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

2018-02-12 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/e1566570
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/e1566570
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/e1566570

Branch: refs/heads/4.x-cdh5.11.2
Commit: e1566570ad81680e115b18b0124e083ca3ab9e40
Parents: 06ecae7
Author: James Taylor 
Authored: Mon Feb 12 12:27:10 2018 -0800
Committer: James Taylor 
Committed: Mon Feb 12 15:26:25 2018 -0800

--
 .../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 |   2 +
 .../coprocessor/ServerCachingEndpointImpl.java  |   4 +-
 .../coprocessor/ServerCachingProtocol.java  |   2 +-
 .../UngroupedAggregateRegionObserver.java   |  21 +-
 .../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   |  34 +-
 .../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, 758 insertions(+), 102 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/e1566570/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/e1566570/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(",");
@@ -250,7 

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

2018-02-12 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/0d0c0fea
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/0d0c0fea
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/0d0c0fea

Branch: refs/heads/master
Commit: 0d0c0feaeb22080b161f26790ac526f6e57f1777
Parents: 9461d0d
Author: James Taylor 
Authored: Mon Feb 12 12:27:10 2018 -0800
Committer: James Taylor 
Committed: Mon Feb 12 15:23:17 2018 -0800

--
 .../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 |   2 +
 .../coprocessor/ServerCachingEndpointImpl.java  |   4 +-
 .../coprocessor/ServerCachingProtocol.java  |   2 +-
 .../UngroupedAggregateRegionObserver.java   |  21 +-
 .../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   |  34 +-
 .../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, 758 insertions(+), 102 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/0d0c0fea/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/0d0c0fea/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(",");
@@ -250,7 +252,7 

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

2018-02-12 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/c40a18c9
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/c40a18c9
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/c40a18c9

Branch: refs/heads/4.x-HBase-1.3
Commit: c40a18c9370a8edff0b3ad22722eeb6b4a69b593
Parents: ab90709
Author: James Taylor 
Authored: Mon Feb 12 12:27:10 2018 -0800
Committer: James Taylor 
Committed: Mon Feb 12 15:19:22 2018 -0800

--
 .../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 |   2 +
 .../coprocessor/ServerCachingEndpointImpl.java  |   4 +-
 .../coprocessor/ServerCachingProtocol.java  |   2 +-
 .../UngroupedAggregateRegionObserver.java   |  21 +-
 .../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   |  34 +-
 .../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, 758 insertions(+), 102 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c40a18c9/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/c40a18c9/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(",");
@@ -250,7