Tabnine Logo
AggregateConf.getAppConfOperations
Code IndexAdd Tabnine to your IDE (free)

How to use
getAppConfOperations
method
in
org.apache.slider.core.conf.AggregateConf

Best Java code snippets using org.apache.slider.core.conf.AggregateConf.getAppConfOperations (Showing top 20 results out of 315)

origin: apache/incubator-slider

/**
 * Propagate any critical principals from the current site config down to the HBase one.
 */
public void propagatePrincipals() {
 String dfsPrincipal = conf.get(SliderXmlConfKeys.DFS_NAMENODE_KERBEROS_PRINCIPAL_KEY);
 if (dfsPrincipal != null) {
  String siteDfsPrincipal = OptionKeys.SITE_XML_PREFIX +
               SliderXmlConfKeys.DFS_NAMENODE_KERBEROS_PRINCIPAL_KEY;
  instanceDescription.getAppConfOperations().set(siteDfsPrincipal, dfsPrincipal);
 }
}
origin: org.apache.slider/slider-core

/**
 * Propagate any critical principals from the current site config down to the HBase one.
 */
public void propagatePrincipals() {
 String dfsPrincipal = conf.get(SliderXmlConfKeys.DFS_NAMENODE_KERBEROS_PRINCIPAL_KEY);
 if (dfsPrincipal != null) {
  String siteDfsPrincipal = OptionKeys.SITE_XML_PREFIX +
               SliderXmlConfKeys.DFS_NAMENODE_KERBEROS_PRINCIPAL_KEY;
  instanceDescription.getAppConfOperations().set(siteDfsPrincipal, dfsPrincipal);
 }
}
origin: org.apache.slider/slider-core

public void propagateFilename() {
 String fsDefaultName = conf.get(
  CommonConfigurationKeysPublic.FS_DEFAULT_NAME_KEY);
 instanceDescription.getAppConfOperations().set(OptionKeys.SITE_XML_PREFIX +
                     CommonConfigurationKeysPublic.FS_DEFAULT_NAME_KEY,
                     fsDefaultName
                     );
 instanceDescription.getAppConfOperations().set(OptionKeys.SITE_XML_PREFIX +
                     SliderXmlConfKeys.FS_DEFAULT_NAME_CLASSIC,
                     fsDefaultName
                     );
}
origin: apache/incubator-slider

public void propagateFilename() {
 String fsDefaultName = conf.get(
  CommonConfigurationKeysPublic.FS_DEFAULT_NAME_KEY);
 instanceDescription.getAppConfOperations().set(OptionKeys.SITE_XML_PREFIX +
                     CommonConfigurationKeysPublic.FS_DEFAULT_NAME_KEY,
                     fsDefaultName
                     );
 instanceDescription.getAppConfOperations().set(OptionKeys.SITE_XML_PREFIX +
                     SliderXmlConfKeys.FS_DEFAULT_NAME_CLASSIC,
                     fsDefaultName
                     );
}
origin: apache/incubator-slider

private void propagatePythonExecutable(Configuration config,
                    AggregateConf instanceDefinition) {
 String pythonExec = config.get(
   PYTHON_EXECUTABLE_PATH);
 if (pythonExec != null) {
  instanceDefinition.getAppConfOperations().getGlobalOptions().putIfUnset(
    PYTHON_EXECUTABLE_PATH,
    pythonExec);
 }
}
origin: apache/incubator-slider

/**
 * Is this app package versioned?
 * 
 * @return true if {@link SliderKeys#APP_VERSION} was set in the app config
 *         provided during creation of this app
 * @since 0.80.0-incubating
 */
public boolean isVersioned() {
 return StringUtils.isNotEmpty(getAppConfOperations().getGlobalOptions()
   .get(SliderKeys.APP_VERSION));
}
origin: org.apache.slider/slider-core

/**
 * Is this app package versioned?
 * 
 * @return true if {@link SliderKeys#APP_VERSION} was set in the app config
 *         provided during creation of this app
 * @since 0.80.0-incubating
 */
public boolean isVersioned() {
 return StringUtils.isNotEmpty(getAppConfOperations().getGlobalOptions()
   .get(SliderKeys.APP_VERSION));
}
origin: org.apache.slider/slider-core

