From 05dddafc3744a7cf1e1a040d4a03d5b83d3d18fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B3=E8=83=9C=E5=88=A9?= <48829688+shenshengli@users.noreply.github.com> Date: Tue, 30 Mar 2021 02:56:37 +0800 Subject: [PATCH] =?UTF-8?q?HBASE-25710=20During=20the=20recovery=20process?= =?UTF-8?q?,if=20there=20is=20an=20incremental=20backup=20of=20data=20that?= =?UTF-8?q?=20has=20not=20been=20updated=EF=BC=8Cwarning=20and=20skip=20(#?= =?UTF-8?q?3103)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 申胜利 Signed-off-by: stack --- .../apache/hadoop/hbase/backup/impl/RestoreTablesClient.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/RestoreTablesClient.java b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/RestoreTablesClient.java index 25b90b4e773..5ec44ee9396 100644 --- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/RestoreTablesClient.java +++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/RestoreTablesClient.java @@ -170,6 +170,11 @@ public class RestoreTablesClient { } + if (dirList.isEmpty()) { + LOG.warn("Nothing has changed, so there is no need to restore '" + sTable + "'"); + return; + } + String dirs = StringUtils.join(dirList, ","); LOG.info("Restoring '" + sTable + "' to '" + tTable + "' from log dirs: " + dirs); Path[] paths = new Path[dirList.size()];