Search in sources :

Example 1 with DefaultTableMaster

use of alluxio.master.table.DefaultTableMaster in project alluxio by Alluxio.

the class TransformManagerTest method before.

@Before
public void before() throws Exception {
    ServerConfiguration.set(PropertyKey.MASTER_HOSTNAME, "localhost");
    ServerConfiguration.set(PropertyKey.MASTER_RPC_PORT, PortRegistry.getFreePort());
    ServerConfiguration.set(PropertyKey.MASTER_JOURNAL_TYPE, "UFS");
    ServerConfiguration.set(PropertyKey.TABLE_TRANSFORM_MANAGER_JOB_HISTORY_RETENTION_TIME, "1h");
    mJournalSystem = JournalTestUtils.createJournalSystem(mTemporaryFolder);
    mJournalSystem.format();
    CoreMasterContext context = MasterTestUtils.testMasterContext(mJournalSystem);
    mMockJobMasterClient = Mockito.mock(JobMasterClient.class);
    mTableMaster = new DefaultTableMaster(context, mMockJobMasterClient);
    start();
    TestDatabase.genTable(NUM_TABLES, NUM_PARTITIONS, false);
    mTableMaster.attachDatabase(TestUdbFactory.TYPE, "connect", DB, DB, Collections.emptyMap(), false);
}
Also used : JobMasterClient(alluxio.client.job.JobMasterClient) CoreMasterContext(alluxio.master.CoreMasterContext) DefaultTableMaster(alluxio.master.table.DefaultTableMaster) Before(org.junit.Before)

Aggregations

JobMasterClient (alluxio.client.job.JobMasterClient)1 CoreMasterContext (alluxio.master.CoreMasterContext)1 DefaultTableMaster (alluxio.master.table.DefaultTableMaster)1 Before (org.junit.Before)1