Skip to content

Commit 83ca726

Browse files
rmdmattinglyhgromerHernan Gelaf-Romer
authored
HBASE-28917 ColumnFamilyMismatchException mixes IA public and private (#6369) (#6410)
Signed-off-by: Ray Mattingly <[email protected]> Co-authored-by: Hernan Romer <[email protected]> Co-authored-by: Hernan Gelaf-Romer <[email protected]>
1 parent 4684174 commit 83ca726

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
@@ -267,6 +267,12 @@ private void updateFileLists(List<String> activeFiles, List<String> archiveFiles
267267
LOG.debug(newlyArchived.size() + " files have been archived.");
268268
}
269269

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

495501
SnapshotProtos.SnapshotDescription snapshotDescription =

0 commit comments

Comments
 (0)