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

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

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

origin: apache/incubator-slider

public AggregateConf(ConfTree resources,
           ConfTree appConf,
           ConfTree internal) {
 setResources(resources);
 setAppConf(appConf);
 setInternal(internal);
}
origin: org.apache.slider/slider-core

public AggregateConf(ConfTree resources,
           ConfTree appConf,
           ConfTree internal) {
 setResources(resources);
 setAppConf(appConf);
 setInternal(internal);
}
origin: apache/incubator-slider

private void loadConf(AggregateConf conf) throws IOException {
 conf.setInternal(confTreeSerDeser.load(fileSystem, internal));
 conf.setResources(confTreeSerDeser.load(fileSystem, resources));
 conf.setAppConf(confTreeSerDeser.load(fileSystem, app_conf));
}
origin: org.apache.slider/slider-core

private void loadConf(AggregateConf conf) throws IOException {
 conf.setInternal(confTreeSerDeser.load(fileSystem, internal));
 conf.setResources(confTreeSerDeser.load(fileSystem, resources));
 conf.setAppConf(confTreeSerDeser.load(fileSystem, app_conf));
}
origin: org.apache.slider/slider-core

/**
 * Take a snapshot of the configuration
 * @param instanceDefinition source
 * @throws IOException marshalling/copying problems
 */
public AggregateConf(AggregateConf instanceDefinition) throws IOException {
 ConfTreeOperations resourcesSnapshot =
   ConfTreeOperations.fromInstance(instanceDefinition.getResources());
 ConfTreeOperations appConfSnapshot =
   ConfTreeOperations.fromInstance(instanceDefinition.getAppConf());
 ConfTreeOperations internalsSnapshot =
   ConfTreeOperations.fromInstance(instanceDefinition.getInternal());
 //build a new aggregate from the snapshots
 setResources(resourcesSnapshot.confTree);
 setAppConf(appConfSnapshot.confTree);
 setInternal(internalsSnapshot.confTree);
}

origin: apache/incubator-slider

/**
 * Take a snapshot of the configuration
 * @param instanceDefinition source
 * @throws IOException marshalling/copying problems
 */
public AggregateConf(AggregateConf instanceDefinition) throws IOException {
 ConfTreeOperations resourcesSnapshot =
   ConfTreeOperations.fromInstance(instanceDefinition.getResources());
 ConfTreeOperations appConfSnapshot =
   ConfTreeOperations.fromInstance(instanceDefinition.getAppConf());
 ConfTreeOperations internalsSnapshot =
   ConfTreeOperations.fromInstance(instanceDefinition.getInternal());
 //build a new aggregate from the snapshots
 setResources(resourcesSnapshot.confTree);
 setAppConf(appConfSnapshot.confTree);
 setInternal(internalsSnapshot.confTree);
}

origin: org.apache.slider/slider-core

@Test
public void testPrepareAMAndConfigForLaunch() throws Exception {
 AgentClientProvider provider = new AgentClientProvider(null);
 SliderFileSystem sfs = PowerMock.createMock(SliderFileSystem.class);
 FileSystem fs = PowerMock.createMock(FileSystem.class);
 Configuration serviceConf = PowerMock.createMock(Configuration.class);
 PowerMock.mockStatic(ProviderUtils.class);
 expect(sfs.getFileSystem()).andReturn(fs);
 expect(fs.mkdirs(anyObject(Path.class))).andReturn(true);
 expect(ProviderUtils.addAgentTar(
   anyObject(), anyObject(String.class), anyObject(SliderFileSystem.class), anyObject(Path.class))).
   andReturn(true);
 AggregateConf instanceDefinition = new AggregateConf();
 ConfTree tree = new ConfTree();
 tree.global.put(InternalKeys.INTERNAL_APPLICATION_IMAGE_PATH, ".");
 instanceDefinition.setInternal(tree);
 PowerMock.replay(sfs, fs, serviceConf, ProviderUtils.class);
 provider.prepareAMAndConfigForLaunch(
   sfs, serviceConf, null, instanceDefinition, null,
   null, null, null, null, false);
 Assert.assertTrue(tree.global.containsKey(InternalKeys.INTERNAL_APPLICATION_IMAGE_PATH));
 tree.global.remove(InternalKeys.INTERNAL_APPLICATION_IMAGE_PATH);
 // Verify that slider-agent.tar.gz got added
 Path tempPath = new Path(".", "temp");
 provider.prepareAMAndConfigForLaunch(
   sfs, serviceConf, null, instanceDefinition, null,
   null, null, null, tempPath, false);
 PowerMock.verify(sfs, fs, ProviderUtils.class);
 Assert.assertTrue(tree.global.containsKey(InternalKeys.INTERNAL_APPLICATION_IMAGE_PATH));
}
origin: apache/incubator-slider

