You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by st...@apache.org on 2020/07/20 09:54:34 UTC
[hadoop] 01/02: HADOOP-16682. ABFS: Removing unnecessary toString()
invocations
This is an automated email from the ASF dual-hosted git repository.
stevel pushed a commit to branch branch-3.3
in repository https://gitbox.apache.org/repos/asf/hadoop.git
commit e01852181a17552d6f0d33b7aa17ce98f984888b
Author: bilaharith <52...@users.noreply.github.com>
AuthorDate: Sat Jul 18 22:30:18 2020 +0530
HADOOP-16682. ABFS: Removing unnecessary toString() invocations
- Contributed by Bilahari T H
Change-Id: Id55495b44d81533d1d3654de2553c709f505f7eb
---
.../hadoop/fs/azurebfs/AzureBlobFileSystem.java | 8 ++++----
.../fs/azurebfs/AzureBlobFileSystemStore.java | 22 +++++++++++-----------
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystem.java b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystem.java
index 6694c13..8fce0ff 100644
--- a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystem.java
+++ b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystem.java
@@ -271,9 +271,9 @@ public class AzureBlobFileSystem extends FileSystem {
}
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();
@@ -777,7 +777,7 @@ public class AzureBlobFileSystem extends FileSystem {
@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(
@@ -926,7 +926,7 @@ public class AzureBlobFileSystem extends FileSystem {
*/
@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(
diff --git a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java
index 8e0e6c1..1ed4683 100644
--- a/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java
+++ b/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AzureBlobFileSystemStore.java
@@ -413,8 +413,8 @@ public class AzureBlobFileSystemStore implements Closeable {
client.getFileSystem(),
path,
overwrite,
- permission.toString(),
- umask.toString(),
+ permission,
+ umask,
isNamespaceEnabled);
String relativePath = getRelativePath(path);
@@ -850,7 +850,7 @@ public class AzureBlobFileSystemStore implements Closeable {
LOG.debug(
"setOwner filesystem: {} path: {} owner: {} group: {}",
client.getFileSystem(),
- path.toString(),
+ path,
owner,
group);
@@ -877,8 +877,8 @@ public class AzureBlobFileSystemStore implements Closeable {
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()));
@@ -899,7 +899,7 @@ public class AzureBlobFileSystemStore implements Closeable {
LOG.debug(
"modifyAclEntries filesystem: {} path: {} aclSpec: {}",
client.getFileSystem(),
- path.toString(),
+ path,
AclEntry.aclSpecToString(aclSpec));
identityTransformer.transformAclEntriesForSetRequest(aclSpec);
@@ -940,7 +940,7 @@ public class AzureBlobFileSystemStore implements Closeable {
LOG.debug(
"removeAclEntries filesystem: {} path: {} aclSpec: {}",
client.getFileSystem(),
- path.toString(),
+ path,
AclEntry.aclSpecToString(aclSpec));
identityTransformer.transformAclEntriesForSetRequest(aclSpec);
@@ -981,7 +981,7 @@ public class AzureBlobFileSystemStore implements Closeable {
LOG.debug(
"removeDefaultAcl filesystem: {} path: {}",
client.getFileSystem(),
- path.toString());
+ path);
String relativePath = getRelativePath(path);
@@ -1023,7 +1023,7 @@ public class AzureBlobFileSystemStore implements Closeable {
LOG.debug(
"removeAcl filesystem: {} path: {}",
client.getFileSystem(),
- path.toString());
+ path);
String relativePath = getRelativePath(path);
@@ -1062,7 +1062,7 @@ public class AzureBlobFileSystemStore implements Closeable {
LOG.debug(
"setAcl filesystem: {} path: {} aclspec: {}",
client.getFileSystem(),
- path.toString(),
+ path,
AclEntry.aclSpecToString(aclSpec));
identityTransformer.transformAclEntriesForSetRequest(aclSpec);
@@ -1103,7 +1103,7 @@ public class AzureBlobFileSystemStore implements Closeable {
LOG.debug(
"getAclStatus filesystem: {} path: {}",
client.getFileSystem(),
- path.toString());
+ path);
AbfsRestOperation op = client.getAclStatus(getRelativePath(path));
AbfsHttpOperation result = op.getResult();
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org