Repository: phoenix
Updated Branches:
  refs/heads/master b768900d9 -> ccd41de7b


PHOENIX-4613 Thread clientVersion through to IndexCommitter implementors


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

Branch: refs/heads/master
Commit: ccd41de7bfd5047511db3eb6c17121e92eebf1e6
Parents: b768900
Author: James Taylor <jtay...@salesforce.com>
Authored: Fri Apr 20 11:44:13 2018 -0700
Committer: Vincent Poon <vincentp...@apache.org>
Committed: Fri Apr 20 11:45:06 2018 -0700

----------------------------------------------------------------------
 .../org/apache/phoenix/hbase/index/Indexer.java | 14 +++++++++----
 .../hbase/index/builder/IndexBuildManager.java  |  4 ++++
 .../hbase/index/covered/IndexMetaData.java      | 12 ++++++++++-
 .../hbase/index/write/IndexCommitter.java       |  2 +-
 .../phoenix/hbase/index/write/IndexWriter.java  | 21 ++++++++++----------
 .../write/ParallelWriterIndexCommitter.java     |  2 +-
 .../hbase/index/write/RecoveryIndexWriter.java  |  4 ++--
 .../TrackingParallelWriterIndexCommitter.java   |  2 +-
 .../index/PhoenixTransactionalIndexer.java      |  9 +++++++--
 .../index/covered/LocalTableStateTest.java      | 18 ++++++++++++++++-
 .../hbase/index/write/TestIndexWriter.java      |  7 +++----
 .../index/write/TestParalleIndexWriter.java     |  4 +++-
 .../write/TestParalleWriterIndexCommitter.java  |  3 ++-
 13 files changed, 73 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/ccd41de7/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/Indexer.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/Indexer.java 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/Indexer.java
index 7b9bc1f..7325cd8 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/Indexer.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/Indexer.java
@@ -92,6 +92,7 @@ import org.apache.phoenix.trace.TracingUtils;
 import org.apache.phoenix.trace.util.NullSpan;
 import org.apache.phoenix.util.EnvironmentEdgeManager;
 import org.apache.phoenix.util.PropertiesUtil;
+import org.apache.phoenix.util.ScanUtil;
 import org.apache.phoenix.util.ServerUtil;
 
 import com.google.common.collect.Lists;
