Skip to content

Commit

Permalink
remove overwrite overload
Browse files Browse the repository at this point in the history
  • Loading branch information
saxenapranav committed Jun 17, 2024
1 parent ec869ee commit 6f26b81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@

import org.apache.commons.lang3.StringUtils;
import org.apache.hadoop.classification.VisibleForTesting;
import org.apache.hadoop.fs.azurebfs.enums.Trilean;
import org.apache.hadoop.fs.impl.BackReference;
import org.apache.hadoop.security.ProviderUtils;
import org.apache.hadoop.util.Preconditions;
Expand Down Expand Up @@ -725,7 +724,7 @@ public boolean mkdirs(final Path f, final FsPermission permission) throws IOExce
listener);
abfsStore.createDirectory(qualifiedPath,
permission == null ? FsPermission.getDirDefault() : permission,
FsPermission.getUMask(getConf()), Trilean.UNKNOWN, tracingContext);
FsPermission.getUMask(getConf()), tracingContext);
statIncrement(DIRECTORIES_CREATED);
return true;
} catch (AzureBlobFileSystemException ex) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -826,17 +826,12 @@ private AbfsOutputStreamContext populateAbfsOutputStreamContext(
* @param path Path of the directory to create.
* @param permission Permission of the directory.
* @param umask Umask of the directory.
* @param isOverwriteRequired Trilean to indicate if overwrite is required. If
* Trilean is UNKNOWN, then it will be determined by
* the configuration. Else, it will be determined by
* the value of Trilean.
* @param tracingContext tracing context
*
* @throws AzureBlobFileSystemException server error.
*/
public void createDirectory(final Path path, final FsPermission permission,
final FsPermission umask,
Trilean isOverwriteRequired,
TracingContext tracingContext)
throws AzureBlobFileSystemException {
try (AbfsPerfInfo perfInfo = startTracking("createDirectory", "createPath")) {
Expand All @@ -847,10 +842,8 @@ public void createDirectory(final Path path, final FsPermission permission,
permission,
umask,
isNamespaceEnabled);
boolean overwrite = isOverwriteRequired == Trilean.UNKNOWN
?
(!isNamespaceEnabled || abfsConfiguration.isEnabledMkdirOverwrite())
: isOverwriteRequired.toBoolean();
boolean overwrite =
!isNamespaceEnabled || abfsConfiguration.isEnabledMkdirOverwrite();
Permissions permissions = new Permissions(isNamespaceEnabled,
permission, umask);
final AbfsRestOperation op = client.createPath(getRelativePath(path),
Expand Down

0 comments on commit 6f26b81

Please sign in to comment.