/** * Load the instance definition. It is not resolved at this point * @param name cluster name * @param clusterDirectory cluster dir * @return the loaded configuration * @throws IOException * @throws SliderException * @throws UnknownApplicationInstanceException if the file is not found */ public AggregateConf loadInstanceDefinitionUnresolved(String name, Path clusterDirectory) throws IOException, SliderException { try { AggregateConf definition = InstanceIO.loadInstanceDefinitionUnresolved(sliderFileSystem, clusterDirectory); definition.setName(name); return definition; } catch (FileNotFoundException e) { throw UnknownApplicationInstanceException.unknownInstance(name, e); } }
/** * Load the instance definition. It is not resolved at this point * @param name cluster name * @param clusterDirectory cluster dir * @return the loaded configuration * @throws IOException * @throws SliderException * @throws UnknownApplicationInstanceException if the file is not found */ public AggregateConf loadInstanceDefinitionUnresolved(String name, Path clusterDirectory) throws IOException, SliderException { try { AggregateConf definition = InstanceIO.loadInstanceDefinitionUnresolved(sliderFileSystem, clusterDirectory); definition.setName(name); return definition; } catch (FileNotFoundException e) { throw UnknownApplicationInstanceException.unknownInstance(name, e); } }
protected AggregateConf getAggregateConf() { try { JsonSerDeser<ConfTree> confTreeJsonSerDeser = new JsonSerDeser<>(ConfTree.class); AggregateConf aggregateConf = new AggregateConf( confTreeJsonSerDeser.fromResource(EXAMPLES + "resources.json"), confTreeJsonSerDeser.fromResource(EXAMPLES + "app_configuration.json"), confTreeJsonSerDeser.fromResource(EXAMPLES + "internal.json") ); aggregateConf.setName("test"); return aggregateConf; } catch (IOException e) { throw new AssertionError(e.getMessage(), e); } } }
protected AggregateConf getAggregateConf() { try { JsonSerDeser<ConfTree> confTreeJsonSerDeser = new JsonSerDeser<>(ConfTree.class); AggregateConf aggregateConf = new AggregateConf( confTreeJsonSerDeser.fromResource(EXAMPLES + "resources.json"), confTreeJsonSerDeser.fromResource(EXAMPLES + "app_configuration.json"), confTreeJsonSerDeser.fromResource(EXAMPLES + "internal.json") ); aggregateConf.setName("test"); return aggregateConf; } catch (IOException e) { throw new AssertionError(e.getMessage(), e); } } }
appConfSnapshot.confTree, internalsSnapshot.confTree); instanceDefinitionSnapshot.setName(instanceDefinition.getName());
appConfSnapshot.confTree, internalsSnapshot.confTree); instanceDefinitionSnapshot.setName(instanceDefinition.getName());
instanceDefinition.setName(clustername);
instanceDefinition.setName(clustername);