HDFS-13587. TestQuorumJournalManager fails on Windows. Contributed by Anbang Hu.
This commit is contained in:
parent
51ce02bb54
commit
c13dea87d9
@ -37,6 +37,7 @@
|
||||
import org.apache.hadoop.hdfs.MiniDFSCluster;
|
||||
import org.apache.hadoop.hdfs.qjournal.client.QuorumJournalManager;
|
||||
import org.apache.hadoop.hdfs.qjournal.server.JournalNode;
|
||||
import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem;
|
||||
import org.apache.hadoop.net.NetUtils;
|
||||
|
||||
import com.google.common.base.Joiner;
|
||||
@ -51,6 +52,10 @@ public static class Builder {
|
||||
private boolean format = true;
|
||||
private final Configuration conf;
|
||||
|
||||
static {
|
||||
DefaultMetricsSystem.setMiniClusterMode(true);
|
||||
}
|
||||
|
||||
public Builder(Configuration conf) {
|
||||
this.conf = conf;
|
||||
}
|
||||
|
@ -93,6 +93,7 @@ public void setup() throws Exception {
|
||||
conf.setInt(CommonConfigurationKeysPublic.IPC_CLIENT_CONNECT_MAX_RETRIES_KEY, 0);
|
||||
|
||||
cluster = new MiniJournalCluster.Builder(conf)
|
||||
.baseDir(GenericTestUtils.getRandomizedTestDir().getAbsolutePath())
|
||||
.build();
|
||||
cluster.waitActive();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user