HBASE-11896 LoadIncrementalHFiles fails in secure mode if the namespace is specified (Ashish Singhi and Ted Yu)
This commit is contained in:
parent
b4f88469ba
commit
fec7771f73
|
@ -174,7 +174,6 @@ public class SecureBulkLoadEndpoint extends SecureBulkLoadService
|
||||||
getAccessController().preCleanupBulkLoad(env);
|
getAccessController().preCleanupBulkLoad(env);
|
||||||
fs.delete(createStagingDir(baseStagingDir,
|
fs.delete(createStagingDir(baseStagingDir,
|
||||||
getActiveUser(),
|
getActiveUser(),
|
||||||
env.getRegion().getTableDesc().getTableName(),
|
|
||||||
new Path(request.getBulkToken()).getName()),
|
new Path(request.getBulkToken()).getName()),
|
||||||
true);
|
true);
|
||||||
done.run(CleanupBulkLoadResponse.newBuilder().build());
|
done.run(CleanupBulkLoadResponse.newBuilder().build());
|
||||||
|
@ -291,14 +290,14 @@ public class SecureBulkLoadEndpoint extends SecureBulkLoadService
|
||||||
private Path createStagingDir(Path baseDir,
|
private Path createStagingDir(Path baseDir,
|
||||||
User user,
|
User user,
|
||||||
TableName tableName) throws IOException {
|
TableName tableName) throws IOException {
|
||||||
String randomDir = user.getShortName()+"__"+ tableName +"__"+
|
String tblName = tableName.getNameAsString().replace(":", "_");
|
||||||
|
String randomDir = user.getShortName()+"__"+ tblName +"__"+
|
||||||
(new BigInteger(RANDOM_WIDTH, random).toString(RANDOM_RADIX));
|
(new BigInteger(RANDOM_WIDTH, random).toString(RANDOM_RADIX));
|
||||||
return createStagingDir(baseDir, user, tableName, randomDir);
|
return createStagingDir(baseDir, user, randomDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Path createStagingDir(Path baseDir,
|
private Path createStagingDir(Path baseDir,
|
||||||
User user,
|
User user,
|
||||||
TableName tableName,
|
|
||||||
String randomDir) throws IOException {
|
String randomDir) throws IOException {
|
||||||
Path p = new Path(baseDir, randomDir);
|
Path p = new Path(baseDir, randomDir);
|
||||||
fs.mkdirs(p, PERM_ALL_ACCESS);
|
fs.mkdirs(p, PERM_ALL_ACCESS);
|
||||||
|
|
Loading…
Reference in New Issue