Repository: hbase Updated Branches: refs/heads/HBASE-7912 14170122c -> 6efa58128
HBASE-15988 User needs to initiate full backup for new table(s) being added for incremental backup Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/6efa5812 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/6efa5812 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/6efa5812 Branch: refs/heads/HBASE-7912 Commit: 6efa58128f876b874164c198b4f60aefde73bf99 Parents: 1417012 Author: tedyu <yuzhih...@gmail.com> Authored: Thu Jul 7 16:22:31 2016 -0700 Committer: tedyu <yuzhih...@gmail.com> Committed: Thu Jul 7 16:22:31 2016 -0700 ---------------------------------------------------------------------- .../main/java/org/apache/hadoop/hbase/master/HMaster.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/6efa5812/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java index 0a0fdf4..bbd7107 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java @@ -169,14 +169,13 @@ import org.apache.hadoop.hbase.zookeeper.SplitOrMergeTracker; import org.apache.hadoop.hbase.zookeeper.ZKClusterId; import org.apache.hadoop.hbase.zookeeper.ZKUtil; import org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher; +import org.apache.hadoop.util.StringUtils; import org.apache.zookeeper.KeeperException; import org.mortbay.jetty.Connector; import org.mortbay.jetty.nio.SelectChannelConnector; import org.mortbay.jetty.servlet.Context; import com.google.common.annotations.VisibleForTesting; -import com.google.common.cache.Cache; -import com.google.common.cache.CacheBuilder; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.protobuf.Descriptors; @@ -2632,6 +2631,13 @@ public class HMaster extends HRegionServer implements MasterServices { throw new DoNotRetryIOException("No table covered by incremental backup."); } + tableList.removeAll(incrTableSet); + if (!tableList.isEmpty()) { + String extraTables = StringUtils.join(",", tableList); + LOG.error("Some tables (" + extraTables + ") haven't gone through full backup"); + throw new DoNotRetryIOException("Perform full backup on " + extraTables + " first, " + + "then retry the command"); + } LOG.info("Incremental backup for the following table set: " + incrTableSet); tableList = Lists.newArrayList(incrTableSet); }