DieterDP-ng commented on code in PR #6067:
URL: https://github.com/apache/hbase/pull/6067#discussion_r1675444681


##########
hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupSystemTable.java:
##########
@@ -1902,4 +1905,18 @@ private static void ensureTableEnabled(Admin admin, 
TableName tableName) throws
       }
     }
   }
+
+  /**
+   * Executes the given operations in partitioned batches of size {@link 
#BATCH_SIZE}
+   */
+  private static void executePartitionedBatches(Table table, List<? extends 
Row> operations) {
+    List<? extends List<? extends Row>> operationBatches = 
Lists.partition(operations, BATCH_SIZE);
+    for (List<? extends Row> batch : operationBatches) {
+      try {
+        table.batch(batch, new Object[batch.size()]);
+      } catch (InterruptedException | IOException e) {

Review Comment:
   This is pattern I was referring to:
   
   ```
   } catch (InterruptedException e) {
                 Thread.currentThread().interrupt();
   }
   ```
   I see it's used in some location in HBase code, but not in others.
   
   Basically, it comes down to how interrupts are used. If interrupts should 
halt the workload that is happening, it should be propagated so calling 
(blocking) methods of the interrupted code also get interrupted. In more 
specific cases, it depends...



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