use of alluxio.master.DefaultSafeModeManager in project alluxio by Alluxio.
the class PersistenceTest method before.
@Before
public void before() throws Exception {
UserState s = UserState.Factory.create(ServerConfiguration.global());
AuthenticatedClientUser.set(s.getUser().getName());
TemporaryFolder tmpFolder = new TemporaryFolder();
tmpFolder.create();
File ufsRoot = tmpFolder.newFolder();
ServerConfiguration.set(PropertyKey.MASTER_JOURNAL_TYPE, JournalType.UFS);
ServerConfiguration.set(PropertyKey.MASTER_MOUNT_TABLE_ROOT_UFS, ufsRoot.getAbsolutePath());
ServerConfiguration.set(PropertyKey.MASTER_PERSISTENCE_INITIAL_INTERVAL_MS, 0);
ServerConfiguration.set(PropertyKey.MASTER_PERSISTENCE_MAX_INTERVAL_MS, 1000);
ServerConfiguration.set(PropertyKey.MASTER_PERSISTENCE_MAX_TOTAL_WAIT_TIME_MS, 1000);
mJournalFolder = tmpFolder.newFolder();
mSafeModeManager = new DefaultSafeModeManager();
mStartTimeMs = System.currentTimeMillis();
mPort = ServerConfiguration.getInt(PropertyKey.MASTER_RPC_PORT);
startServices();
}
Aggregations