use of alluxio.master.NoopMaster in project alluxio by Alluxio.
the class UfsJournalIntegrationTest method deleteFsMasterJournalLogs.
private void deleteFsMasterJournalLogs() throws Exception {
String journalFolder = mLocalAlluxioCluster.getLocalAlluxioMaster().getJournalFolder();
UfsJournal journal = new UfsJournal(new URI(PathUtils.concatPath(journalFolder, Constants.FILE_SYSTEM_MASTER_NAME)), new NoopMaster(), 0, Collections::emptySet);
if (UfsJournalSnapshot.getCurrentLog(journal) != null) {
UnderFileSystem.Factory.create(journalFolder, ServerConfiguration.global()).deleteFile(UfsJournalSnapshot.getCurrentLog(journal).getLocation().toString());
}
}
use of alluxio.master.NoopMaster in project alluxio by Alluxio.
the class TriggeredCheckpointTest method ufsJournal.
@Test
public void ufsJournal() throws Exception {
int numFiles = 100;
MultiProcessCluster cluster = MultiProcessCluster.newBuilder(PortCoordination.TRIGGERED_UFS_CHECKPOINT).setClusterName("TriggeredUfsCheckpointTest").addProperty(PropertyKey.MASTER_JOURNAL_TYPE, JournalType.UFS.toString()).addProperty(PropertyKey.MASTER_JOURNAL_CHECKPOINT_PERIOD_ENTRIES, String.valueOf(numFiles)).setNumMasters(1).setNumWorkers(1).build();
try {
cluster.start();
cluster.waitForAllNodesRegistered(20 * Constants.SECOND_MS);
// Get enough journal entries
createFiles(cluster, numFiles);
// Trigger checkpoint
Assert.assertEquals(cluster.getMasterAddresses().get(0).getHostname(), cluster.getMetaMasterClient().checkpoint());
String journalLocation = cluster.getJournalDir();
UfsJournal ufsJournal = new UfsJournal(URIUtils.appendPathOrDie(new URI(journalLocation), Constants.FILE_SYSTEM_MASTER_NAME), new NoopMaster(""), 0, Collections::emptySet);
Assert.assertEquals(1, UfsJournalSnapshot.getSnapshot(ufsJournal).getCheckpoints().size());
validateCheckpointInClusterRestart(cluster);
cluster.notifySuccess();
} finally {
cluster.destroy();
}
}
use of alluxio.master.NoopMaster in project alluxio by Alluxio.
the class UfsJournalLogWriterTest method before.
@Before
public void before() throws Exception {
URI location = URIUtils.appendPathOrDie(new URI(mFolder.newFolder().getAbsolutePath()), "FileSystemMaster");
mUfs = Mockito.spy(UnderFileSystem.Factory.create(location.toString(), ServerConfiguration.global()));
mJournal = new UfsJournal(location, new NoopMaster(), mUfs, 0, Collections::emptySet);
mJournal.start();
mJournal.gainPrimacy();
}
use of alluxio.master.NoopMaster in project alluxio by Alluxio.
the class UfsJournalCheckpointWriterTest method before.
@Before
public void before() throws Exception {
URI location = URIUtils.appendPathOrDie(new URI(mFolder.newFolder().getAbsolutePath()), "FileSystemMaster");
mUfs = Mockito.spy(UnderFileSystem.Factory.create(location.toString(), ServerConfiguration.global()));
mJournal = new UfsJournal(location, new NoopMaster(), mUfs, 0, Collections::emptySet);
}
use of alluxio.master.NoopMaster in project alluxio by Alluxio.
the class UfsJournalReaderTest method before.
@Before
public void before() throws Exception {
URI location = URIUtils.appendPathOrDie(new URI(mFolder.newFolder().getAbsolutePath()), "FileSystemMaster");
mUfs = Mockito.spy(UnderFileSystem.Factory.create(location.toString(), ServerConfiguration.global()));
mJournal = new UfsJournal(location, new NoopMaster(), mUfs, 0, Collections::emptySet);
mJournal.start();
mJournal.gainPrimacy();
}
Aggregations