[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()) {
   

[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.
*/


[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.
*/


[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.
*/


[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