|
@@ -67,6 +67,7 @@ import org.apache.hadoop.fs.azurebfs.contracts.services.AzureServiceErrorCode;
|
|
import org.apache.hadoop.fs.azurebfs.contracts.services.ListResultEntrySchema;
|
|
import org.apache.hadoop.fs.azurebfs.contracts.services.ListResultEntrySchema;
|
|
import org.apache.hadoop.fs.azurebfs.contracts.services.ListResultSchema;
|
|
import org.apache.hadoop.fs.azurebfs.contracts.services.ListResultSchema;
|
|
import org.apache.hadoop.fs.azurebfs.oauth2.AccessTokenProvider;
|
|
import org.apache.hadoop.fs.azurebfs.oauth2.AccessTokenProvider;
|
|
|
|
+import org.apache.hadoop.fs.azurebfs.oauth2.IdentityTransformer;
|
|
import org.apache.hadoop.fs.azurebfs.services.AbfsAclHelper;
|
|
import org.apache.hadoop.fs.azurebfs.services.AbfsAclHelper;
|
|
import org.apache.hadoop.fs.azurebfs.services.AbfsClient;
|
|
import org.apache.hadoop.fs.azurebfs.services.AbfsClient;
|
|
import org.apache.hadoop.fs.azurebfs.services.AbfsHttpOperation;
|
|
import org.apache.hadoop.fs.azurebfs.services.AbfsHttpOperation;
|
|
@@ -88,9 +89,7 @@ import org.apache.http.client.utils.URIBuilder;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
|
-import static org.apache.hadoop.fs.azurebfs.constants.AbfsHttpConstants.SUPER_USER;
|
|
|
|
import static org.apache.hadoop.fs.azurebfs.constants.ConfigurationKeys.AZURE_ABFS_ENDPOINT;
|
|
import static org.apache.hadoop.fs.azurebfs.constants.ConfigurationKeys.AZURE_ABFS_ENDPOINT;
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* Provides the bridging logic between Hadoop's abstract filesystem and Azure Storage.
|
|
* Provides the bridging logic between Hadoop's abstract filesystem and Azure Storage.
|
|
*/
|
|
*/
|
|
@@ -101,7 +100,6 @@ public class AzureBlobFileSystemStore {
|
|
|
|
|
|
private AbfsClient client;
|
|
private AbfsClient client;
|
|
private URI uri;
|
|
private URI uri;
|
|
- private final UserGroupInformation userGroupInformation;
|
|
|
|
private String userName;
|
|
private String userName;
|
|
private String primaryUserGroup;
|
|
private String primaryUserGroup;
|
|
private static final String DATE_TIME_PATTERN = "E, dd MMM yyyy HH:mm:ss 'GMT'";
|
|
private static final String DATE_TIME_PATTERN = "E, dd MMM yyyy HH:mm:ss 'GMT'";
|
|
@@ -113,11 +111,12 @@ public class AzureBlobFileSystemStore {
|
|
private boolean isNamespaceEnabledSet;
|
|
private boolean isNamespaceEnabledSet;
|
|
private boolean isNamespaceEnabled;
|
|
private boolean isNamespaceEnabled;
|
|
private final AuthType authType;
|
|
private final AuthType authType;
|
|
|
|
+ private final UserGroupInformation userGroupInformation;
|
|
|
|
+ private final IdentityTransformer identityTransformer;
|
|
|
|
|
|
- public AzureBlobFileSystemStore(URI uri, boolean isSecureScheme, Configuration configuration, UserGroupInformation userGroupInformation)
|
|
|
|
- throws AzureBlobFileSystemException, IOException {
|
|
|
|
|
|
+ public AzureBlobFileSystemStore(URI uri, boolean isSecureScheme, Configuration configuration)
|
|
|
|
+ throws IOException {
|
|
this.uri = uri;
|
|
this.uri = uri;
|
|
-
|
|
|
|
String[] authorityParts = authorityParts(uri);
|
|
String[] authorityParts = authorityParts(uri);
|
|
final String fileSystemName = authorityParts[0];
|
|
final String fileSystemName = authorityParts[0];
|
|
final String accountName = authorityParts[1];
|
|
final String accountName = authorityParts[1];
|
|
@@ -127,10 +126,8 @@ public class AzureBlobFileSystemStore {
|
|
} catch (IllegalAccessException exception) {
|
|
} catch (IllegalAccessException exception) {
|
|
throw new FileSystemOperationUnhandledException(exception);
|
|
throw new FileSystemOperationUnhandledException(exception);
|
|
}
|
|
}
|
|
-
|
|
|
|
- this.userGroupInformation = userGroupInformation;
|
|
|
|
|
|
+ this.userGroupInformation = UserGroupInformation.getCurrentUser();
|
|
this.userName = userGroupInformation.getShortUserName();
|
|
this.userName = userGroupInformation.getShortUserName();
|
|
-
|
|
|
|
if (!abfsConfiguration.getSkipUserGroupMetadataDuringInitialization()) {
|
|
if (!abfsConfiguration.getSkipUserGroupMetadataDuringInitialization()) {
|
|
try {
|
|
try {
|
|
this.primaryUserGroup = userGroupInformation.getPrimaryGroupName();
|
|
this.primaryUserGroup = userGroupInformation.getPrimaryGroupName();
|
|
@@ -145,12 +142,25 @@ public class AzureBlobFileSystemStore {
|
|
|
|
|
|
this.azureAtomicRenameDirSet = new HashSet<>(Arrays.asList(
|
|
this.azureAtomicRenameDirSet = new HashSet<>(Arrays.asList(
|
|
abfsConfiguration.getAzureAtomicRenameDirs().split(AbfsHttpConstants.COMMA)));
|
|
abfsConfiguration.getAzureAtomicRenameDirs().split(AbfsHttpConstants.COMMA)));
|
|
-
|
|
|
|
this.authType = abfsConfiguration.getAuthType(accountName);
|
|
this.authType = abfsConfiguration.getAuthType(accountName);
|
|
boolean usingOauth = (authType == AuthType.OAuth);
|
|
boolean usingOauth = (authType == AuthType.OAuth);
|
|
boolean useHttps = (usingOauth || abfsConfiguration.isHttpsAlwaysUsed()) ? true : isSecureScheme;
|
|
boolean useHttps = (usingOauth || abfsConfiguration.isHttpsAlwaysUsed()) ? true : isSecureScheme;
|
|
initializeClient(uri, fileSystemName, accountName, useHttps);
|
|
initializeClient(uri, fileSystemName, accountName, useHttps);
|
|
|
|
+ this.identityTransformer = new IdentityTransformer(abfsConfiguration.getRawConfiguration());
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @return local user name.
|
|
|
|
+ * */
|
|
|
|
+ public String getUser() {
|
|
|
|
+ return this.userName;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * @return primary group that user belongs to.
|
|
|
|
+ * */
|
|
|
|
+ public String getPrimaryGroup() {
|
|
|
|
+ return this.primaryUserGroup;
|
|
}
|
|
}
|
|
|
|
|
|
private String[] authorityParts(URI uri) throws InvalidUriAuthorityException, InvalidUriException {
|
|
private String[] authorityParts(URI uri) throws InvalidUriAuthorityException, InvalidUriException {
|
|
@@ -452,60 +462,54 @@ public class AzureBlobFileSystemStore {
|
|
path,
|
|
path,
|
|
isNamespaceEnabled);
|
|
isNamespaceEnabled);
|
|
|
|
|
|
|
|
+ final AbfsRestOperation op;
|
|
if (path.isRoot()) {
|
|
if (path.isRoot()) {
|
|
- final AbfsRestOperation op = isNamespaceEnabled
|
|
|
|
- ? client.getAclStatus(AbfsHttpConstants.FORWARD_SLASH + AbfsHttpConstants.ROOT_PATH)
|
|
|
|
- : client.getFilesystemProperties();
|
|
|
|
-
|
|
|
|
- final long blockSize = abfsConfiguration.getAzureBlockSize();
|
|
|
|
- final String owner = op.getResult().getResponseHeader(HttpHeaderConfigurations.X_MS_OWNER);
|
|
|
|
- final String group = op.getResult().getResponseHeader(HttpHeaderConfigurations.X_MS_GROUP);
|
|
|
|
- final String permissions = op.getResult().getResponseHeader(HttpHeaderConfigurations.X_MS_PERMISSIONS);
|
|
|
|
- final String eTag = op.getResult().getResponseHeader(HttpHeaderConfigurations.ETAG);
|
|
|
|
- final String lastModified = op.getResult().getResponseHeader(HttpHeaderConfigurations.LAST_MODIFIED);
|
|
|
|
- final boolean hasAcl = AbfsPermission.isExtendedAcl(permissions);
|
|
|
|
-
|
|
|
|
- return new VersionedFileStatus(
|
|
|
|
- isSuperUserOrEmpty(owner) ? userName : owner,
|
|
|
|
- isSuperUserOrEmpty(group) ? primaryUserGroup : group,
|
|
|
|
- permissions == null ? new AbfsPermission(FsAction.ALL, FsAction.ALL, FsAction.ALL)
|
|
|
|
- : AbfsPermission.valueOf(permissions),
|
|
|
|
- hasAcl,
|
|
|
|
- 0,
|
|
|
|
- true,
|
|
|
|
- 1,
|
|
|
|
- blockSize,
|
|
|
|
- parseLastModifiedTime(lastModified),
|
|
|
|
- path,
|
|
|
|
- eTag);
|
|
|
|
|
|
+ op = isNamespaceEnabled
|
|
|
|
+ ? client.getAclStatus(AbfsHttpConstants.FORWARD_SLASH + AbfsHttpConstants.ROOT_PATH)
|
|
|
|
+ : client.getFilesystemProperties();
|
|
} else {
|
|
} else {
|
|
- AbfsRestOperation op = client.getPathProperties(AbfsHttpConstants.FORWARD_SLASH + getRelativePath(path), isNamespaceEnabled);
|
|
|
|
-
|
|
|
|
- final long blockSize = abfsConfiguration.getAzureBlockSize();
|
|
|
|
- final AbfsHttpOperation result = op.getResult();
|
|
|
|
- final String eTag = result.getResponseHeader(HttpHeaderConfigurations.ETAG);
|
|
|
|
- final String lastModified = result.getResponseHeader(HttpHeaderConfigurations.LAST_MODIFIED);
|
|
|
|
- final String contentLength = result.getResponseHeader(HttpHeaderConfigurations.CONTENT_LENGTH);
|
|
|
|
- final String resourceType = result.getResponseHeader(HttpHeaderConfigurations.X_MS_RESOURCE_TYPE);
|
|
|
|
- final String owner = result.getResponseHeader(HttpHeaderConfigurations.X_MS_OWNER);
|
|
|
|
- final String group = result.getResponseHeader(HttpHeaderConfigurations.X_MS_GROUP);
|
|
|
|
- final String permissions = result.getResponseHeader((HttpHeaderConfigurations.X_MS_PERMISSIONS));
|
|
|
|
- final boolean hasAcl = AbfsPermission.isExtendedAcl(permissions);
|
|
|
|
-
|
|
|
|
- return new VersionedFileStatus(
|
|
|
|
- isSuperUserOrEmpty(owner) ? userName : owner,
|
|
|
|
- isSuperUserOrEmpty(group) ? primaryUserGroup : group,
|
|
|
|
- permissions == null ? new AbfsPermission(FsAction.ALL, FsAction.ALL, FsAction.ALL)
|
|
|
|
- : AbfsPermission.valueOf(permissions),
|
|
|
|
- hasAcl,
|
|
|
|
- parseContentLength(contentLength),
|
|
|
|
- parseIsDirectory(resourceType),
|
|
|
|
- 1,
|
|
|
|
- blockSize,
|
|
|
|
- parseLastModifiedTime(lastModified),
|
|
|
|
- path,
|
|
|
|
- eTag);
|
|
|
|
|
|
+ op = client.getPathProperties(AbfsHttpConstants.FORWARD_SLASH + getRelativePath(path), isNamespaceEnabled);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ final long blockSize = abfsConfiguration.getAzureBlockSize();
|
|
|
|
+ final AbfsHttpOperation result = op.getResult();
|
|
|
|
+
|
|
|
|
+ final String eTag = result.getResponseHeader(HttpHeaderConfigurations.ETAG);
|
|
|
|
+ final String lastModified = result.getResponseHeader(HttpHeaderConfigurations.LAST_MODIFIED);
|
|
|
|
+ final String permissions = result.getResponseHeader((HttpHeaderConfigurations.X_MS_PERMISSIONS));
|
|
|
|
+ final boolean hasAcl = AbfsPermission.isExtendedAcl(permissions);
|
|
|
|
+ final long contentLength;
|
|
|
|
+ final boolean resourceIsDir;
|
|
|
|
+
|
|
|
|
+ if (path.isRoot()) {
|
|
|
|
+ contentLength = 0;
|
|
|
|
+ resourceIsDir = true;
|
|
|
|
+ } else {
|
|
|
|
+ contentLength = parseContentLength(result.getResponseHeader(HttpHeaderConfigurations.CONTENT_LENGTH));
|
|
|
|
+ resourceIsDir = parseIsDirectory(result.getResponseHeader(HttpHeaderConfigurations.X_MS_RESOURCE_TYPE));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ final String transformedOwner = identityTransformer.transformIdentityForGetRequest(
|
|
|
|
+ result.getResponseHeader(HttpHeaderConfigurations.X_MS_OWNER),
|
|
|
|
+ userName);
|
|
|
|
+
|
|
|
|
+ final String transformedGroup = identityTransformer.transformIdentityForGetRequest(
|
|
|
|
+ result.getResponseHeader(HttpHeaderConfigurations.X_MS_GROUP),
|
|
|
|
+ primaryUserGroup);
|
|
|
|
+
|
|
|
|
+ return new VersionedFileStatus(
|
|
|
|
+ transformedOwner,
|
|
|
|
+ transformedGroup,
|
|
|
|
+ permissions == null ? new AbfsPermission(FsAction.ALL, FsAction.ALL, FsAction.ALL)
|
|
|
|
+ : AbfsPermission.valueOf(permissions),
|
|
|
|
+ hasAcl,
|
|
|
|
+ contentLength,
|
|
|
|
+ resourceIsDir,
|
|
|
|
+ 1,
|
|
|
|
+ blockSize,
|
|
|
|
+ parseLastModifiedTime(lastModified),
|
|
|
|
+ path,
|
|
|
|
+ eTag);
|
|
}
|
|
}
|
|
|
|
|
|
public FileStatus[] listStatus(final Path path) throws IOException {
|
|
public FileStatus[] listStatus(final Path path) throws IOException {
|
|
@@ -532,8 +536,8 @@ public class AzureBlobFileSystemStore {
|
|
long blockSize = abfsConfiguration.getAzureBlockSize();
|
|
long blockSize = abfsConfiguration.getAzureBlockSize();
|
|
|
|
|
|
for (ListResultEntrySchema entry : retrievedSchema.paths()) {
|
|
for (ListResultEntrySchema entry : retrievedSchema.paths()) {
|
|
- final String owner = isSuperUserOrEmpty(entry.owner()) ? userName : entry.owner();
|
|
|
|
- final String group = isSuperUserOrEmpty(entry.group()) ? primaryUserGroup : entry.group();
|
|
|
|
|
|
+ final String owner = identityTransformer.transformIdentityForGetRequest(entry.owner(), userName);
|
|
|
|
+ final String group = identityTransformer.transformIdentityForGetRequest(entry.group(), primaryUserGroup);
|
|
final FsPermission fsPermission = entry.permissions() == null
|
|
final FsPermission fsPermission = entry.permissions() == null
|
|
? new AbfsPermission(FsAction.ALL, FsAction.ALL, FsAction.ALL)
|
|
? new AbfsPermission(FsAction.ALL, FsAction.ALL, FsAction.ALL)
|
|
: AbfsPermission.valueOf(entry.permissions());
|
|
: AbfsPermission.valueOf(entry.permissions());
|
|
@@ -566,7 +570,7 @@ public class AzureBlobFileSystemStore {
|
|
|
|
|
|
} while (continuation != null && !continuation.isEmpty());
|
|
} while (continuation != null && !continuation.isEmpty());
|
|
|
|
|
|
- return fileStatuses.toArray(new FileStatus[0]);
|
|
|
|
|
|
+ return fileStatuses.toArray(new FileStatus[fileStatuses.size()]);
|
|
}
|
|
}
|
|
|
|
|
|
public void setOwner(final Path path, final String owner, final String group) throws
|
|
public void setOwner(final Path path, final String owner, final String group) throws
|
|
@@ -576,20 +580,17 @@ public class AzureBlobFileSystemStore {
|
|
"This operation is only valid for storage accounts with the hierarchical namespace enabled.");
|
|
"This operation is only valid for storage accounts with the hierarchical namespace enabled.");
|
|
}
|
|
}
|
|
|
|
|
|
- String effectiveOwner = owner;
|
|
|
|
- String effectiveGroup = group;
|
|
|
|
- if (authType == AuthType.SharedKey && owner.equals(userName)) {
|
|
|
|
- effectiveOwner = SUPER_USER;
|
|
|
|
- effectiveGroup = SUPER_USER;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
LOG.debug(
|
|
LOG.debug(
|
|
"setOwner filesystem: {} path: {} owner: {} group: {}",
|
|
"setOwner filesystem: {} path: {} owner: {} group: {}",
|
|
client.getFileSystem(),
|
|
client.getFileSystem(),
|
|
path.toString(),
|
|
path.toString(),
|
|
- effectiveOwner,
|
|
|
|
- effectiveGroup);
|
|
|
|
- client.setOwner(AbfsHttpConstants.FORWARD_SLASH + getRelativePath(path, true), effectiveOwner, effectiveGroup);
|
|
|
|
|
|
+ owner,
|
|
|
|
+ group);
|
|
|
|
+
|
|
|
|
+ final String transformedOwner = identityTransformer.transformUserOrGroupForSetRequest(owner);
|
|
|
|
+ final String transformedGroup = identityTransformer.transformUserOrGroupForSetRequest(group);
|
|
|
|
+
|
|
|
|
+ client.setOwner(AbfsHttpConstants.FORWARD_SLASH + getRelativePath(path, true), transformedOwner, transformedGroup);
|
|
}
|
|
}
|
|
|
|
|
|
public void setPermission(final Path path, final FsPermission permission) throws
|
|
public void setPermission(final Path path, final FsPermission permission) throws
|
|
@@ -620,7 +621,9 @@ public class AzureBlobFileSystemStore {
|
|
client.getFileSystem(),
|
|
client.getFileSystem(),
|
|
path.toString(),
|
|
path.toString(),
|
|
AclEntry.aclSpecToString(aclSpec));
|
|
AclEntry.aclSpecToString(aclSpec));
|
|
- final Map<String, String> modifyAclEntries = AbfsAclHelper.deserializeAclSpec(AclEntry.aclSpecToString(aclSpec));
|
|
|
|
|
|
+
|
|
|
|
+ final List<AclEntry> transformedAclEntries = identityTransformer.transformAclEntriesForSetRequest(aclSpec);
|
|
|
|
+ final Map<String, String> modifyAclEntries = AbfsAclHelper.deserializeAclSpec(AclEntry.aclSpecToString(transformedAclEntries));
|
|
boolean useUpn = AbfsAclHelper.isUpnFormatAclEntries(modifyAclEntries);
|
|
boolean useUpn = AbfsAclHelper.isUpnFormatAclEntries(modifyAclEntries);
|
|
|
|
|
|
final AbfsRestOperation op = client.getAclStatus(AbfsHttpConstants.FORWARD_SLASH + getRelativePath(path, true), useUpn);
|
|
final AbfsRestOperation op = client.getAclStatus(AbfsHttpConstants.FORWARD_SLASH + getRelativePath(path, true), useUpn);
|
|
@@ -645,7 +648,9 @@ public class AzureBlobFileSystemStore {
|
|
client.getFileSystem(),
|
|
client.getFileSystem(),
|
|
path.toString(),
|
|
path.toString(),
|
|
AclEntry.aclSpecToString(aclSpec));
|
|
AclEntry.aclSpecToString(aclSpec));
|
|
- final Map<String, String> removeAclEntries = AbfsAclHelper.deserializeAclSpec(AclEntry.aclSpecToString(aclSpec));
|
|
|
|
|
|
+
|
|
|
|
+ final List<AclEntry> transformedAclEntries = identityTransformer.transformAclEntriesForSetRequest(aclSpec);
|
|
|
|
+ final Map<String, String> removeAclEntries = AbfsAclHelper.deserializeAclSpec(AclEntry.aclSpecToString(transformedAclEntries));
|
|
boolean isUpnFormat = AbfsAclHelper.isUpnFormatAclEntries(removeAclEntries);
|
|
boolean isUpnFormat = AbfsAclHelper.isUpnFormatAclEntries(removeAclEntries);
|
|
|
|
|
|
final AbfsRestOperation op = client.getAclStatus(AbfsHttpConstants.FORWARD_SLASH + getRelativePath(path, true), isUpnFormat);
|
|
final AbfsRestOperation op = client.getAclStatus(AbfsHttpConstants.FORWARD_SLASH + getRelativePath(path, true), isUpnFormat);
|
|
@@ -722,7 +727,9 @@ public class AzureBlobFileSystemStore {
|
|
client.getFileSystem(),
|
|
client.getFileSystem(),
|
|
path.toString(),
|
|
path.toString(),
|
|
AclEntry.aclSpecToString(aclSpec));
|
|
AclEntry.aclSpecToString(aclSpec));
|
|
- final Map<String, String> aclEntries = AbfsAclHelper.deserializeAclSpec(AclEntry.aclSpecToString(aclSpec));
|
|
|
|
|
|
+
|
|
|
|
+ final List<AclEntry> transformedAclEntries = identityTransformer.transformAclEntriesForSetRequest(aclSpec);
|
|
|
|
+ final Map<String, String> aclEntries = AbfsAclHelper.deserializeAclSpec(AclEntry.aclSpecToString(transformedAclEntries));
|
|
final boolean isUpnFormat = AbfsAclHelper.isUpnFormatAclEntries(aclEntries);
|
|
final boolean isUpnFormat = AbfsAclHelper.isUpnFormatAclEntries(aclEntries);
|
|
|
|
|
|
final AbfsRestOperation op = client.getAclStatus(AbfsHttpConstants.FORWARD_SLASH + getRelativePath(path, true), isUpnFormat);
|
|
final AbfsRestOperation op = client.getAclStatus(AbfsHttpConstants.FORWARD_SLASH + getRelativePath(path, true), isUpnFormat);
|
|
@@ -749,8 +756,13 @@ public class AzureBlobFileSystemStore {
|
|
AbfsRestOperation op = client.getAclStatus(AbfsHttpConstants.FORWARD_SLASH + getRelativePath(path, true));
|
|
AbfsRestOperation op = client.getAclStatus(AbfsHttpConstants.FORWARD_SLASH + getRelativePath(path, true));
|
|
AbfsHttpOperation result = op.getResult();
|
|
AbfsHttpOperation result = op.getResult();
|
|
|
|
|
|
- final String owner = result.getResponseHeader(HttpHeaderConfigurations.X_MS_OWNER);
|
|
|
|
- final String group = result.getResponseHeader(HttpHeaderConfigurations.X_MS_GROUP);
|
|
|
|
|
|
+ final String transformedOwner = identityTransformer.transformIdentityForGetRequest(
|
|
|
|
+ result.getResponseHeader(HttpHeaderConfigurations.X_MS_OWNER),
|
|
|
|
+ userName);
|
|
|
|
+ final String transformedGroup = identityTransformer.transformIdentityForGetRequest(
|
|
|
|
+ result.getResponseHeader(HttpHeaderConfigurations.X_MS_GROUP),
|
|
|
|
+ primaryUserGroup);
|
|
|
|
+
|
|
final String permissions = result.getResponseHeader(HttpHeaderConfigurations.X_MS_PERMISSIONS);
|
|
final String permissions = result.getResponseHeader(HttpHeaderConfigurations.X_MS_PERMISSIONS);
|
|
final String aclSpecString = op.getResult().getResponseHeader(HttpHeaderConfigurations.X_MS_ACL);
|
|
final String aclSpecString = op.getResult().getResponseHeader(HttpHeaderConfigurations.X_MS_ACL);
|
|
|
|
|
|
@@ -759,8 +771,8 @@ public class AzureBlobFileSystemStore {
|
|
: AbfsPermission.valueOf(permissions);
|
|
: AbfsPermission.valueOf(permissions);
|
|
|
|
|
|
final AclStatus.Builder aclStatusBuilder = new AclStatus.Builder();
|
|
final AclStatus.Builder aclStatusBuilder = new AclStatus.Builder();
|
|
- aclStatusBuilder.owner(isSuperUserOrEmpty(owner)? userName : owner);
|
|
|
|
- aclStatusBuilder.group(isSuperUserOrEmpty(group) ? primaryUserGroup : group);
|
|
|
|
|
|
+ aclStatusBuilder.owner(transformedOwner);
|
|
|
|
+ aclStatusBuilder.group(transformedGroup);
|
|
|
|
|
|
aclStatusBuilder.setPermission(fsPermission);
|
|
aclStatusBuilder.setPermission(fsPermission);
|
|
aclStatusBuilder.stickyBit(fsPermission.getStickyBit());
|
|
aclStatusBuilder.stickyBit(fsPermission.getStickyBit());
|
|
@@ -944,11 +956,6 @@ public class AzureBlobFileSystemStore {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|
|
- private boolean isSuperUserOrEmpty(final String name) {
|
|
|
|
- return name == null || name.equals(SUPER_USER);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
private static class VersionedFileStatus extends FileStatus {
|
|
private static class VersionedFileStatus extends FileStatus {
|
|
private final String version;
|
|
private final String version;
|
|
|
|
|