@Test
public void testPrepareAMAndConfigForLaunch() throws Exception {
 AgentClientProvider provider = new AgentClientProvider(null);
 SliderFileSystem sfs = PowerMock.createMock(SliderFileSystem.class);
 FileSystem fs = PowerMock.createMock(FileSystem.class);
 Configuration serviceConf = PowerMock.createMock(Configuration.class);
 PowerMock.mockStatic(ProviderUtils.class);
 expect(sfs.getFileSystem()).andReturn(fs);
 expect(fs.mkdirs(anyObject(Path.class))).andReturn(true);
 expect(ProviderUtils.addAgentTar(
   anyObject(), anyObject(String.class), anyObject(SliderFileSystem.class), anyObject(Path.class))).
   andReturn(true);
 AggregateConf instanceDefinition = new AggregateConf();
 ConfTree tree = new ConfTree();
 tree.global.put(InternalKeys.INTERNAL_APPLICATION_IMAGE_PATH, ".");
 instanceDefinition.setInternal(tree);
 PowerMock.replay(sfs, fs, serviceConf, ProviderUtils.class);
 provider.prepareAMAndConfigForLaunch(
   sfs, serviceConf, null, instanceDefinition, null,
   null, null, null, null, false);
 Assert.assertTrue(tree.global.containsKey(InternalKeys.INTERNAL_APPLICATION_IMAGE_PATH));
 tree.global.remove(InternalKeys.INTERNAL_APPLICATION_IMAGE_PATH);
 // Verify that slider-agent.tar.gz got added
 Path tempPath = new Path(".", "temp");
 provider.prepareAMAndConfigForLaunch(
   sfs, serviceConf, null, instanceDefinition, null,
   null, null, null, tempPath, false);
 PowerMock.verify(sfs, fs, ProviderUtils.class);
 Assert.assertTrue(tree.global.containsKey(InternalKeys.INTERNAL_APPLICATION_IMAGE_PATH));
}
origin: org.apache.slider/slider-core

AggregateConf instanceDefinition = new AggregateConf();
instanceDefinition.setInternal(tree);
instanceDefinition.setAppConf(tree);
instanceDefinition.getAppConfOperations().getGlobalOptions().put(AgentKeys.APP_DEF, ".");
origin: apache/incubator-slider

AggregateConf instanceDefinition = new AggregateConf();
instanceDefinition.setInternal(tree);
instanceDefinition.setAppConf(tree);
instanceDefinition.getAppConfOperations().getGlobalOptions().put(AgentKeys.APP_DEF, ".");
origin: org.apache.slider/slider-core

private AggregateConf prepareConfForAgentStateTests() {
 ConfTree tree = new ConfTree();
 tree.global.put(InternalKeys.INTERNAL_APPLICATION_IMAGE_PATH, ".");
 AggregateConf instanceDefinition = new AggregateConf();
 instanceDefinition.setInternal(tree);
 instanceDefinition.setAppConf(tree);
 instanceDefinition.getAppConfOperations().getGlobalOptions()
   .put(AgentKeys.APP_DEF, ".");
 instanceDefinition.getAppConfOperations().getGlobalOptions()
   .put(AgentKeys.AGENT_CONF, ".");
 instanceDefinition.getAppConfOperations().getGlobalOptions()
   .put(AgentKeys.AGENT_VERSION, ".");
 instanceDefinition.getResourceOperations().getOrAddComponent(
   "HBASE_MASTER");
 instanceDefinition.getResourceOperations().getOrAddComponent(
   "HBASE_REGIONSERVER");
 return instanceDefinition;
}
origin: apache/incubator-slider

private AggregateConf prepareConfForAgentStateTests() {
 ConfTree tree = new ConfTree();
 tree.global.put(InternalKeys.INTERNAL_APPLICATION_IMAGE_PATH, ".");
 AggregateConf instanceDefinition = new AggregateConf();
 instanceDefinition.setInternal(tree);
 instanceDefinition.setAppConf(tree);
 instanceDefinition.getAppConfOperations().getGlobalOptions()
   .put(AgentKeys.APP_DEF, ".");
 instanceDefinition.getAppConfOperations().getGlobalOptions()
   .put(AgentKeys.AGENT_CONF, ".");
 instanceDefinition.getAppConfOperations().getGlobalOptions()
   .put(AgentKeys.AGENT_VERSION, ".");
 instanceDefinition.getResourceOperations().getOrAddComponent(
   "HBASE_MASTER");
 instanceDefinition.getResourceOperations().getOrAddComponent(
   "HBASE_REGIONSERVER");
 return instanceDefinition;
}
org.apache.slider.core.confAggregateConfsetInternal

Popular methods of AggregateConf

  • getAppConfOperations
  • getResourceOperations
  • getInternalOperations
  • <init>
  • getAppConf
  • resolve
  • setAppConf
  • 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 plugins for Eclipse
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