anujmodi2021 commented on code in PR #7421:
URL: https://github.com/apache/hadoop/pull/7421#discussion_r2013945474
##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsClient.java:
##########
@@ -1753,4 +1772,87 @@ protected AbfsRestOperation getSuccessOp(final
AbfsRestOperationType operationTy
successOp.hardSetResult(HttpURLConnection.HTTP_OK);
return successOp;
}
+
+ private String getPrimaryUserGroup() throws AzureBlobFileSystemException {
+ String primaryUserGroup;
+ if
(!getAbfsConfiguration().getSkipUserGroupMetadataDuringInitialization()) {
+ try {
+ primaryUserGroup =
UserGroupInformation.getCurrentUser().getPrimaryGroupName();
+ } catch (IOException ex) {
+ LOG.error("Failed to get primary group for {}, using user name as
primary group name",
+ getPrimaryUser());
+ primaryUserGroup = getPrimaryUser();
+ }
+ } else {
+ //Provide a default group name
+ primaryUserGroup = getPrimaryUser();
+ }
+ return primaryUserGroup;
+ }
+
+ private String getPrimaryUser() throws AzureBlobFileSystemException {
Review Comment:
Added
##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsClient.java:
##########
@@ -1753,4 +1772,87 @@ protected AbfsRestOperation getSuccessOp(final
AbfsRestOperationType operationTy
successOp.hardSetResult(HttpURLConnection.HTTP_OK);
return successOp;
}
+
+ private String getPrimaryUserGroup() throws AzureBlobFileSystemException {
Review Comment:
Added
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]