use of org.apache.hadoop.yarn.server.resourcemanager.recovery.MyriadFileSystemRMStateStore in project incubator-myriad by apache.
the class TestObjectFactory method getStateStore.
public static MyriadFileSystemRMStateStore getStateStore(Configuration conf, String baseDir) throws Exception {
conf.set("yarn.resourcemanager.fs.state-store.uri", "file:///" + baseDir);
MyriadFileSystemRMStateStore store = new MyriadFileSystemRMStateStore();
store.init(conf);
store.start();
store.loadState();
store.setRMDispatcher(new MockDispatcher());
return store;
}
use of org.apache.hadoop.yarn.server.resourcemanager.recovery.MyriadFileSystemRMStateStore in project incubator-myriad by apache.
the class SchedulerStateResourceTest method getSchedulerState.
private SchedulerState getSchedulerState() throws Exception {
SchedulerState state = new SchedulerState(new MyriadFileSystemRMStateStore());
idOne = Protos.TaskID.newBuilder().setValue("nt-1").build();
idTwo = Protos.TaskID.newBuilder().setValue("nt-2").build();
idThree = Protos.TaskID.newBuilder().setValue("nt-3").build();
TreeMap<String, Long> ports = new TreeMap<>();
state.addTask(idOne, new NodeTask(new ServiceResourceProfile("profile1", 0.2, 1024.0, ports), new LikeConstraint("localhost", "host-[0-9]*.example.com")));
state.addTask(idTwo, new NodeTask(new ServiceResourceProfile("profile2", 0.4, 2048.0, ports), new LikeConstraint("localhost", "host-[0-9]*.example.com")));
state.addTask(idThree, new NodeTask(new ServiceResourceProfile("profile3", 0.6, 3072.0, ports), new LikeConstraint("localhost", "host-[0-9]*.example.com")));
state.setFrameworkId(FrameworkID.newBuilder().setValue("mock-framework").build());
state.makeTaskActive(idOne);
state.makeTaskPending(idTwo);
state.makeTaskStaging(idThree);
return state;
}
Aggregations