Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.apache.hadoop.hbase.HBaseIOException;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.ColumnFamilyDescriptor;
import org.apache.yetus.audience.InterfaceAudience;

@InterfaceAudience.Public
public final class ColumnFamilyMismatchException extends BackupException {
public final class ColumnFamilyMismatchException extends HBaseIOException {
private final List<TableName> mismatchedTables;

private ColumnFamilyMismatchException(String msg, List<TableName> mismatchedTables) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,12 @@ private void updateFileLists(List<String> activeFiles, List<String> archiveFiles
LOG.debug(newlyArchived.size() + " files have been archived.");
}

/**
* @throws IOException If the execution of the backup fails
* @throws ColumnFamilyMismatchException If the column families of the current table do not match
* the column families for the last full backup. In which
* case, a full backup should be taken
*/
@Override
public void execute() throws IOException, ColumnFamilyMismatchException {
try {
Expand Down Expand Up @@ -489,7 +495,7 @@ private void verifyCfCompatibility(Set<TableName> tables,
try {
fs = FileSystem.get(new URI(fullBackupInfo.getBackupRootDir()), conf);
} catch (URISyntaxException e) {
throw new IOException("Unable to get fs", e);
throw new IOException("Unable to get fs for backup " + fullBackupInfo.getBackupId(), e);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just addressing this comment, while I'm here.

}

SnapshotProtos.SnapshotDescription snapshotDescription =
Expand Down