hgromer commented on code in PR #7480:
URL: https://github.com/apache/hbase/pull/7480#discussion_r2560142210


##########
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileOutputFormat2.java:
##########
@@ -443,23 +453,26 @@ private WriterLength getNewWriter(byte[] tableName, 
byte[] family, Configuration
 
         HFileContext hFileContext = contextBuilder.build();
         if (null == favoredNodes) {
-          wl.writer =
+          wi.writer =
             new StoreFileWriter.Builder(conf, CacheConfig.DISABLED, 
fs).withOutputDir(familydir)
               .withBloomType(bloomType).withFileContext(hFileContext).build();
         } else {
-          wl.writer = new StoreFileWriter.Builder(conf, CacheConfig.DISABLED, 
new HFileSystem(fs))
+          wi.writer = new StoreFileWriter.Builder(conf, CacheConfig.DISABLED, 
new HFileSystem(fs))
             
.withOutputDir(familydir).withBloomType(bloomType).withFileContext(hFileContext)
             .withFavoredNodes(favoredNodes).build();
         }
 
-        this.writers.put(tableAndFamily, wl);
-        return wl;
+        this.writers.put(tableAndFamily, wi);
+        return wi;
       }
 
-      private void close(final StoreFileWriter w) throws IOException {
+      private void close(final StoreFileWriter w, final WriterInfo wl) throws 
IOException {
         if (w != null) {
           w.appendFileInfo(BULKLOAD_TIME_KEY, 
Bytes.toBytes(EnvironmentEdgeManager.currentTime()));
           w.appendFileInfo(BULKLOAD_TASK_KEY, 
Bytes.toBytes(context.getTaskAttemptID().toString()));
+          if (conf.getBoolean(SET_MAX_SEQ_ID_KEY, false) && wl.maxSequenceId 
>= 0) {
+            w.appendFileInfo(MAX_SEQ_ID_KEY, Bytes.toBytes(wl.maxSequenceId));

Review Comment:
   In the case where we have a set of incremental backups where some have 
`SET_MAX_SEQ_ID_KEY = true`, and others have `SET_MAX_SEQ_ID_KEY = false`; the 
only "issue" you run into is ordering, which is already inconsistent. Is that 
correct? I'm trying to think through any possible backwards compatibility 
issues for the release, but it seems to me that we should be all set here.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to