Skip to content

Commit b689ad8

Browse files
hgromerHernan Gelaf-Romer
authored andcommitted
HBASE-28917 ColumnFamilyMismatchException mixes IA public and private (#6369)
Co-authored-by: Hernan Gelaf-Romer <[email protected]> Signed-off-by: Ray Mattingly <[email protected]>
1 parent 0a5bec4 commit b689ad8

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/ColumnFamilyMismatchException.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@
2020
import java.util.ArrayList;
2121
import java.util.List;
2222
import org.apache.commons.lang3.StringUtils;
23+
import org.apache.hadoop.hbase.HBaseIOException;
2324
import org.apache.hadoop.hbase.TableName;
2425
import org.apache.hadoop.hbase.client.ColumnFamilyDescriptor;
2526
import org.apache.yetus.audience.InterfaceAudience;
2627

2728
@InterfaceAudience.Public
28-
public final class ColumnFamilyMismatchException extends BackupException {
29+
public final class ColumnFamilyMismatchException extends HBaseIOException {
2930
private final List<TableName> mismatchedTables;
3031

3132
private ColumnFamilyMismatchException(String msg, List<TableName> mismatchedTables) {

hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/IncrementalTableBackupClient.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,12 @@ private void updateFileLists(List<String> activeFiles, List<String> archiveFiles
268268
LOG.debug(newlyArchived.size() + " files have been archived.");
269269
}
270270

271+
/**
272+
* @throws IOException If the execution of the backup fails
273+
* @throws ColumnFamilyMismatchException If the column families of the current table do not match
274+
* the column families for the last full backup. In which
275+
* case, a full backup should be taken
276+
*/
271277
@Override
272278
public void execute() throws IOException, ColumnFamilyMismatchException {
273279
try {
@@ -491,7 +497,7 @@ private void verifyCfCompatibility(Set<TableName> tables,
491497
try {
492498
fs = FileSystem.get(new URI(fullBackupInfo.getBackupRootDir()), conf);
493499
} catch (URISyntaxException e) {
494-
throw new IOException("Unable to get fs", e);
500+
throw new IOException("Unable to get fs for backup " + fullBackupInfo.getBackupId(), e);
495501
}
496502

497503
SnapshotProtos.SnapshotDescription snapshotDescription =

0 commit comments

Comments
 (0)