@@ -132,8 +133,13 @@ public class Indexer extends BaseRegionObserver {
   // Hack to get around not being able to save any state between
   // coprocessor calls. TODO: remove after HBASE-18127 when available
   private static class BatchMutateContext {
+      public final int clientVersion;
       public Collection<Pair<Mutation, byte[]>> indexUpdates = 
Collections.emptyList();
       public List<RowLock> rowLocks = 
Lists.newArrayListWithExpectedSize(QueryServicesOptions.DEFAULT_MUTATE_BATCH_SIZE);
+
+      public BatchMutateContext(int clientVersion) {
+          this.clientVersion = clientVersion;
+      }
   }
   
   private ThreadLocal<BatchMutateContext> batchMutateContext =
@@ -396,7 +402,7 @@ public class Indexer extends BaseRegionObserver {
        * Exclusively lock all rows so we get a consistent read
        * while determining the index updates
        */
-      BatchMutateContext context = new BatchMutateContext();
+      BatchMutateContext context = new 
BatchMutateContext(this.builder.getIndexMetaData(miniBatchOp).getClientVersion());
       setBatchMutateContext(c, context);
       Durability durability = Durability.SKIP_WAL;
       boolean copyMutations = false;
@@ -624,7 +630,7 @@ public class Indexer extends BaseRegionObserver {
           long start = EnvironmentEdgeManager.currentTimeMillis();
           
           current.addTimelineAnnotation("Actually doing index update for first 
time");
-          writer.writeAndKillYourselfOnFailure(context.indexUpdates, false);
+          writer.writeAndKillYourselfOnFailure(context.indexUpdates, false, 
context.clientVersion);
 
           long duration = EnvironmentEdgeManager.currentTimeMillis() - start;
           if (duration >= slowIndexWriteThreshold) {
@@ -693,7 +699,7 @@ public class Indexer extends BaseRegionObserver {
         // do the usual writer stuff, killing the server again, if we can't 
manage to make the index
         // writes succeed again
         try {
-            writer.writeAndKillYourselfOnFailure(updates, true);
+            writer.writeAndKillYourselfOnFailure(updates, true, 
ScanUtil.UNKNOWN_CLIENT_VERSION);
         } catch (IOException e) {
                 LOG.error("During WAL replay of outstanding index updates, "
                         + "Exception is thrown instead of killing server 
during index writing", e);
@@ -731,7 +737,7 @@ public class Indexer extends BaseRegionObserver {
            * hopes they come up before the primary table finishes.
            */
           Collection<Pair<Mutation, byte[]>> indexUpdates = 
extractIndexUpdate(logEdit);
-          recoveryWriter.writeAndKillYourselfOnFailure(indexUpdates, true);
+          recoveryWriter.writeAndKillYourselfOnFailure(indexUpdates, true, 
ScanUtil.UNKNOWN_CLIENT_VERSION);
       } finally {
           long duration = EnvironmentEdgeManager.currentTimeMillis() - start;
           if (duration >= slowPreWALRestoreThreshold) {

http://git-wip-us.apache.org/repos/asf/phoenix/blob/ccd41de7/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/builder/IndexBuildManager.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/builder/IndexBuildManager.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/builder/IndexBuildManager.java
index 4c410ad..2550dd1 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/builder/IndexBuildManager.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/builder/IndexBuildManager.java
@@ -73,6 +73,10 @@ public class IndexBuildManager implements Stoppable {
     }
   }
 
+  public IndexMetaData getIndexMetaData(MiniBatchOperationInProgress<Mutation> 
miniBatchOp) throws IOException {
+      return this.delegate.getIndexMetaData(miniBatchOp);
+  }
+
   public Collection<Pair<Mutation, byte[]>> getIndexUpdate(
       MiniBatchOperationInProgress<Mutation> miniBatchOp,
       Collection<? extends Mutation> mutations) throws Throwable {

http://git-wip-us.apache.org/repos/asf/phoenix/blob/ccd41de7/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/IndexMetaData.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/IndexMetaData.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/IndexMetaData.java
index 20ed855..18b515c 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/IndexMetaData.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/IndexMetaData.java
@@ -19,8 +19,10 @@ package org.apache.phoenix.hbase.index.covered;
 
 import org.apache.hadoop.hbase.client.Mutation;
 import org.apache.phoenix.coprocessor.BaseScannerRegionObserver.ReplayWrite;
+import org.apache.phoenix.util.ScanUtil;
 
 public interface IndexMetaData {
+
     public static final IndexMetaData NULL_INDEX_META_DATA = new 
IndexMetaData() {
 
         @Override
@@ -31,7 +33,13 @@ public interface IndexMetaData {
         @Override
         public ReplayWrite getReplayWrite() {
           return null;
-        }};
+        }
+
+        @Override
+        public int getClientVersion() {
+            return ScanUtil.UNKNOWN_CLIENT_VERSION;
+        }
+    };
 
         
     /**
@@ -42,4 +50,6 @@ public interface IndexMetaData {
     public boolean requiresPriorRowState(Mutation m);
 
     public ReplayWrite getReplayWrite();
+    
+    public int getClientVersion();
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/ccd41de7/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/write/IndexCommitter.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/write/IndexCommitter.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/write/IndexCommitter.java
index 5e3f3ed..e9dc202 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/write/IndexCommitter.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/write/IndexCommitter.java
@@ -32,6 +32,6 @@ public interface IndexCommitter extends Stoppable {
 
   void setup(IndexWriter parent, RegionCoprocessorEnvironment env, String 
name);
 
-  public void write(Multimap<HTableInterfaceReference, Mutation> toWrite, 
boolean allowLocalUpdates)
+  public void write(Multimap<HTableInterfaceReference, Mutation> toWrite, 
boolean allowLocalUpdates, int clientVersion)
       throws IndexWriteException;
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/phoenix/blob/ccd41de7/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/write/IndexWriter.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/write/IndexWriter.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/write/IndexWriter.java
index 4e5e182..c28288c 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/write/IndexWriter.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/write/IndexWriter.java
@@ -135,13 +135,14 @@ public class IndexWriter implements Stoppable {
    * which ensures that the server crashes when an index write fails, ensuring 
that we get WAL
    * replay of the index edits.
    * @param indexUpdates Updates to write
+ * @param clientVersion version of the client
  * @throws IOException 
    */
     public void writeAndKillYourselfOnFailure(Collection<Pair<Mutation, 
byte[]>> indexUpdates,
-            boolean allowLocalUpdates) throws IOException {
+            boolean allowLocalUpdates, int clientVersion) throws IOException {
     // convert the strings to htableinterfaces to which we can talk and group 
by TABLE
     Multimap<HTableInterfaceReference, Mutation> toWrite = 
resolveTableReferences(indexUpdates);
-    writeAndKillYourselfOnFailure(toWrite, allowLocalUpdates);
+    writeAndKillYourselfOnFailure(toWrite, allowLocalUpdates, clientVersion);
   }
 
   /**
@@ -150,9 +151,9 @@ public class IndexWriter implements Stoppable {
  * @throws IOException 
    */
     public void 
writeAndKillYourselfOnFailure(Multimap<HTableInterfaceReference, Mutation> 
toWrite,
-            boolean allowLocalUpdates) throws IOException {
+            boolean allowLocalUpdates, int clientVersion) throws IOException {
     try {
-      write(toWrite, allowLocalUpdates);
+      write(toWrite, allowLocalUpdates, clientVersion);
       if (LOG.isTraceEnabled()) {
         LOG.trace("Done writing all index updates!\n\t" + toWrite);
       }
@@ -176,12 +177,12 @@ public class IndexWriter implements Stoppable {
    * @throws IndexWriteException if we cannot successfully write to the index. 
Whether or not we
    *           stop early depends on the {@link IndexCommitter}.
    */
-    public void write(Collection<Pair<Mutation, byte[]>> toWrite) throws 
IndexWriteException {
-       write(resolveTableReferences(toWrite), false);
+    public void write(Collection<Pair<Mutation, byte[]>> toWrite, int 
clientVersion) throws IndexWriteException {
+       write(resolveTableReferences(toWrite), false, clientVersion);
     }
 
-    public void write(Collection<Pair<Mutation, byte[]>> toWrite, boolean 
allowLocalUpdates) throws IOException {
-       write(resolveTableReferences(toWrite), allowLocalUpdates);
+    public void write(Collection<Pair<Mutation, byte[]>> toWrite, boolean 
allowLocalUpdates, int clientVersion) throws IOException {
+       write(resolveTableReferences(toWrite), allowLocalUpdates, 
clientVersion);
     }
     
     /**
@@ -189,9 +190,9 @@ public class IndexWriter implements Stoppable {
    * @param toWrite
    * @throws IndexWriteException
    */
-  public void write(Multimap<HTableInterfaceReference, Mutation> toWrite, 
boolean allowLocalUpdates)
+  public void write(Multimap<HTableInterfaceReference, Mutation> toWrite, 
boolean allowLocalUpdates, int clientVersion)
              throws IndexWriteException {
-         this.writer.write(toWrite, allowLocalUpdates);
+         this.writer.write(toWrite, allowLocalUpdates, clientVersion);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/phoenix/blob/ccd41de7/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/write/ParallelWriterIndexCommitter.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/write/ParallelWriterIndexCommitter.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/write/ParallelWriterIndexCommitter.java
index 0bb8784..aba2678 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/write/ParallelWriterIndexCommitter.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/write/ParallelWriterIndexCommitter.java
@@ -94,7 +94,7 @@ public class ParallelWriterIndexCommitter implements 
IndexCommitter {
     }
 
     @Override
-    public void write(Multimap<HTableInterfaceReference, Mutation> toWrite, 
final boolean allowLocalUpdates) throws SingleIndexWriteFailureException {
+    public void write(Multimap<HTableInterfaceReference, Mutation> toWrite, 
final boolean allowLocalUpdates, final int clientVersion) throws 
SingleIndexWriteFailureException {
         /*
          * This bit here is a little odd, so let's explain what's going on. 
Basically, we want to do the writes in
          * parallel to each index table, so each table gets its own task and 
is submitted to the pool. Where it gets

http://git-wip-us.apache.org/repos/asf/phoenix/blob/ccd41de7/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/write/RecoveryIndexWriter.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/write/RecoveryIndexWriter.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/write/RecoveryIndexWriter.java
index e340784..35f0a6d 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/write/RecoveryIndexWriter.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/write/RecoveryIndexWriter.java
@@ -69,9 +69,9 @@ public class RecoveryIndexWriter extends IndexWriter {
     }
 
     @Override
-    public void write(Collection<Pair<Mutation, byte[]>> toWrite, boolean 
allowLocalUpdates) throws IOException {
+    public void write(Collection<Pair<Mutation, byte[]>> toWrite, boolean 
allowLocalUpdates, int clientVersion) throws IOException {
         try {
-            write(resolveTableReferences(toWrite), allowLocalUpdates);
+            write(resolveTableReferences(toWrite), allowLocalUpdates, 
clientVersion);
         } catch (MultiIndexWriteFailureException e) {
             for (HTableInterfaceReference table : e.getFailedTables()) {
                 if (!admin.tableExists(table.getTableName())) {

http://git-wip-us.apache.org/repos/asf/phoenix/blob/ccd41de7/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/write/TrackingParallelWriterIndexCommitter.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/write/TrackingParallelWriterIndexCommitter.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/write/TrackingParallelWriterIndexCommitter.java
index 94d4f0f..4dbad63 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/write/TrackingParallelWriterIndexCommitter.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/write/TrackingParallelWriterIndexCommitter.java
@@ -115,7 +115,7 @@ public class TrackingParallelWriterIndexCommitter 
implements IndexCommitter {
     }
 
     @Override
-    public void write(Multimap<HTableInterfaceReference, Mutation> toWrite, 
final boolean allowLocalUpdates) throws MultiIndexWriteFailureException {
+    public void write(Multimap<HTableInterfaceReference, Mutation> toWrite, 
final boolean allowLocalUpdates, final int clientVersion) throws 
MultiIndexWriteFailureException {
         Set<Entry<HTableInterfaceReference, Collection<Mutation>>> entries = 
toWrite.asMap().entrySet();
         TaskBatch<Boolean> tasks = new TaskBatch<Boolean>(entries.size());
         List<HTableInterfaceReference> tables = new 
ArrayList<HTableInterfaceReference>(entries.size());

http://git-wip-us.apache.org/repos/asf/phoenix/blob/ccd41de7/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
 
b/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixTransactionalIndexer.java
index f0b2678..bdfcaff 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixTransactionalIndexer.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixTransactionalIndexer.java
@@ -74,6 +74,11 @@ public class PhoenixTransactionalIndexer extends 
BaseRegionObserver {
     // coprocessor calls. TODO: remove after HBASE-18127 when available
     private static class BatchMutateContext {
         public Collection<Pair<Mutation, byte[]>> indexUpdates = 
Collections.emptyList();
+        public final int clientVersion;
+
+        public BatchMutateContext(int clientVersion) {
+            this.clientVersion = clientVersion;
+        }
     }
     
     private ThreadLocal<BatchMutateContext> batchMutateContext =
@@ -159,7 +164,7 @@ public class PhoenixTransactionalIndexer extends 
BaseRegionObserver {
             super.preBatchMutate(c, miniBatchOp);
             return;
         }
-        BatchMutateContext context = new BatchMutateContext();
+        BatchMutateContext context = new 
BatchMutateContext(indexMetaData.getClientVersion());
         setBatchMutateContext(c, context);
         
         Collection<Pair<Mutation, byte[]>> indexUpdates = null;
@@ -229,7 +234,7 @@ public class PhoenixTransactionalIndexer extends 
BaseRegionObserver {
 
             if (success) { // if miniBatchOp was successfully written, write 
index updates
                 if (!context.indexUpdates.isEmpty()) {
-                    this.writer.write(context.indexUpdates, false);
+                    this.writer.write(context.indexUpdates, false, 
context.clientVersion);
                 }
                 current.addTimelineAnnotation("Wrote index updates");
             }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/ccd41de7/phoenix-core/src/test/java/org/apache/phoenix/hbase/index/covered/LocalTableStateTest.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/test/java/org/apache/phoenix/hbase/index/covered/LocalTableStateTest.java
 
b/phoenix-core/src/test/java/org/apache/phoenix/hbase/index/covered/LocalTableStateTest.java
index c7e1769..56ba1d6 100644
--- 
a/phoenix-core/src/test/java/org/apache/phoenix/hbase/index/covered/LocalTableStateTest.java
+++ 
b/phoenix-core/src/test/java/org/apache/phoenix/hbase/index/covered/LocalTableStateTest.java
@@ -40,6 +40,7 @@ import org.apache.phoenix.hbase.index.covered.data.LocalTable;
 import org.apache.phoenix.hbase.index.covered.update.ColumnReference;
 import org.apache.phoenix.hbase.index.scanner.Scanner;
 import 
org.apache.phoenix.hbase.index.scanner.ScannerBuilder.CoveredDeleteScanner;
+import org.apache.phoenix.util.ScanUtil;
 import org.junit.Test;
 import org.mockito.Mockito;
 import org.mockito.invocation.InvocationOnMock;
@@ -67,6 +68,11 @@ public class LocalTableStateTest {
         return true;
     }
       
+    @Override
+    public int getClientVersion() {
+        return ScanUtil.UNKNOWN_CLIENT_VERSION;
+    }
+
   };
 
   @SuppressWarnings("unchecked")
@@ -130,7 +136,12 @@ public class LocalTableStateTest {
             return true;
         }
             
-        };
+        @Override
+        public int getClientVersion() {
+            return ScanUtil.UNKNOWN_CLIENT_VERSION;
+        }
+
+    };
     Put m = new Put(row);
     m.addColumn(fam, qual, ts, val);
     // setup mocks
@@ -167,6 +178,11 @@ public class LocalTableStateTest {
             return false;
         }
             
+        @Override
+        public int getClientVersion() {
+            return ScanUtil.UNKNOWN_CLIENT_VERSION;
+        }
+
     };
     Put m = new Put(row);
     m.addColumn(fam, qual, ts, val);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/ccd41de7/phoenix-core/src/test/java/org/apache/phoenix/hbase/index/write/TestIndexWriter.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/test/java/org/apache/phoenix/hbase/index/write/TestIndexWriter.java
 
b/phoenix-core/src/test/java/org/apache/phoenix/hbase/index/write/TestIndexWriter.java
index a25f7cf..58050c1 100644
--- 
a/phoenix-core/src/test/java/org/apache/phoenix/hbase/index/write/TestIndexWriter.java
+++ 
b/phoenix-core/src/test/java/org/apache/phoenix/hbase/index/write/TestIndexWriter.java
@@ -17,10 +17,8 @@
  */
 package org.apache.phoenix.hbase.index.write;
 
-import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
 
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -51,6 +49,7 @@ import org.apache.phoenix.hbase.index.StubAbortable;
 import org.apache.phoenix.hbase.index.TableName;
 import org.apache.phoenix.hbase.index.exception.IndexWriteException;
 import org.apache.phoenix.hbase.index.util.ImmutableBytesPtr;
+import org.apache.phoenix.util.ScanUtil;
 import org.junit.Rule;
 import org.junit.Test;
 import org.mockito.Mockito;
@@ -134,7 +133,7 @@ public class TestIndexWriter {
     KillServerOnFailurePolicy policy = new KillServerOnFailurePolicy();
     policy.setup(stop, abort);
     IndexWriter writer = new IndexWriter(committer, policy);
-    writer.write(indexUpdates);
+    writer.write(indexUpdates, ScanUtil.UNKNOWN_CLIENT_VERSION);
     assertTrue("Writer returned before the table batch completed! Likely a 
race condition tripped",
       completed[0]);
     writer.stop(this.testName.getTableNameString() + " finished");
@@ -208,7 +207,7 @@ public class TestIndexWriter {
       @Override
       public void run() {
         try {
-          writer.write(indexUpdates);
+          writer.write(indexUpdates, ScanUtil.UNKNOWN_CLIENT_VERSION);
         } catch (IndexWriteException e) {
           failedWrite[0] = true;
         }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/ccd41de7/phoenix-core/src/test/java/org/apache/phoenix/hbase/index/write/TestParalleIndexWriter.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/test/java/org/apache/phoenix/hbase/index/write/TestParalleIndexWriter.java
 
b/phoenix-core/src/test/java/org/apache/phoenix/hbase/index/write/TestParalleIndexWriter.java
index cd29e10..55c3fb3 100644
--- 
a/phoenix-core/src/test/java/org/apache/phoenix/hbase/index/write/TestParalleIndexWriter.java
+++ 
b/phoenix-core/src/test/java/org/apache/phoenix/hbase/index/write/TestParalleIndexWriter.java
@@ -41,8 +41,10 @@ import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.VersionInfo;
 import org.apache.phoenix.hbase.index.StubAbortable;
 import org.apache.phoenix.hbase.index.TableName;
+import org.apache.phoenix.hbase.index.covered.IndexMetaData;
 import org.apache.phoenix.hbase.index.table.HTableInterfaceReference;
 import org.apache.phoenix.hbase.index.util.ImmutableBytesPtr;
+import org.apache.phoenix.util.ScanUtil;
 import org.junit.Rule;
 import org.junit.Test;
 import org.mockito.Mockito;
@@ -124,7 +126,7 @@ public class TestParalleIndexWriter {
     // setup the writer and failure policy
     TrackingParallelWriterIndexCommitter writer = new 
TrackingParallelWriterIndexCommitter(VersionInfo.getVersion());
     writer.setup(factory, exec, abort, stop, e);
-    writer.write(indexUpdates, true);
+    writer.write(indexUpdates, true, ScanUtil.UNKNOWN_CLIENT_VERSION);
     assertTrue("Writer returned before the table batch completed! Likely a 
race condition tripped",
       completed[0]);
     writer.stop(this.test.getTableNameString() + " finished");

http://git-wip-us.apache.org/repos/asf/phoenix/blob/ccd41de7/phoenix-core/src/test/java/org/apache/phoenix/hbase/index/write/TestParalleWriterIndexCommitter.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/test/java/org/apache/phoenix/hbase/index/write/TestParalleWriterIndexCommitter.java
 
b/phoenix-core/src/test/java/org/apache/phoenix/hbase/index/write/TestParalleWriterIndexCommitter.java
index 32ae108..9767eae 100644
--- 
a/phoenix-core/src/test/java/org/apache/phoenix/hbase/index/write/TestParalleWriterIndexCommitter.java
+++ 
b/phoenix-core/src/test/java/org/apache/phoenix/hbase/index/write/TestParalleWriterIndexCommitter.java
@@ -43,6 +43,7 @@ import org.apache.phoenix.hbase.index.StubAbortable;
 import org.apache.phoenix.hbase.index.TableName;
 import org.apache.phoenix.hbase.index.table.HTableInterfaceReference;
 import org.apache.phoenix.hbase.index.util.ImmutableBytesPtr;
+import org.apache.phoenix.util.ScanUtil;
 import org.junit.Rule;
 import org.junit.Test;
 import org.mockito.Mockito;
@@ -125,7 +126,7 @@ public class TestParalleWriterIndexCommitter {
     // setup the writer and failure policy
     TrackingParallelWriterIndexCommitter writer = new 
TrackingParallelWriterIndexCommitter(VersionInfo.getVersion());
     writer.setup(factory, exec, abort, stop, e);
-    writer.write(indexUpdates, true);
+    writer.write(indexUpdates, true, ScanUtil.UNKNOWN_CLIENT_VERSION);
     assertTrue("Writer returned before the table batch completed! Likely a 
race condition tripped",
       completed[0]);
     writer.stop(this.test.getTableNameString() + " finished");

Reply via email to