You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by mb...@apache.org on 2012/08/04 10:06:05 UTC

svn commit: r1369278 - /hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/mapreduce/RowMutationSortReducer.java

Author: mbautin
Date: Sat Aug  4 08:06:05 2012
New Revision: 1369278

URL: http://svn.apache.org/viewvc?rev=1369278&view=rev
Log:
[master] [hotfix] [89-fb] Set bulk load memstore timestamp to zero

Author: mbautin

Summary:
Setting bulk load memestore timestamp to zero so we can see the bulk loaded data immediately.

This is not a master change but is specific to HBase 0.89-fb.

Test Plan:
Run unit tests.
Deploy to a cluster that does not have any write traffic, bulk load an HFile, and scan the loaded data.

Reviewers: aaiyer, kranganathan

Reviewed By: aaiyer

CC: hbase-eng@

Differential Revision: https://phabricator.fb.com/D531855

Modified:
    hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/mapreduce/RowMutationSortReducer.java

Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/mapreduce/RowMutationSortReducer.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/mapreduce/RowMutationSortReducer.java?rev=1369278&r1=1369277&r2=1369278&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/mapreduce/RowMutationSortReducer.java (original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/mapreduce/RowMutationSortReducer.java Sat Aug  4 08:06:05 2012
@@ -86,7 +86,12 @@ public class RowMutationSortReducer exte
           + "(" + StringUtils.humanReadableInt(curSize) + ")");
       int index = 0;
       for (KeyValue kv : map) {
-        context.write(row, kv);
+        // Set memstore timestamp to zero so that the data is immediately visible to all clients
+        // regardless of the target regionserver's readpoint.
+        KeyValue kvCopy = kv.shallowCopy();
+        kvCopy.setMemstoreTS(0);
+
+        context.write(row, kvCopy);
         if (index > 0 && index % 100 == 0)
           context.setStatus("Wrote " + index);
       }