diff --git hbase-server/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupSystemTable.java hbase-server/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupSystemTable.java index e32d7d4..e04c36e 100644 --- hbase-server/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupSystemTable.java +++ hbase-server/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupSystemTable.java @@ -121,8 +121,8 @@ public final class BackupSystemTable implements Closeable { */ public void updateBackupInfo(BackupInfo context) throws IOException { - if (LOG.isDebugEnabled()) { - LOG.debug("update backup status in hbase:backup for: " + context.getBackupId() + if (LOG.isTraceEnabled()) { + LOG.trace("update backup status in hbase:backup for: " + context.getBackupId() + " set status=" + context.getState()); } try (Table table = connection.getTable(tableName)) { @@ -139,8 +139,8 @@ public final class BackupSystemTable implements Closeable { public void deleteBackupInfo(String backupId) throws IOException { - if (LOG.isDebugEnabled()) { - LOG.debug("delete backup status in hbase:backup for " + backupId); + if (LOG.isTraceEnabled()) { + LOG.trace("delete backup status in hbase:backup for " + backupId); } try (Table table = connection.getTable(tableName)) { Delete del = BackupSystemTableHelper.createDeleteForBackupInfo(backupId); @@ -155,8 +155,8 @@ public final class BackupSystemTable implements Closeable { */ public BackupInfo readBackupInfo(String backupId) throws IOException { - if (LOG.isDebugEnabled()) { - LOG.debug("read backup status from hbase:backup for: " + backupId); + if (LOG.isTraceEnabled()) { + LOG.trace("read backup status from hbase:backup for: " + backupId); } try (Table table = connection.getTable(tableName)) { @@ -178,8 +178,8 @@ public final class BackupSystemTable implements Closeable { * @throws IOException exception */ public String readBackupStartCode(String backupRoot) throws IOException { - if (LOG.isDebugEnabled()) { - LOG.debug("read backup start code from hbase:backup"); + if (LOG.isTraceEnabled()) { + LOG.trace("read backup start code from hbase:backup"); } try (Table table = connection.getTable(tableName)) { Get get = BackupSystemTableHelper.createGetForStartCode(backupRoot); @@ -203,8 +203,8 @@ public final class BackupSystemTable implements Closeable { * @throws IOException exception */ public void writeBackupStartCode(Long startCode, String backupRoot) throws IOException { - if (LOG.isDebugEnabled()) { - LOG.debug("write backup start code to hbase:backup " + startCode); + if (LOG.isTraceEnabled()) { + LOG.trace("write backup start code to hbase:backup " + startCode); } try (Table table = connection.getTable(tableName)) { Put put = BackupSystemTableHelper.createPutForStartCode(startCode.toString(), backupRoot); @@ -220,8 +220,8 @@ public final class BackupSystemTable implements Closeable { */ public HashMap readRegionServerLastLogRollResult(String backupRoot) throws IOException { - if (LOG.isDebugEnabled()) { - LOG.debug("read region server last roll log result to hbase:backup"); + if (LOG.isTraceEnabled()) { + LOG.trace("read region server last roll log result to hbase:backup"); } Scan scan = BackupSystemTableHelper.createScanForReadRegionServerLastLogRollResult(backupRoot); @@ -252,8 +252,8 @@ public final class BackupSystemTable implements Closeable { */ public void writeRegionServerLastLogRollResult(String server, Long ts, String backupRoot) throws IOException { - if (LOG.isDebugEnabled()) { - LOG.debug("write region server last roll log result to hbase:backup"); + if (LOG.isTraceEnabled()) { + LOG.trace("write region server last roll log result to hbase:backup"); } try (Table table = connection.getTable(tableName)) { Put put = @@ -269,8 +269,8 @@ public final class BackupSystemTable implements Closeable { * @throws IOException exception */ public ArrayList getBackupHistory(boolean onlyCompleted) throws IOException { - if (LOG.isDebugEnabled()) { - LOG.debug("get backup history from hbase:backup"); + if (LOG.isTraceEnabled()) { + LOG.trace("get backup history from hbase:backup"); } ArrayList list; BackupState state = onlyCompleted ? BackupState.COMPLETE : BackupState.ANY; @@ -402,8 +402,8 @@ public final class BackupSystemTable implements Closeable { * @throws IOException exception */ public ArrayList getBackupContexts(BackupState status) throws IOException { - if (LOG.isDebugEnabled()) { - LOG.debug("get backup contexts from hbase:backup"); + if (LOG.isTraceEnabled()) { + LOG.trace("get backup contexts from hbase:backup"); } Scan scan = BackupSystemTableHelper.createScanForBackupHistory(); @@ -434,8 +434,8 @@ public final class BackupSystemTable implements Closeable { */ public void writeRegionServerLogTimestamp(Set tables, HashMap newTimestamps, String backupRoot) throws IOException { - if (LOG.isDebugEnabled()) { - LOG.debug("write RS log time stamps to hbase:backup for tables [" + if (LOG.isTraceEnabled()) { + LOG.trace("write RS log time stamps to hbase:backup for tables [" + StringUtils.join(tables, ",") + "]"); } List puts = new ArrayList(); @@ -462,8 +462,8 @@ public final class BackupSystemTable implements Closeable { */ public HashMap> readLogTimestampMap(String backupRoot) throws IOException { - if (LOG.isDebugEnabled()) { - LOG.debug("read RS log ts from hbase:backup for root=" + backupRoot); + if (LOG.isTraceEnabled()) { + LOG.trace("read RS log ts from hbase:backup for root=" + backupRoot); } HashMap> tableTimestampMap = @@ -532,8 +532,8 @@ public final class BackupSystemTable implements Closeable { * @throws IOException exception */ public Set getIncrementalBackupTableSet(String backupRoot) throws IOException { - if (LOG.isDebugEnabled()) { - LOG.debug("get incr backup table set from hbase:backup"); + if (LOG.isTraceEnabled()) { + LOG.trace("get incremental backup table set from hbase:backup"); } TreeSet set = new TreeSet<>(); @@ -560,8 +560,8 @@ public final class BackupSystemTable implements Closeable { */ public void addIncrementalBackupTableSet(Set tables, String backupRoot) throws IOException { - if (LOG.isDebugEnabled()) { - LOG.debug("Add incremental backup table set to hbase:backup. ROOT=" + backupRoot + if (LOG.isTraceEnabled()) { + LOG.trace("Add incremental backup table set to hbase:backup. ROOT=" + backupRoot + " tables [" + StringUtils.join(tables, " ") + "]"); for (TableName table : tables) { LOG.debug(table); @@ -579,8 +579,8 @@ public final class BackupSystemTable implements Closeable { */ public void deleteIncrementalBackupTableSet(String backupRoot) throws IOException { - if (LOG.isDebugEnabled()) { - LOG.debug("Delete incremental backup table set to hbase:backup. ROOT=" + backupRoot); + if (LOG.isTraceEnabled()) { + LOG.trace("Delete incremental backup table set to hbase:backup. ROOT=" + backupRoot); } try (Table table = connection.getTable(tableName)) { Delete delete = BackupSystemTableHelper.createDeleteForIncrBackupTableSet(backupRoot); @@ -597,8 +597,8 @@ public final class BackupSystemTable implements Closeable { */ public void addWALFiles(List files, String backupId, String backupRoot) throws IOException { - if (LOG.isDebugEnabled()) { - LOG.debug("add WAL files to hbase:backup: " + backupId + " " + backupRoot + " files [" + if (LOG.isTraceEnabled()) { + LOG.trace("add WAL files to hbase:backup: " + backupId + " " + backupRoot + " files [" + StringUtils.join(files, ",") + "]"); for (String f : files) { LOG.debug("add :" + f); @@ -617,8 +617,8 @@ public final class BackupSystemTable implements Closeable { * @throws IOException exception */ public Iterator getWALFilesIterator(String backupRoot) throws IOException { - if (LOG.isDebugEnabled()) { - LOG.debug("get WAL files from hbase:backup"); + if (LOG.isTraceEnabled()) { + LOG.trace("get WAL files from hbase:backup"); } final Table table = connection.getTable(tableName); Scan scan = BackupSystemTableHelper.createScanForGetWALs(backupRoot); @@ -676,8 +676,8 @@ public final class BackupSystemTable implements Closeable { * @throws IOException exception */ public boolean isWALFileDeletable(String file) throws IOException { - if (LOG.isDebugEnabled()) { - LOG.debug("Check if WAL file has been already backed up in hbase:backup " + file); + if (LOG.isTraceEnabled()) { + LOG.trace("Check if WAL file has been already backed up in hbase:backup " + file); } try (Table table = connection.getTable(tableName)) { Get get = BackupSystemTableHelper.createGetForCheckWALFile(file); @@ -696,8 +696,8 @@ public final class BackupSystemTable implements Closeable { * @throws IOException exception */ public boolean hasBackupSessions() throws IOException { - if (LOG.isDebugEnabled()) { - LOG.debug("Has backup sessions from hbase:backup"); + if (LOG.isTraceEnabled()) { + LOG.trace("Has backup sessions from hbase:backup"); } boolean result = false; Scan scan = BackupSystemTableHelper.createScanForBackupHistory(); @@ -721,8 +721,8 @@ public final class BackupSystemTable implements Closeable { * @throws IOException */ public List listBackupSets() throws IOException { - if (LOG.isDebugEnabled()) { - LOG.debug(" Backup set list"); + if (LOG.isTraceEnabled()) { + LOG.trace(" Backup set list"); } List list = new ArrayList(); Table table = null; @@ -755,8 +755,8 @@ public final class BackupSystemTable implements Closeable { * @throws IOException */ public List describeBackupSet(String name) throws IOException { - if (LOG.isDebugEnabled()) { - LOG.debug(" Backup set describe: " + name); + if (LOG.isTraceEnabled()) { + LOG.trace(" Backup set describe: " + name); } Table table = null; try { @@ -789,8 +789,8 @@ public final class BackupSystemTable implements Closeable { * @throws IOException */ public void addToBackupSet(String name, String[] newTables) throws IOException { - if (LOG.isDebugEnabled()) { - LOG.debug("Backup set add: " + name + " tables [" + StringUtils.join(newTables, " ") + "]"); + if (LOG.isTraceEnabled()) { + LOG.trace("Backup set add: " + name + " tables [" + StringUtils.join(newTables, " ") + "]"); } Table table = null; String[] union = null; @@ -836,8 +836,8 @@ public final class BackupSystemTable implements Closeable { * @throws IOException */ public void removeFromBackupSet(String name, String[] toRemove) throws IOException { - if (LOG.isDebugEnabled()) { - LOG.debug(" Backup set remove from : " + name + " tables [" + StringUtils.join(toRemove, " ") + if (LOG.isTraceEnabled()) { + LOG.trace(" Backup set remove from : " + name + " tables [" + StringUtils.join(toRemove, " ") + "]"); } Table table = null; @@ -892,8 +892,8 @@ public final class BackupSystemTable implements Closeable { * @throws IOException */ public void deleteBackupSet(String name) throws IOException { - if (LOG.isDebugEnabled()) { - LOG.debug(" Backup set delete: " + name); + if (LOG.isTraceEnabled()) { + LOG.trace(" Backup set delete: " + name); } Table table = null; try { diff --git hbase-server/src/main/java/org/apache/hadoop/hbase/backup/master/BackupLogCleaner.java hbase-server/src/main/java/org/apache/hadoop/hbase/backup/master/BackupLogCleaner.java index dbea917..7251a3f 100644 --- hbase-server/src/main/java/org/apache/hadoop/hbase/backup/master/BackupLogCleaner.java +++ hbase-server/src/main/java/org/apache/hadoop/hbase/backup/master/BackupLogCleaner.java @@ -86,7 +86,7 @@ public class BackupLogCleaner extends BaseLogCleanerDelegate { // If we do not have recorded backup sessions try { if (!table.hasBackupSessions()) { - LOG.debug("BackupLogCleaner has no backup sessions"); + LOG.trace("BackupLogCleaner has no backup sessions"); return files; } } catch (TableNotFoundException tnfe) {