Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HBASE-27754 generateMissingTableDescriptorFile should throw write per… #114

Merged
merged 1 commit into from Mar 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -36,6 +36,7 @@
import org.apache.hadoop.hbase.client.TableDescriptorBuilder;
import org.apache.hadoop.hbase.exceptions.DeserializationException;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.security.AccessControlException;
import org.apache.yetus.audience.InterfaceAudience;

import org.slf4j.Logger;
Expand Down Expand Up @@ -369,6 +370,11 @@ private static Path writeTableDescriptor(final FileSystem fs,
}
LOG.debug("Wrote into " + tableInfoDirPath);
} catch (IOException ioe) {
// fail-fast and get out of retry loop as user does not have privilege to write to hdfs
// hence, no point in retrying
if(ioe instanceof AccessControlException){
throw ioe;
}
// Presume clash of names or something; go around again.
LOG.debug("Failed write and/or rename; retrying", ioe);
if (!HBCKFsUtils.deleteDirectory(fs, tempPath)) {
Expand Down