HorizonNet commented on a change in pull request #1623:
URL: https://github.com/apache/hbase/pull/1623#discussion_r419099472



##########
File path: 
hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestSyncTable.java
##########
@@ -426,18 +451,19 @@ private Counters syncTables(TableName sourceTableName, 
TableName targetTableName
     return syncTable.counters;
   }
 
-  private void hashSourceTable(TableName sourceTableName, Path testDir) throws 
Exception {
+  private void hashSourceTable(TableName sourceTableName, Path testDir, 
String... options)
+      throws Exception {
     int numHashFiles = 3;
     long batchSize = 100;  // should be 2 batches per region
     int scanBatch = 1;
     HashTable hashTable = new HashTable(TEST_UTIL.getConfiguration());
-    int code = hashTable.run(new String[] {
-      "--batchsize=" + batchSize,
-      "--numhashfiles=" + numHashFiles,
-      "--scanbatch=" + scanBatch,
-      sourceTableName.getNameAsString(),
-      testDir.toString()
-    });
+    String[] args = Arrays.copyOf(options, options.length+5);
+    args[options.length] = "--batchsize=" + batchSize;
+    args[options.length+1] = "--numhashfiles=" + numHashFiles;

Review comment:
       NIT, add spaces around the plus.

##########
File path: 
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/SyncTable.java
##########
@@ -546,6 +567,19 @@ private boolean syncRowCells(Context context, byte[] 
rowKey, CellScanner sourceC
               if (put == null) {
                 put = new Put(rowKey);
               }
+              if (ignoreTimestamp) {

Review comment:
       Seems to duplicate the if-branch above. Could be moved into a separate 
method.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to