void mergeCommandOrders(List<CommandOrder> commandOrders, ConfTreeOperations resources) { for (String component : resources.getComponentNames()) { String prefix = SliderUtils.trimPrefix( resources.getComponentOpt(component, ROLE_PREFIX, null));
+ "state (components and instance count)"); Map<String, Integer> clientComponentInstances = new HashMap<>(); for (String componentName : clientResources.getComponentNames()) { if (!SliderKeys.COMPONENT_AM.equals(componentName)) { clientComponentInstances.put(componentName, clientResources
protected void validateComponentProperties(ConfTreeOperations props) throws BadConfigException { for (String compName : props.getComponentNames()) { MapOperations mo = props.getComponent(compName); if (mo == null) continue; for (String key : mo.keySet()) { validatePropertyNamePrefix(key); } } }
protected void validateComponentProperties(ConfTreeOperations props) throws BadConfigException { for (String compName : props.getComponentNames()) { MapOperations mo = props.getComponent(compName); if (mo == null) continue; for (String key : mo.keySet()) { validatePropertyNamePrefix(key); } } }
void mergeCommandOrders(List<CommandOrder> commandOrders, ConfTreeOperations resources) { for (String component : resources.getComponentNames()) { String prefix = SliderUtils.trimPrefix( resources.getComponentOpt(component, ROLE_PREFIX, null));
+ "state (components and instance count)"); Map<String, Integer> clientComponentInstances = new HashMap<>(); for (String componentName : clientResources.getComponentNames()) { if (!SliderKeys.COMPONENT_AM.equals(componentName)) { clientComponentInstances.put(componentName, clientResources
/** * Validate the instance definition. * @param instanceDefinition instance definition */ @Override public void validateInstanceDefinition(AggregateConf instanceDefinition, SliderFileSystem fs) throws SliderException { super.validateInstanceDefinition(instanceDefinition, fs); ConfTreeOperations resources = instanceDefinition.getResourceOperations(); Set<String> unknownRoles = resources.getComponentNames(); unknownRoles.removeAll(knownRoleNames); if (!unknownRoles.isEmpty()) { throw new BadCommandArgumentsException("Unknown component: %s", unknownRoles.iterator().next()); } providerUtils.validateNodeCount(instanceDefinition, HBaseKeys.ROLE_WORKER, 0, -1); providerUtils.validateNodeCount(instanceDefinition, HBaseKeys.ROLE_MASTER, 0, -1); providerUtils.validateNodeCount(instanceDefinition, HBaseKeys.ROLE_REST_GATEWAY, 0, -1); providerUtils.validateNodeCount(instanceDefinition, HBaseKeys.ROLE_THRIFT_GATEWAY, 0, -1); providerUtils.validateNodeCount(instanceDefinition, HBaseKeys.ROLE_THRIFT2_GATEWAY, 0, -1); }
for (String roleGroup : ops.getComponentNames()) { if (roleGroup.equals(SliderKeys.COMPONENT_AM)) { continue;
private void mergeExternalComponent(ConfTreeOperations ops, ConfTreeOperations externalOps, String externalComponent, Integer priority) throws BadConfigException { for (String subComponent : externalOps.getComponentNames()) { if (COMPONENT_AM.equals(subComponent)) { continue;
private void mergeExternalComponent(ConfTreeOperations ops, ConfTreeOperations externalOps, String externalComponent, Integer priority) throws BadConfigException { for (String subComponent : externalOps.getComponentNames()) { if (COMPONENT_AM.equals(subComponent)) { continue;
.getComponentNames()) { if (COMPONENT_AM.equals(rcomp)) { continue; .getComponentNames()) { if (COMPONENT_AM.equals(rcomp)) { continue;
@Override public void validateInstanceDefinition(AggregateConf instanceDefinition, SliderFileSystem fs) throws SliderException { super.validateInstanceDefinition(instanceDefinition, fs); ConfTreeOperations resources = instanceDefinition.getResourceOperations(); Set<String> unknownRoles = resources.getComponentNames(); unknownRoles.removeAll(knownRoleNames); if (!unknownRoles.isEmpty()) { throw new BadCommandArgumentsException("There is unknown role: %s", unknownRoles.iterator().next()); } providerUtils.validateNodeCount(instanceDefinition, AccumuloKeys.ROLE_TABLET, 1, -1); providerUtils.validateNodeCount(instanceDefinition, AccumuloKeys.ROLE_MASTER, 1, -1); providerUtils.validateNodeCount(instanceDefinition, AccumuloKeys.ROLE_GARBAGE_COLLECTOR, 0, -1); providerUtils.validateNodeCount(instanceDefinition, AccumuloKeys.ROLE_MONITOR, 0, -1); providerUtils.validateNodeCount(instanceDefinition, AccumuloKeys.ROLE_TRACER , 0, -1); MapOperations globalAppConfOptions = instanceDefinition.getAppConfOperations().getGlobalOptions(); globalAppConfOptions.verifyOptionSet(AccumuloKeys.OPTION_ZK_HOME); globalAppConfOptions.verifyOptionSet(AccumuloKeys.OPTION_HADOOP_HOME); }
Set<String> roleNames = resources.getComponentNames(); for (String name : roleNames) { if (roles.containsKey(name)) {
Set<String> roleNames = resources.getComponentNames(); for (String name : roleNames) { if (roles.containsKey(name)) {
Set<String> roleNames = resources.getComponentNames(); for (String name : roleNames) { if (roles.containsKey(name)) {
Set<String> roleNames = resources.getComponentNames(); for (String name : roleNames) { if (roles.containsKey(name)) {
instanceDefinition.getResourceOperations(); Set<String> names = resources.getComponentNames(); names.remove(SliderKeys.COMPONENT_AM); for (String name : names) {
instanceDefinition.getResourceOperations(); Set<String> names = resources.getComponentNames(); names.remove(SliderKeys.COMPONENT_AM); for (String name : names) {
for (String component : instanceDefinition.getResourceOperations().getComponentNames()) { instanceDefinition.getAppConfOperations().getOrAddComponent(component);
for (String component : instanceDefinition.getResourceOperations().getComponentNames()) { instanceDefinition.getAppConfOperations().getOrAddComponent(component);