guluo2016 commented on code in PR #8902:
URL: https://github.com/apache/hbase/pull/8902#discussion_r4679521938
##########
hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/IncrementalTableBackupClient.java:
##########
@@ -167,26 +166,18 @@ protected List<BulkLoad> handleBulkLoad(List<TableName>
tablesToBackup,
Path tblDir = CommonFSUtils.getTableDir(rootdir, srcTable);
Path p = new Path(tblDir, regionName + Path.SEPARATOR + fam +
Path.SEPARATOR + filename);
String srcTableQualifier = srcTable.getQualifierAsString();
- String srcTableNs = srcTable.getNamespaceAsString();
- Path tgtFam = new Path(tgtRoot, srcTableNs + Path.SEPARATOR +
srcTableQualifier
- + Path.SEPARATOR + regionName + Path.SEPARATOR + fam);
- if (!tgtFs.mkdirs(tgtFam)) {
- throw new IOException("couldn't create " + tgtFam);
- }
-
- Path tgt = new Path(tgtFam, filename);
Path archiveDir = HFileArchiveUtil.getStoreArchivePath(conf, srcTable,
regionName, fam);
Path archive = new Path(archiveDir, filename);
if (fs.exists(p)) {
if (LOG.isTraceEnabled()) {
LOG.trace("found bulk hfile {} in {} for {}",
bulkLoad.getHfilePath(), p.getParent(),
srcTableQualifier);
- LOG.trace("copying {} to {}", p, tgt);
+ LOG.trace("copying {}", p);
Review Comment:
nit: This line can be removed since the bulk hfile hasn't started copying
yet.
##########
hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/IncrementalTableBackupClient.java:
##########
@@ -167,26 +166,18 @@ protected List<BulkLoad> handleBulkLoad(List<TableName>
tablesToBackup,
Path tblDir = CommonFSUtils.getTableDir(rootdir, srcTable);
Path p = new Path(tblDir, regionName + Path.SEPARATOR + fam +
Path.SEPARATOR + filename);
String srcTableQualifier = srcTable.getQualifierAsString();
- String srcTableNs = srcTable.getNamespaceAsString();
- Path tgtFam = new Path(tgtRoot, srcTableNs + Path.SEPARATOR +
srcTableQualifier
- + Path.SEPARATOR + regionName + Path.SEPARATOR + fam);
- if (!tgtFs.mkdirs(tgtFam)) {
- throw new IOException("couldn't create " + tgtFam);
- }
-
- Path tgt = new Path(tgtFam, filename);
Path archiveDir = HFileArchiveUtil.getStoreArchivePath(conf, srcTable,
regionName, fam);
Path archive = new Path(archiveDir, filename);
if (fs.exists(p)) {
if (LOG.isTraceEnabled()) {
LOG.trace("found bulk hfile {} in {} for {}",
bulkLoad.getHfilePath(), p.getParent(),
srcTableQualifier);
- LOG.trace("copying {} to {}", p, tgt);
+ LOG.trace("copying {}", p);
}
bulkloadInfo.addActiveFile(p.toString());
} else if (fs.exists(archive)) {
- LOG.debug("copying archive {} to {}", archive, tgt);
+ LOG.debug("copying archive {}", archive);
Review Comment:
nit: `LOG.debug("Adding archived bulk hfile {}", archive)` seems to be more
accurate.
--
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]