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

- Contributed by Bilahari T H

Change-Id: Id55495b44d81533d1d3654de2553c709f505f7eb
This commit is contained in:
bilaharith 2020-07-18 22:30:18 +05:30 committed by Steve Loughran
parent 187b161c20
commit e01852181a
No known key found for this signature in database
GPG Key ID: D22CF846DBB162A0
2 changed files with 15 additions and 15 deletions

View File

@ -271,9 +271,9 @@ public class AzureBlobFileSystem extends FileSystem {
} }
public boolean rename(final Path src, final Path dst) throws IOException { public boolean rename(final Path src, final Path dst) throws IOException {
LOG.debug( LOG.debug("AzureBlobFileSystem.rename src: {} dst: {}", src, dst);
"AzureBlobFileSystem.rename src: {} dst: {}", src.toString(), dst.toString());
statIncrement(CALL_RENAME); statIncrement(CALL_RENAME);
trailingPeriodCheck(dst); trailingPeriodCheck(dst);
Path parentFolder = src.getParent(); Path parentFolder = src.getParent();
@ -777,7 +777,7 @@ public class AzureBlobFileSystem extends FileSystem {
@Override @Override
public void modifyAclEntries(final Path path, final List<AclEntry> aclSpec) public void modifyAclEntries(final Path path, final List<AclEntry> aclSpec)
throws IOException { throws IOException {
LOG.debug("AzureBlobFileSystem.modifyAclEntries path: {}", path.toString()); LOG.debug("AzureBlobFileSystem.modifyAclEntries path: {}", path);
if (!getIsNamespaceEnabled()) { if (!getIsNamespaceEnabled()) {
throw new UnsupportedOperationException( throw new UnsupportedOperationException(
@ -926,7 +926,7 @@ public class AzureBlobFileSystem extends FileSystem {
*/ */
@Override @Override
public AclStatus getAclStatus(final Path path) throws IOException { public AclStatus getAclStatus(final Path path) throws IOException {
LOG.debug("AzureBlobFileSystem.getAclStatus path: {}", path.toString()); LOG.debug("AzureBlobFileSystem.getAclStatus path: {}", path);
if (!getIsNamespaceEnabled()) { if (!getIsNamespaceEnabled()) {
throw new UnsupportedOperationException( throw new UnsupportedOperationException(

View File

@ -413,8 +413,8 @@ public class AzureBlobFileSystemStore implements Closeable {
client.getFileSystem(), client.getFileSystem(),
path, path,
overwrite, overwrite,
permission.toString(), permission,
umask.toString(), umask,
isNamespaceEnabled); isNamespaceEnabled);
String relativePath = getRelativePath(path); String relativePath = getRelativePath(path);
@ -850,7 +850,7 @@ public class AzureBlobFileSystemStore implements Closeable {
LOG.debug( LOG.debug(
"setOwner filesystem: {} path: {} owner: {} group: {}", "setOwner filesystem: {} path: {} owner: {} group: {}",
client.getFileSystem(), client.getFileSystem(),
path.toString(), path,
owner, owner,
group); group);
@ -877,8 +877,8 @@ public class AzureBlobFileSystemStore implements Closeable {
LOG.debug( LOG.debug(
"setPermission filesystem: {} path: {} permission: {}", "setPermission filesystem: {} path: {} permission: {}",
client.getFileSystem(), client.getFileSystem(),
path.toString(), path,
permission.toString()); permission);
final AbfsRestOperation op = client.setPermission(getRelativePath(path), final AbfsRestOperation op = client.setPermission(getRelativePath(path),
String.format(AbfsHttpConstants.PERMISSION_FORMAT, permission.toOctal())); String.format(AbfsHttpConstants.PERMISSION_FORMAT, permission.toOctal()));
@ -899,7 +899,7 @@ public class AzureBlobFileSystemStore implements Closeable {
LOG.debug( LOG.debug(
"modifyAclEntries filesystem: {} path: {} aclSpec: {}", "modifyAclEntries filesystem: {} path: {} aclSpec: {}",
client.getFileSystem(), client.getFileSystem(),
path.toString(), path,
AclEntry.aclSpecToString(aclSpec)); AclEntry.aclSpecToString(aclSpec));
identityTransformer.transformAclEntriesForSetRequest(aclSpec); identityTransformer.transformAclEntriesForSetRequest(aclSpec);
@ -940,7 +940,7 @@ public class AzureBlobFileSystemStore implements Closeable {
LOG.debug( LOG.debug(
"removeAclEntries filesystem: {} path: {} aclSpec: {}", "removeAclEntries filesystem: {} path: {} aclSpec: {}",
client.getFileSystem(), client.getFileSystem(),
path.toString(), path,
AclEntry.aclSpecToString(aclSpec)); AclEntry.aclSpecToString(aclSpec));
identityTransformer.transformAclEntriesForSetRequest(aclSpec); identityTransformer.transformAclEntriesForSetRequest(aclSpec);
@ -981,7 +981,7 @@ public class AzureBlobFileSystemStore implements Closeable {
LOG.debug( LOG.debug(
"removeDefaultAcl filesystem: {} path: {}", "removeDefaultAcl filesystem: {} path: {}",
client.getFileSystem(), client.getFileSystem(),
path.toString()); path);
String relativePath = getRelativePath(path); String relativePath = getRelativePath(path);
@ -1023,7 +1023,7 @@ public class AzureBlobFileSystemStore implements Closeable {
LOG.debug( LOG.debug(
"removeAcl filesystem: {} path: {}", "removeAcl filesystem: {} path: {}",
client.getFileSystem(), client.getFileSystem(),
path.toString()); path);
String relativePath = getRelativePath(path); String relativePath = getRelativePath(path);
@ -1062,7 +1062,7 @@ public class AzureBlobFileSystemStore implements Closeable {
LOG.debug( LOG.debug(
"setAcl filesystem: {} path: {} aclspec: {}", "setAcl filesystem: {} path: {} aclspec: {}",
client.getFileSystem(), client.getFileSystem(),
path.toString(), path,
AclEntry.aclSpecToString(aclSpec)); AclEntry.aclSpecToString(aclSpec));
identityTransformer.transformAclEntriesForSetRequest(aclSpec); identityTransformer.transformAclEntriesForSetRequest(aclSpec);
@ -1103,7 +1103,7 @@ public class AzureBlobFileSystemStore implements Closeable {
LOG.debug( LOG.debug(
"getAclStatus filesystem: {} path: {}", "getAclStatus filesystem: {} path: {}",
client.getFileSystem(), client.getFileSystem(),
path.toString()); path);
AbfsRestOperation op = client.getAclStatus(getRelativePath(path)); AbfsRestOperation op = client.getAclStatus(getRelativePath(path));
AbfsHttpOperation result = op.getResult(); AbfsHttpOperation result = op.getResult();