vinayakphegde commented on code in PR #7222:
URL: https://github.com/apache/hbase/pull/7222#discussion_r2285487315
##########
hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/replication/ContinuousBackupReplicationEndpoint.java:
##########
@@ -372,6 +385,42 @@ private void close() {
}
}
+ private void uploadBulkLoadFiles(long dayInMillis, List<Path> bulkLoadFiles)
throws IOException {
+ LOG.debug("{} Starting upload of {} bulk load files",
Utils.logPeerId(peerId),
+ bulkLoadFiles.size());
+
+ if (LOG.isTraceEnabled()) {
+ LOG.trace("{} Bulk load files to upload: {}", Utils.logPeerId(peerId),
+
bulkLoadFiles.stream().map(Path::toString).collect(Collectors.joining(", ")));
+ }
+ String dayDirectoryName = formatToDateString(dayInMillis);
+ Path bulkloadDir = new Path(backupFileSystemManager.getBulkLoadFilesDir(),
dayDirectoryName);
+ backupFileSystemManager.getBackupFs().mkdirs(bulkloadDir);
+
+ for (Path file : bulkLoadFiles) {
+ Path sourcePath = getBulkLoadFileStagingPath(file);
+ Path destPath = new Path(bulkloadDir, file);
+
+ try {
+ LOG.debug("{} Copying bulk load file from {} to {}",
Utils.logPeerId(peerId), sourcePath,
+ destPath);
+
+ FileUtil.copy(CommonFSUtils.getRootDirFileSystem(conf), sourcePath,
+ backupFileSystemManager.getBackupFs(), destPath, false, conf);
+
+ LOG.info("{} Bulk load file {} successfully backed up to {}",
Utils.logPeerId(peerId), file,
+ destPath);
+ } catch (IOException e) {
+ String errorMsg = String.format("%s Failed to back up bulk load file
%s to %s",
+ Utils.logPeerId(peerId), file, destPath);
+ LOG.error("{}: {}", errorMsg, e.getMessage(), e);
+ throw new IOException(errorMsg, e);
Review Comment:
Yeah, we are doing that. missed to mention 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]