HADOOP-16682. ABFS: Removing unnecessary toString() invocations

- Contributed by Bilahari T H
This commit is contained in:
bilaharith 2020-07-18 22:30:18 +05:30 committed by GitHub
parent 8a9a674ef1
commit 99655167f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 15 deletions

View File

@ -272,9 +272,9 @@ public FSDataOutputStream append(final Path f, final int bufferSize, final Progr
}
public boolean rename(final Path src, final Path dst) throws IOException {
LOG.debug(
"AzureBlobFileSystem.rename src: {} dst: {}", src.toString(), dst.toString());
LOG.debug("AzureBlobFileSystem.rename src: {} dst: {}", src, dst);
statIncrement(CALL_RENAME);
trailingPeriodCheck(dst);
Path parentFolder = src.getParent();
@ -778,7 +778,7 @@ public void setPermission(final Path path, final FsPermission permission)
@Override
public void modifyAclEntries(final Path path, final List<AclEntry> aclSpec)
throws IOException {
LOG.debug("AzureBlobFileSystem.modifyAclEntries path: {}", path.toString());
LOG.debug("AzureBlobFileSystem.modifyAclEntries path: {}", path);
if (!getIsNamespaceEnabled()) {
throw new UnsupportedOperationException(
@ -927,7 +927,7 @@ public void setAcl(final Path path, final List<AclEntry> aclSpec)
*/
@Override
public AclStatus getAclStatus(final Path path) throws IOException {
LOG.debug("AzureBlobFileSystem.getAclStatus path: {}", path.toString());
LOG.debug("AzureBlobFileSystem.getAclStatus path: {}", path);
if (!getIsNamespaceEnabled()) {
throw new UnsupportedOperationException(

View File

@ -449,8 +449,8 @@ public OutputStream createFile(final Path path,
client.getFileSystem(),
path,
overwrite,
permission.toString(),
umask.toString(),
permission,
umask,
isNamespaceEnabled);
String relativePath = getRelativePath(path);
@ -903,7 +903,7 @@ public void setOwner(final Path path, final String owner, final String group) th
LOG.debug(
"setOwner filesystem: {} path: {} owner: {} group: {}",
client.getFileSystem(),
path.toString(),
path,
owner,
group);
@ -930,8 +930,8 @@ public void setPermission(final Path path, final FsPermission permission) throws
LOG.debug(
"setPermission filesystem: {} path: {} permission: {}",
client.getFileSystem(),
path.toString(),
permission.toString());
path,
permission);
final AbfsRestOperation op = client.setPermission(getRelativePath(path),
String.format(AbfsHttpConstants.PERMISSION_FORMAT, permission.toOctal()));
@ -952,7 +952,7 @@ public void modifyAclEntries(final Path path, final List<AclEntry> aclSpec) thro
LOG.debug(
"modifyAclEntries filesystem: {} path: {} aclSpec: {}",
client.getFileSystem(),
path.toString(),
path,
AclEntry.aclSpecToString(aclSpec));
identityTransformer.transformAclEntriesForSetRequest(aclSpec);
@ -993,7 +993,7 @@ public void removeAclEntries(final Path path, final List<AclEntry> aclSpec) thro
LOG.debug(
"removeAclEntries filesystem: {} path: {} aclSpec: {}",
client.getFileSystem(),
path.toString(),
path,
AclEntry.aclSpecToString(aclSpec));
identityTransformer.transformAclEntriesForSetRequest(aclSpec);
@ -1034,7 +1034,7 @@ public void removeDefaultAcl(final Path path) throws AzureBlobFileSystemExceptio
LOG.debug(
"removeDefaultAcl filesystem: {} path: {}",
client.getFileSystem(),
path.toString());
path);
String relativePath = getRelativePath(path);
@ -1076,7 +1076,7 @@ public void removeAcl(final Path path) throws AzureBlobFileSystemException {
LOG.debug(
"removeAcl filesystem: {} path: {}",
client.getFileSystem(),
path.toString());
path);
String relativePath = getRelativePath(path);
@ -1115,7 +1115,7 @@ public void setAcl(final Path path, final List<AclEntry> aclSpec) throws AzureBl
LOG.debug(
"setAcl filesystem: {} path: {} aclspec: {}",
client.getFileSystem(),
path.toString(),
path,
AclEntry.aclSpecToString(aclSpec));
identityTransformer.transformAclEntriesForSetRequest(aclSpec);
@ -1156,7 +1156,7 @@ public AclStatus getAclStatus(final Path path) throws IOException {
LOG.debug(
"getAclStatus filesystem: {} path: {}",
client.getFileSystem(),
path.toString());
path);
AbfsRestOperation op = client.getAclStatus(getRelativePath(path));
AbfsHttpOperation result = op.getResult();