private void propagatePythonExecutable(Configuration config,
                    AggregateConf instanceDefinition) {
 String pythonExec = config.get(
   PYTHON_EXECUTABLE_PATH);
 if (pythonExec != null) {
  instanceDefinition.getAppConfOperations().getGlobalOptions().putIfUnset(
    PYTHON_EXECUTABLE_PATH,
    pythonExec);
 }
}
origin: org.apache.slider/slider-core

public boolean isKeytabProvided() {
 String keytabLocalPath = instanceDefinition.getAppConfOperations()
   .getComponent(SliderKeys.COMPONENT_AM)
   .get(SliderXmlConfKeys.KEY_AM_KEYTAB_LOCAL_PATH);
 String keytabName = instanceDefinition.getAppConfOperations()
   .getComponent(SliderKeys.COMPONENT_AM)
   .get(SliderXmlConfKeys.KEY_AM_LOGIN_KEYTAB_NAME);
 return StringUtils.isNotBlank(keytabLocalPath)
   || StringUtils.isNotBlank(keytabName);
}
origin: apache/incubator-slider

public boolean isKeytabProvided() {
 String keytabLocalPath = instanceDefinition.getAppConfOperations()
   .getComponent(SliderKeys.COMPONENT_AM)
   .get(SliderXmlConfKeys.KEY_AM_KEYTAB_LOCAL_PATH);
 String keytabName = instanceDefinition.getAppConfOperations()
   .getComponent(SliderKeys.COMPONENT_AM)
   .get(SliderXmlConfKeys.KEY_AM_LOGIN_KEYTAB_NAME);
 return StringUtils.isNotBlank(keytabLocalPath)
   || StringUtils.isNotBlank(keytabName);
}
origin: apache/incubator-slider

public String getPrincipal () throws IOException {
 String principal = instanceDefinition.getAppConfOperations()
   .getComponent(SliderKeys.COMPONENT_AM).get(SliderXmlConfKeys.KEY_KEYTAB_PRINCIPAL);
 if (SliderUtils.isUnset(principal)) {
  principal = UserGroupInformation.getLoginUser().getShortUserName();
  log.info("No principal set in the slider configuration.  Will use AM login"
       + " identity {} to attempt keytab-based login", principal);
 }
 return principal;
}
origin: org.apache.slider/slider-core

public String getPrincipal () throws IOException {
 String principal = instanceDefinition.getAppConfOperations()
   .getComponent(SliderKeys.COMPONENT_AM).get(SliderXmlConfKeys.KEY_KEYTAB_PRINCIPAL);
 if (SliderUtils.isUnset(principal)) {
  principal = UserGroupInformation.getLoginUser().getShortUserName();
  log.info("No principal set in the slider configuration.  Will use AM login"
       + " identity {} to attempt keytab-based login", principal);
 }
 return principal;
}
origin: org.apache.slider/slider-core

private long getContainerReleaseTimeout() {
 // Get container release timeout in millis or 0 if the property is not set.
 // If non-zero then add the agent heartbeat delay time, since it can take up
 // to that much time for agents to receive the stop command.
 int timeout = getInstanceDefinition().getAppConfOperations()
   .getGlobalOptions()
   .getOptionInt(SliderKeys.APP_CONTAINER_RELEASE_TIMEOUT, 0);
 if (timeout > 0) {
  timeout += SliderKeys.APP_CONTAINER_HEARTBEAT_INTERVAL_SEC;
 }
 // convert to millis
 long timeoutInMillis = timeout * 1000l;
 log.info("Container release timeout in millis = {}", timeoutInMillis);
 return timeoutInMillis;
}
origin: org.apache.slider/slider-core

/**
 * Reads and sets the heartbeat monitoring interval. If bad value is provided then log it and set to default.
 *
 * @param instanceDefinition
 */
private void initializeAgentDebugCommands(AggregateConf instanceDefinition) {
 String launchParameterStr = instanceDefinition.getAppConfOperations().
   getGlobalOptions().getOption(AgentKeys.AGENT_INSTANCE_DEBUG_DATA, "");
 agentLaunchParameter = new AgentLaunchParameter(launchParameterStr);
}
origin: apache/incubator-slider

