[GitHub] [hadoop] bshashikant commented on a change in pull request #2175: HDFS-15497. Make snapshot limit on global as well per snapshot root directory configurable
bshashikant commented on a change in pull request #2175: URL: https://github.com/apache/hadoop/pull/2175#discussion_r464587720 ## File path: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/snapshot/SnapshotManager.java ## @@ -99,13 +99,15 @@ private boolean allowNestedSnapshots = false; private int snapshotCounter = 0; + private final int maxSnapshotLimitPerDirectory; Review comment: sure ## File path: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSConfigKeys.java ## @@ -498,9 +498,14 @@ public static final int DFS_NAMENODE_SNAPSHOT_DIFF_LISTING_LIMIT_DEFAULT = 1000; - public static final String DFS_NAMENODE_SNAPSHOT_MAX_LIMIT = - "dfs.namenode.snapshot.max.limit"; + public static final String + DFS_NAMENODE_SNAPSHOT_MAX_LIMIT = "dfs.namenode.snapshot.max.limit"; public static final int DFS_NAMENODE_SNAPSHOT_MAX_LIMIT_DEFAULT = 65536; + public static final String + DFS_NAMENODE_SNAPSHOT_GLOBAL_LIMIT = "dfs.namenode.snapshot.global.limit"; Review comment: done This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org
[GitHub] [hadoop] bshashikant commented on a change in pull request #2175: HDFS-15497. Make snapshot limit on global as well per snapshot root directory configurable
bshashikant commented on a change in pull request #2175: URL: https://github.com/apache/hadoop/pull/2175#discussion_r464581693 ## File path: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSConfigKeys.java ## @@ -498,9 +498,14 @@ public static final int DFS_NAMENODE_SNAPSHOT_DIFF_LISTING_LIMIT_DEFAULT = 1000; - public static final String DFS_NAMENODE_SNAPSHOT_MAX_LIMIT = - "dfs.namenode.snapshot.max.limit"; + public static final String + DFS_NAMENODE_SNAPSHOT_MAX_LIMIT = "dfs.namenode.snapshot.max.limit"; Review comment: sure ## File path: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/snapshot/SnapshotManager.java ## @@ -99,13 +99,15 @@ private boolean allowNestedSnapshots = false; private int snapshotCounter = 0; + private final int maxSnapshotLimitPerDirectory; Review comment: sure This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org
[GitHub] [hadoop] bshashikant commented on a change in pull request #2175: HDFS-15497. Make snapshot limit on global as well per snapshot root directory configurable
bshashikant commented on a change in pull request #2175: URL: https://github.com/apache/hadoop/pull/2175#discussion_r464420469 ## File path: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/snapshot/SnapshotManager.java ## @@ -117,23 +119,37 @@ public SnapshotManager(final Configuration conf, final FSDirectory fsdir) { DFSConfigKeys.DFS_NAMENODE_SNAPSHOT_DIFF_ALLOW_SNAP_ROOT_DESCENDANT, DFSConfigKeys. DFS_NAMENODE_SNAPSHOT_DIFF_ALLOW_SNAP_ROOT_DESCENDANT_DEFAULT); +this.maxSnapshotLimitPerDirectory = conf.getInt( +DFSConfigKeys. +DFS_NAMENODE_SNAPSHOT_MAX_LIMIT, +DFSConfigKeys. +DFS_NAMENODE_SNAPSHOT_MAX_LIMIT_DEFAULT); this.maxSnapshotLimit = conf.getInt( -DFSConfigKeys.DFS_NAMENODE_SNAPSHOT_MAX_LIMIT, -DFSConfigKeys.DFS_NAMENODE_SNAPSHOT_MAX_LIMIT_DEFAULT); +DFSConfigKeys.DFS_NAMENODE_SNAPSHOT_GLOBAL_LIMIT, +DFSConfigKeys.DFS_NAMENODE_SNAPSHOT_GLOBAL_LIMIT_DEFAULT); LOG.info("Loaded config captureOpenFiles: " + captureOpenFiles + ", skipCaptureAccessTimeOnlyChange: " + skipCaptureAccessTimeOnlyChange + ", snapshotDiffAllowSnapRootDescendant: " + snapshotDiffAllowSnapRootDescendant + ", maxSnapshotLimit: " -+ maxSnapshotLimit); ++ maxSnapshotLimit Review comment: maxSnapshotLimitPerDirectory is already printed in the line below. I hope this works This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org
[GitHub] [hadoop] bshashikant commented on a change in pull request #2175: HDFS-15497. Make snapshot limit on global as well per snapshot root directory configurable
bshashikant commented on a change in pull request #2175: URL: https://github.com/apache/hadoop/pull/2175#discussion_r463820223 ## File path: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSConfigKeys.java ## @@ -498,9 +498,14 @@ public static final int DFS_NAMENODE_SNAPSHOT_DIFF_LISTING_LIMIT_DEFAULT = 1000; - public static final String DFS_NAMENODE_SNAPSHOT_MAX_LIMIT = - "dfs.namenode.snapshot.max.limit"; + public static final String + DFS_NAMENODE_SNAPSHOT_MAX_LIMIT = "dfs.namenode.snapshot.max.limit"; Review comment: It was changed back to the original name as per Nicholas suggestion. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org
[GitHub] [hadoop] bshashikant commented on a change in pull request #2175: HDFS-15497. Make snapshot limit on global as well per snapshot root directory configurable
bshashikant commented on a change in pull request #2175: URL: https://github.com/apache/hadoop/pull/2175#discussion_r463819929 ## File path: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSConfigKeys.java ## @@ -498,9 +498,14 @@ public static final int DFS_NAMENODE_SNAPSHOT_DIFF_LISTING_LIMIT_DEFAULT = 1000; - public static final String DFS_NAMENODE_SNAPSHOT_MAX_LIMIT = - "dfs.namenode.snapshot.max.limit"; + public static final String + DFS_NAMENODE_SNAPSHOT_MAX_LIMIT = "dfs.namenode.snapshot.max.limit"; Review comment: It was suggested that the config name should not be changed as it will be an incomatible change. The constant name followes default convention of defining the configs. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org