Revert "HDFS-12603. Enable async edit logging by default."
This reverts commit afb42aeabf
.
This commit is contained in:
parent
f9ff17f510
commit
82cd85d868
|
@ -326,7 +326,7 @@ public class DFSConfigKeys extends CommonConfigurationKeys {
|
||||||
|
|
||||||
public static final String DFS_NAMENODE_EDITS_ASYNC_LOGGING =
|
public static final String DFS_NAMENODE_EDITS_ASYNC_LOGGING =
|
||||||
"dfs.namenode.edits.asynclogging";
|
"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 String DFS_LIST_LIMIT = "dfs.ls.limit";
|
||||||
public static final int DFS_LIST_LIMIT_DEFAULT = 1000;
|
public static final int DFS_LIST_LIMIT_DEFAULT = 1000;
|
||||||
|
|
|
@ -130,7 +130,7 @@ public class FSEditLog implements LogsPurgeable {
|
||||||
*
|
*
|
||||||
* In a non-HA setup:
|
* 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
|
* 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
|
* 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
|
* briefly enters the BETWEEN_LOG_SEGMENTS state, indicating that the previous
|
||||||
|
@ -1837,9 +1837,4 @@ public class FSEditLog implements LogsPurgeable {
|
||||||
}
|
}
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return super.toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -319,9 +319,4 @@ class FSEditLogAsync extends FSEditLog implements Runnable {
|
||||||
return "["+getClass().getSimpleName()+" op:"+op+" call:"+call+"]";
|
return "["+getClass().getSimpleName()+" op:"+op+" call:"+call+"]";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return super.toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4105,7 +4105,7 @@
|
||||||
|
|
||||||
<property>
|
<property>
|
||||||
<name>dfs.namenode.edits.asynclogging</name>
|
<name>dfs.namenode.edits.asynclogging</name>
|
||||||
<value>true</value>
|
<value>false</value>
|
||||||
<description>
|
<description>
|
||||||
If set to true, enables asynchronous edit logs in the Namenode. If set
|
If set to true, enables asynchronous edit logs in the Namenode. If set
|
||||||
to false, the Namenode uses the traditional synchronous edit logs.
|
to false, the Namenode uses the traditional synchronous edit logs.
|
||||||
|
|
|
@ -75,7 +75,6 @@ public class TestFailureToReadEdits {
|
||||||
private static final Random RANDOM = new Random();
|
private static final Random RANDOM = new Random();
|
||||||
|
|
||||||
private final TestType clusterType;
|
private final TestType clusterType;
|
||||||
private final boolean useAsyncEditLogging;
|
|
||||||
private Configuration conf;
|
private Configuration conf;
|
||||||
private MiniDFSCluster cluster;
|
private MiniDFSCluster cluster;
|
||||||
private MiniQJMHACluster miniQjmHaCluster; // for QJM case only
|
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
|
* Run this suite of tests both for QJM-based HA and for file-based
|
||||||
* edit logging enabled, disabled}.
|
* HA.
|
||||||
*/
|
*/
|
||||||
@Parameters
|
@Parameters
|
||||||
public static Iterable<Object[]> data() {
|
public static Iterable<Object[]> data() {
|
||||||
return Arrays.asList(new Object[][]{
|
return Arrays.asList(new Object[][] {
|
||||||
{TestType.SHARED_DIR_HA, Boolean.FALSE},
|
{ TestType.SHARED_DIR_HA },
|
||||||
{TestType.SHARED_DIR_HA, Boolean.TRUE},
|
{ TestType.QJM_HA } });
|
||||||
{TestType.QJM_HA, Boolean.FALSE},
|
|
||||||
{TestType.QJM_HA, Boolean.TRUE},
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public TestFailureToReadEdits(TestType clusterType, Boolean
|
public TestFailureToReadEdits(TestType clusterType) {
|
||||||
useAsyncEditLogging) {
|
|
||||||
this.clusterType = clusterType;
|
this.clusterType = clusterType;
|
||||||
this.useAsyncEditLogging = useAsyncEditLogging;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
|
@ -115,8 +109,6 @@ public class TestFailureToReadEdits {
|
||||||
conf.setInt(DFSConfigKeys.DFS_NAMENODE_CHECKPOINT_TXNS_KEY, 1);
|
conf.setInt(DFSConfigKeys.DFS_NAMENODE_CHECKPOINT_TXNS_KEY, 1);
|
||||||
conf.setInt(DFSConfigKeys.DFS_NAMENODE_NUM_CHECKPOINTS_RETAINED_KEY, 10);
|
conf.setInt(DFSConfigKeys.DFS_NAMENODE_NUM_CHECKPOINTS_RETAINED_KEY, 10);
|
||||||
conf.setInt(DFSConfigKeys.DFS_HA_TAILEDITS_PERIOD_KEY, 1);
|
conf.setInt(DFSConfigKeys.DFS_HA_TAILEDITS_PERIOD_KEY, 1);
|
||||||
conf.setBoolean(DFSConfigKeys.DFS_NAMENODE_EDITS_ASYNC_LOGGING,
|
|
||||||
useAsyncEditLogging);
|
|
||||||
HAUtil.setAllowStandbyReads(conf, true);
|
HAUtil.setAllowStandbyReads(conf, true);
|
||||||
|
|
||||||
if (clusterType == TestType.SHARED_DIR_HA) {
|
if (clusterType == TestType.SHARED_DIR_HA) {
|
||||||
|
|
Loading…
Reference in New Issue