/**
 * Reads and sets the heartbeat monitoring interval. If bad value is provided then log it and set to default.
 *
 * @param instanceDefinition
 */
private void initializeAgentDebugCommands(AggregateConf instanceDefinition) {
 String launchParameterStr = instanceDefinition.getAppConfOperations().
   getGlobalOptions().getOption(AgentKeys.AGENT_INSTANCE_DEBUG_DATA, "");
 agentLaunchParameter = new AgentLaunchParameter(launchParameterStr);
}
origin: org.apache.slider/slider-accumulo-provider

@Override
public void prepareInstanceConfiguration(AggregateConf aggregateConf) throws
  SliderException,
                                   IOException {
 String resourceTemplate = INSTANCE_RESOURCE_BASE + "resources.json";
 String appConfTemplate = INSTANCE_RESOURCE_BASE + "appconf.json";
 mergeTemplates(aggregateConf, null, resourceTemplate, appConfTemplate);
 aggregateConf.getAppConfOperations().set(OPTION_ACCUMULO_PASSWORD,
                      createAccumuloPassword());
}
origin: org.apache.slider/slider-core

/**
 * Build up the port scanner. This may include setting a port range.
 */
private void buildPortScanner(AggregateConf instanceDefinition)
  throws BadConfigException {
 portScanner = new PortScanner();
 String portRange = instanceDefinition.
   getAppConfOperations().getGlobalOptions().
    getOption(SliderKeys.KEY_ALLOWED_PORT_RANGE, "0");
 if (!"0".equals(portRange)) {
   portScanner.setPortRange(portRange);
 }
}

origin: apache/incubator-slider

/**
 * Build up the port scanner. This may include setting a port range.
 */
private void buildPortScanner(AggregateConf instanceDefinition)
  throws BadConfigException {
 portScanner = new PortScanner();
 String portRange = instanceDefinition.
   getAppConfOperations().getGlobalOptions().
    getOption(SliderKeys.KEY_ALLOWED_PORT_RANGE, "0");
 if (!"0".equals(portRange)) {
   portScanner.setPortRange(portRange);
 }
}

origin: org.apache.slider/slider-core

@Test
public void testParameterParsing() throws IOException {
 AgentProviderService aps = createAgentProviderService(new Configuration());
 AggregateConf aggConf = new AggregateConf();
 ConfTreeOperations treeOps = aggConf.getAppConfOperations();
 treeOps.getGlobalOptions().put(AgentKeys.SYSTEM_CONFIGS, "core-site,yarn-site, core-site ");
 List<String> configs = aps.getSystemConfigurationsRequested(treeOps);
 Assert.assertEquals(2, configs.size());
 Assert.assertTrue(configs.contains("core-site"));
 Assert.assertFalse(configs.contains("bore-site"));
}
origin: apache/incubator-slider

@Test
public void testParameterParsing() throws IOException {
 AgentProviderService aps = createAgentProviderService(new Configuration());
 AggregateConf aggConf = new AggregateConf();
 ConfTreeOperations treeOps = aggConf.getAppConfOperations();
 treeOps.getGlobalOptions().put(AgentKeys.SYSTEM_CONFIGS, "core-site,yarn-site, core-site ");
 List<String> configs = aps.getSystemConfigurationsRequested(treeOps);
 Assert.assertEquals(2, configs.size());
 Assert.assertTrue(configs.contains("core-site"));
 Assert.assertFalse(configs.contains("bore-site"));
}
org.apache.slider.core.confAggregateConfgetAppConfOperations

Popular methods of AggregateConf

  • getResourceOperations
  • getInternalOperations
  • <init>
  • getAppConf
  • resolve
  • setAppConf
  • setInternal
  • setName
  • getInternal
  • getName
  • getPassphrase
  • getResources
  • getPassphrase,
  • getResources,
  • isComplete,
  • isVersioned,
  • setResources,
  • toString,
  • validate

Popular in Java

  • Updating database using SQL prepared statement
  • getExternalFilesDir (Context)
  • onRequestPermissionsResult (Fragment)
  • scheduleAtFixedRate (Timer)
  • Socket (java.net)
    Provides a client-side TCP socket.
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • ImageIO (javax.imageio)
  • BoxLayout (javax.swing)
  • JTextField (javax.swing)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now