[2/2] hadoop git commit: HDFS-14095. EC: Track Erasure Coding commands in DFS statistics. Contributed by Ayush Saxena.
HDFS-14095. EC: Track Erasure Coding commands in DFS statistics. Contributed by Ayush Saxena. (cherry picked from commit f534736867eed962899615ca1b7eb68bcf591d17) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/e2fa9e8c Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/e2fa9e8c Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/e2fa9e8c Branch: refs/heads/branch-3.2 Commit: e2fa9e8cddb95789e210e0400a38a676242de968 Parents: a8f67ad Author: Brahma Reddy Battula Authored: Fri Nov 30 00:18:27 2018 +0530 Committer: Brahma Reddy Battula Committed: Fri Nov 30 00:28:04 2018 +0530 -- .../hadoop/hdfs/DFSOpsCountStatistics.java | 9 +++ .../hadoop/hdfs/DistributedFileSystem.java | 18 ++ .../hadoop/hdfs/TestDistributedFileSystem.java | 63 +++- 3 files changed, 89 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/e2fa9e8c/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSOpsCountStatistics.java -- diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSOpsCountStatistics.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSOpsCountStatistics.java index 3dcf13b..b9852ba 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSOpsCountStatistics.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSOpsCountStatistics.java @@ -41,6 +41,7 @@ public class DFSOpsCountStatistics extends StorageStatistics { /** This is for counting distributed file system operations. */ public enum OpType { +ADD_EC_POLICY("op_add_ec_policy"), ALLOW_SNAPSHOT("op_allow_snapshot"), APPEND(CommonStatisticNames.OP_APPEND), CONCAT("op_concat"), @@ -51,10 +52,15 @@ public class DFSOpsCountStatistics extends StorageStatistics { CREATE_SYM_LINK("op_create_symlink"), DELETE(CommonStatisticNames.OP_DELETE), DELETE_SNAPSHOT("op_delete_snapshot"), +DISABLE_EC_POLICY("op_disable_ec_policy"), DISALLOW_SNAPSHOT("op_disallow_snapshot"), +ENABLE_EC_POLICY("op_enable_ec_policy"), EXISTS(CommonStatisticNames.OP_EXISTS), GET_BYTES_WITH_FUTURE_GS("op_get_bytes_with_future_generation_stamps"), GET_CONTENT_SUMMARY(CommonStatisticNames.OP_GET_CONTENT_SUMMARY), +GET_EC_CODECS("op_get_ec_codecs"), +GET_EC_POLICY("op_get_ec_policy"), +GET_EC_POLICIES("op_get_ec_policies"), GET_FILE_BLOCK_LOCATIONS("op_get_file_block_locations"), GET_FILE_CHECKSUM(CommonStatisticNames.OP_GET_FILE_CHECKSUM), GET_FILE_LINK_STATUS("op_get_file_link_status"), @@ -76,11 +82,13 @@ public class DFSOpsCountStatistics extends StorageStatistics { REMOVE_ACL(CommonStatisticNames.OP_REMOVE_ACL), REMOVE_ACL_ENTRIES(CommonStatisticNames.OP_REMOVE_ACL_ENTRIES), REMOVE_DEFAULT_ACL(CommonStatisticNames.OP_REMOVE_DEFAULT_ACL), +REMOVE_EC_POLICY("op_remove_ec_policy"), REMOVE_XATTR("op_remove_xattr"), RENAME(CommonStatisticNames.OP_RENAME), RENAME_SNAPSHOT("op_rename_snapshot"), RESOLVE_LINK("op_resolve_link"), SET_ACL(CommonStatisticNames.OP_SET_ACL), +SET_EC_POLICY("op_set_ec_policy"), SET_OWNER(CommonStatisticNames.OP_SET_OWNER), SET_PERMISSION(CommonStatisticNames.OP_SET_PERMISSION), SET_REPLICATION("op_set_replication"), @@ -90,6 +98,7 @@ public class DFSOpsCountStatistics extends StorageStatistics { GET_SNAPSHOT_DIFF("op_get_snapshot_diff"), GET_SNAPSHOTTABLE_DIRECTORY_LIST("op_get_snapshottable_directory_list"), TRUNCATE(CommonStatisticNames.OP_TRUNCATE), +UNSET_EC_POLICY("op_unset_ec_policy"), UNSET_STORAGE_POLICY("op_unset_storage_policy"); private static final Map SYMBOL_MAP = http://git-wip-us.apache.org/repos/asf/hadoop/blob/e2fa9e8c/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java -- diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java index ca1546c..7dd02bd 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java @@ -2845,6 +2845,8 @@ public class DistributedFileSystem extends FileSystem */ public void setErasureCodingPolicy(final Path path, final String ecPolicyName) throws IOException { +
[2/2] hadoop git commit: HDFS-14095. EC: Track Erasure Coding commands in DFS statistics. Contributed by Ayush Saxena.
HDFS-14095. EC: Track Erasure Coding commands in DFS statistics. Contributed by Ayush Saxena. (cherry picked from commit f534736867eed962899615ca1b7eb68bcf591d17) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/68955500 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/68955500 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/68955500 Branch: refs/heads/branch-3.0 Commit: 6895550043ea75d54600673102b36c1bfabb69d5 Parents: 065a1e7 Author: Brahma Reddy Battula Authored: Fri Nov 30 00:18:27 2018 +0530 Committer: Brahma Reddy Battula Committed: Fri Nov 30 00:21:07 2018 +0530 -- .../hadoop/hdfs/DFSOpsCountStatistics.java | 9 +++ .../hadoop/hdfs/DistributedFileSystem.java | 18 ++ .../hadoop/hdfs/TestDistributedFileSystem.java | 63 +++- 3 files changed, 89 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/68955500/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSOpsCountStatistics.java -- diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSOpsCountStatistics.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSOpsCountStatistics.java index 3dcf13b..b9852ba 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSOpsCountStatistics.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSOpsCountStatistics.java @@ -41,6 +41,7 @@ public class DFSOpsCountStatistics extends StorageStatistics { /** This is for counting distributed file system operations. */ public enum OpType { +ADD_EC_POLICY("op_add_ec_policy"), ALLOW_SNAPSHOT("op_allow_snapshot"), APPEND(CommonStatisticNames.OP_APPEND), CONCAT("op_concat"), @@ -51,10 +52,15 @@ public class DFSOpsCountStatistics extends StorageStatistics { CREATE_SYM_LINK("op_create_symlink"), DELETE(CommonStatisticNames.OP_DELETE), DELETE_SNAPSHOT("op_delete_snapshot"), +DISABLE_EC_POLICY("op_disable_ec_policy"), DISALLOW_SNAPSHOT("op_disallow_snapshot"), +ENABLE_EC_POLICY("op_enable_ec_policy"), EXISTS(CommonStatisticNames.OP_EXISTS), GET_BYTES_WITH_FUTURE_GS("op_get_bytes_with_future_generation_stamps"), GET_CONTENT_SUMMARY(CommonStatisticNames.OP_GET_CONTENT_SUMMARY), +GET_EC_CODECS("op_get_ec_codecs"), +GET_EC_POLICY("op_get_ec_policy"), +GET_EC_POLICIES("op_get_ec_policies"), GET_FILE_BLOCK_LOCATIONS("op_get_file_block_locations"), GET_FILE_CHECKSUM(CommonStatisticNames.OP_GET_FILE_CHECKSUM), GET_FILE_LINK_STATUS("op_get_file_link_status"), @@ -76,11 +82,13 @@ public class DFSOpsCountStatistics extends StorageStatistics { REMOVE_ACL(CommonStatisticNames.OP_REMOVE_ACL), REMOVE_ACL_ENTRIES(CommonStatisticNames.OP_REMOVE_ACL_ENTRIES), REMOVE_DEFAULT_ACL(CommonStatisticNames.OP_REMOVE_DEFAULT_ACL), +REMOVE_EC_POLICY("op_remove_ec_policy"), REMOVE_XATTR("op_remove_xattr"), RENAME(CommonStatisticNames.OP_RENAME), RENAME_SNAPSHOT("op_rename_snapshot"), RESOLVE_LINK("op_resolve_link"), SET_ACL(CommonStatisticNames.OP_SET_ACL), +SET_EC_POLICY("op_set_ec_policy"), SET_OWNER(CommonStatisticNames.OP_SET_OWNER), SET_PERMISSION(CommonStatisticNames.OP_SET_PERMISSION), SET_REPLICATION("op_set_replication"), @@ -90,6 +98,7 @@ public class DFSOpsCountStatistics extends StorageStatistics { GET_SNAPSHOT_DIFF("op_get_snapshot_diff"), GET_SNAPSHOTTABLE_DIRECTORY_LIST("op_get_snapshottable_directory_list"), TRUNCATE(CommonStatisticNames.OP_TRUNCATE), +UNSET_EC_POLICY("op_unset_ec_policy"), UNSET_STORAGE_POLICY("op_unset_storage_policy"); private static final Map SYMBOL_MAP = http://git-wip-us.apache.org/repos/asf/hadoop/blob/68955500/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java -- diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java index 5f63f81..4bf73fb 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java @@ -2628,6 +2628,8 @@ public class DistributedFileSystem extends FileSystem */ public void setErasureCodingPolicy(final Path path, final String ecPolicyName) throws IOException { +