use of org.apache.myriad.state.MyriadStateStore in project incubator-myriad by apache.
the class MyriadModule method providesSchedulerState.
@Provides
@Singleton
SchedulerState providesSchedulerState(MyriadConfiguration cfg) {
LOGGER.debug("Configuring SchedulerState provider");
MyriadStateStore myriadStateStore = null;
if (cfg.isHAEnabled()) {
myriadStateStore = providesMyriadStateStore();
if (myriadStateStore == null) {
throw new RuntimeException("Could not find a state store" + " implementation for Myriad. The 'yarn.resourcemanager.store.class'" + " property should be set to a class implementing the" + " MyriadStateStore interface. For e.g." + " org.apache.hadoop.yarn.server.resourcemanager.recovery.MyriadFileSystemRMStateStore");
}
}
return new SchedulerState(myriadStateStore);
}
use of org.apache.myriad.state.MyriadStateStore in project incubator-myriad by apache.
the class TestObjectFactory method getSchedulerState.
public static SchedulerState getSchedulerState(MyriadConfiguration cfg, String baseDir) throws Exception {
MyriadStateStore store = TestObjectFactory.getStateStore(new Configuration(), baseDir);
SchedulerState state = new SchedulerState(store);
state.setFrameworkId(FrameworkID.newBuilder().setValue("mock-framework").build());
return state;
}
Aggregations