@Before
public void setUp() throws Exception {
YarnConfiguration conf = SliderUtils.createConfiguration();
fs = FileSystem.get(new URI("file:///"), conf);
AppState appState = null;
try {
fs = FileSystem.get(new URI("file:///"), conf);
File
historyWorkDir =
new File("target/history", "TestAMAgentWebServices");
org.apache.hadoop.fs.Path
historyPath =
new org.apache.hadoop.fs.Path(historyWorkDir.toURI());
fs.delete(historyPath, true);
appState = new AppState(new MockRecordFactory());
appState.setContainerLimits(RM_MAX_RAM, RM_MAX_CORES);
appState.buildInstance(
factory.newInstanceDefinition(0, 0, 0),
new Configuration(false),
factory.ROLES,
fs,
historyPath,