Revert "HDFS-12603. Enable async edit logging by default." This reverts commit afb42aeabf1317b755ab79e0265bc90920c896ac.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/82cd85d8 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/82cd85d8 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/82cd85d8 Branch: refs/heads/YARN-5881 Commit: 82cd85d8680912b8d268c875bd51598b20f3313c Parents: f9ff17f Author: Andrew Wang <[email protected]> Authored: Mon Oct 9 17:53:56 2017 -0700 Committer: Andrew Wang <[email protected]> Committed: Mon Oct 9 17:53:56 2017 -0700 ---------------------------------------------------------------------- .../org/apache/hadoop/hdfs/DFSConfigKeys.java | 2 +- .../hadoop/hdfs/server/namenode/FSEditLog.java | 7 +------ .../hdfs/server/namenode/FSEditLogAsync.java | 5 ----- .../src/main/resources/hdfs-default.xml | 2 +- .../namenode/ha/TestFailureToReadEdits.java | 22 +++++++------------- 5 files changed, 10 insertions(+), 28 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/82cd85d8/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSConfigKeys.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSConfigKeys.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSConfigKeys.java index 395b192..1f96763 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSConfigKeys.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSConfigKeys.java @@ -326,7 +326,7 @@ public class DFSConfigKeys extends CommonConfigurationKeys { public static final String DFS_NAMENODE_EDITS_ASYNC_LOGGING = "dfs.namenode.edits.asynclogging"; - public static final boolean DFS_NAMENODE_EDITS_ASYNC_LOGGING_DEFAULT = true; + public static final boolean DFS_NAMENODE_EDITS_ASYNC_LOGGING_DEFAULT = false; public static final String DFS_LIST_LIMIT = "dfs.ls.limit"; public static final int DFS_LIST_LIMIT_DEFAULT = 1000; http://git-wip-us.apache.org/repos/asf/hadoop/blob/82cd85d8/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java index 7d19b04..a8f5bfa 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java @@ -130,7 +130,7 @@ public class FSEditLog implements LogsPurgeable { * * In a non-HA setup: * - * The log starts in UNINITIALIZED state upon construction. Once it's + * The log starts in UNITIALIZED state upon construction. Once it's * initialized, it is usually in IN_SEGMENT state, indicating that edits may * be written. In the middle of a roll, or while saving the namespace, it * briefly enters the BETWEEN_LOG_SEGMENTS state, indicating that the previous @@ -1837,9 +1837,4 @@ public class FSEditLog implements LogsPurgeable { } return count; } - - @Override - public String toString() { - return super.toString(); - } } http://git-wip-us.apache.org/repos/asf/hadoop/blob/82cd85d8/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogAsync.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogAsync.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogAsync.java index 1f5dc75..c14a310 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogAsync.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLogAsync.java @@ -319,9 +319,4 @@ class FSEditLogAsync extends FSEditLog implements Runnable { return "["+getClass().getSimpleName()+" op:"+op+" call:"+call+"]"; } } - - @Override - public String toString() { - return super.toString(); - } } http://git-wip-us.apache.org/repos/asf/hadoop/blob/82cd85d8/hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml b/hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml index 3752578..3491ed2 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml @@ -4105,7 +4105,7 @@ <property> <name>dfs.namenode.edits.asynclogging</name> - <value>true</value> + <value>false</value> <description> If set to true, enables asynchronous edit logs in the Namenode. If set to false, the Namenode uses the traditional synchronous edit logs. http://git-wip-us.apache.org/repos/asf/hadoop/blob/82cd85d8/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestFailureToReadEdits.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestFailureToReadEdits.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestFailureToReadEdits.java index 2bc246d..93c717c 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestFailureToReadEdits.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestFailureToReadEdits.java @@ -75,7 +75,6 @@ public class TestFailureToReadEdits { private static final Random RANDOM = new Random(); private final TestType clusterType; - private final boolean useAsyncEditLogging; private Configuration conf; private MiniDFSCluster cluster; private MiniQJMHACluster miniQjmHaCluster; // for QJM case only @@ -89,23 +88,18 @@ public class TestFailureToReadEdits { }; /** - * Run this suite of tests for {QJM-based, file-based HA} x {async - * edit logging enabled, disabled}. + * Run this suite of tests both for QJM-based HA and for file-based + * HA. */ @Parameters public static Iterable<Object[]> data() { - return Arrays.asList(new Object[][]{ - {TestType.SHARED_DIR_HA, Boolean.FALSE}, - {TestType.SHARED_DIR_HA, Boolean.TRUE}, - {TestType.QJM_HA, Boolean.FALSE}, - {TestType.QJM_HA, Boolean.TRUE}, - }); + return Arrays.asList(new Object[][] { + { TestType.SHARED_DIR_HA }, + { TestType.QJM_HA } }); } - - public TestFailureToReadEdits(TestType clusterType, Boolean - useAsyncEditLogging) { + + public TestFailureToReadEdits(TestType clusterType) { this.clusterType = clusterType; - this.useAsyncEditLogging = useAsyncEditLogging; } @Before @@ -115,8 +109,6 @@ public class TestFailureToReadEdits { conf.setInt(DFSConfigKeys.DFS_NAMENODE_CHECKPOINT_TXNS_KEY, 1); conf.setInt(DFSConfigKeys.DFS_NAMENODE_NUM_CHECKPOINTS_RETAINED_KEY, 10); conf.setInt(DFSConfigKeys.DFS_HA_TAILEDITS_PERIOD_KEY, 1); - conf.setBoolean(DFSConfigKeys.DFS_NAMENODE_EDITS_ASYNC_LOGGING, - useAsyncEditLogging); HAUtil.setAllowStandbyReads(conf, true); if (clusterType == TestType.SHARED_DIR_HA) { --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
