Search in sources :

Example 1 with DefaultSafeModeManager

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();
}
Also used : UserState(alluxio.security.user.UserState) TemporaryFolder(org.junit.rules.TemporaryFolder) DefaultSafeModeManager(alluxio.master.DefaultSafeModeManager) File(java.io.File) Before(org.junit.Before)

Aggregations

DefaultSafeModeManager (alluxio.master.DefaultSafeModeManager)1 UserState (alluxio.security.user.UserState)1 File (java.io.File)1 Before (org.junit.Before)1 TemporaryFolder (org.junit.rules.TemporaryFolder)1