Tabnine Logo
org.apache.slider.common.tools
Code IndexAdd Tabnine to your IDE (free)

How to use org.apache.slider.common.tools

Best Java code snippets using org.apache.slider.common.tools (Showing top 20 results out of 315)

origin: org.apache.slider/slider-core

public int getAvailablePort() throws SliderException, IOException {
 if (remainingPortsToCheck != null) {
  return getAvailablePortViaPortArray();
 } else {
  return SliderUtils.getOpenPort();
 }
}
origin: org.apache.slider/slider-core

/**
 * probe to see if the RM scheduler is defined
 * @param conf config
 * @return true if the RM scheduler address is set to
 * something other than 0.0.0.0
 */
public static boolean isRmSchedulerAddressDefined(Configuration conf) {
 InetSocketAddress address = getRmSchedulerAddress(conf);
 return isAddressDefined(address);
}
origin: org.apache.slider/slider-core

public String buildClasspath() {
 return SliderUtils.join(pathElements,
   CLASS_PATH_SEPARATOR,
   false);
}
origin: org.apache.slider/slider-core

/**
 * Build the environment map from a role option map, finding all entries
 * beginning with "env.", adding them to a map of (prefix-removed)
 * env vars
 * @param roleOpts role options. This can be null, meaning the
 * role is undefined
 * @return a possibly empty map of environment variables.
 */
public static Map<String, String> buildEnvMap(Map<String, String> roleOpts) {
 return buildEnvMap(roleOpts, null);
}
origin: apache/incubator-slider

/**
 * Load a Hadoop configuration from a local file.
 * @param file file to load
 * @return a configuration which hasn't actually had the load triggered
 * yet.
 * @throws FileNotFoundException file is not there
 * @throws IOException any other IO problem
 */
public static Configuration loadConfFromFile(File file) throws
                            IOException {
 return loadConfFromFile(file, false);
}
origin: org.apache.slider/slider-core

/**
 * return true if the limit has been exceeded
 * @return true if a limit was set and the current time
 * exceeds it.
 */
public boolean getLimitExceeded() {
 return limit >= 0 && ((now() - start) > limit);
}
origin: org.apache.slider/slider-core

public static void validateOpenSSLEnv(Logger logger) throws
  IOException,
  SliderException {
 execCommand(OPENSSL, 0, 5000, logger, "OpenSSL", OPENSSL, "version");
}
origin: org.apache.slider/slider-core

/**
 * Set the time for an information (human, machine) timestamp pair of fields.
 * The human time is the time in millis converted via the {@link Date} class.
 * @param keyHumanTime name of human time key
 * @param keyMachineTime name of machine time
 * @param time timestamp
 */

public void setInfoTime(String keyHumanTime, String keyMachineTime, long time) {
 SliderUtils.setInfoTime(info, keyHumanTime, keyMachineTime, time);
}
origin: org.apache.slider/slider-core

/**
 * return the HDFS path where the application package has been uploaded
 * manually or by using slider client (install package command)
 * 
 * @param conf configuration
 * @return
 */
public static String getApplicationDefinitionPath(ConfTreeOperations conf)
  throws BadConfigException {
 return getApplicationDefinitionPath(conf, null);
}
origin: apache/incubator-slider

/**
 * Submit the AM tar.gz containing all dependencies and map it
 * @param providerResources provider map to build up
 * @param sliderFileSystem remote fs
 * @throws IOException, SliderException trouble copying to HDFS
 */
public static void putAmTarGzipAndUpdate(
  Map<String, LocalResource> providerResources,
  SliderFileSystem sliderFileSystem
) throws IOException, SliderException {
 sliderFileSystem.submitTarGzipAndUpdate(providerResources);
}
origin: apache/incubator-slider

 @Override
 public String toString() {
  return appReportToString(report, "\n");
 }
}
origin: apache/incubator-slider

/**
 * Merge any options
 * @param component dest values
 */
public void mergeInGlobal(Map<String, String> component) {
 SliderUtils.mergeMapsIgnoreDuplicateKeys(component, confTree.global);
}
origin: apache/incubator-slider

/**
 * Build the environment map from a role option map, finding all entries
 * beginning with "env.", adding them to a map of (prefix-removed)
 * env vars
 * @param roleOpts role options. This can be null, meaning the
 * role is undefined
 * @return a possibly empty map of environment variables.
 */
public static Map<String, String> buildEnvMap(Map<String, String> roleOpts) {
 return buildEnvMap(roleOpts, null);
}
origin: apache/incubator-slider

public int getAvailablePort() throws SliderException, IOException {
 if (remainingPortsToCheck != null) {
  return getAvailablePortViaPortArray();
 } else {
  return SliderUtils.getOpenPort();
 }
}
origin: org.apache.slider/slider-core

/**
 * Join an collection of objects with a separator that appears after every
 * instance in the list -including at the end
 * @param collection collection to call toString() on each element
 * @param separator separator string
 * @return the joined entries
 */
public static String join(Collection collection, String separator) {
 return join(collection, separator, true);
}
origin: org.apache.slider/slider-core

/**
 * Start
 * @return self
 */
public Duration start() {
 start = now();
 return this;
}
origin: apache/incubator-slider

public static void validateOpenSSLEnv(Logger logger) throws
  IOException,
  SliderException {
 execCommand(OPENSSL, 0, 5000, logger, "SSL", OPENSSL, "version");
}
origin: org.apache.slider/slider-core

/**
 * Join an array of strings with a separator that appears after every
 * instance in the list -including at the end
 * @param collection strings
 * @param separator separator string
 * @return the joined entries
 */
public static String join(String[] collection, String separator) {
 return join(collection, separator, true);
}
origin: apache/incubator-slider

/**
 * Start
 * @return self
 */
public Duration start() {
 start = now();
 return this;
}
origin: apache/incubator-slider

/**
 * Build the command line
 * @return the command line
 */
public String build() {
 return SliderUtils.join(argumentList, " ");
}
org.apache.slider.common.tools

Most used classes

  • SliderFileSystem
    Extends Core Filesystem with operations to manipulate ClusterDescription persistent state
  • SliderUtils
    These are slider-specific Util methods
  • ConfigHelper
    Methods to aid in config, both in the Configuration class and with other parts of setting up Slider-
  • PortScanner
    a scanner which can take an input string for a range or scan the lot.
  • Comparators$InvertedLongComparator
  • CoreFileSystem,
  • Duration,
  • SliderUtils$DelayedHalt,
  • SliderUtils$MostRecentAppFinishFirst,
  • SliderUtils$MostRecentlyStartedAppFirst,
  • SliderUtils$MostRecentlyStartedOrFinishedFirst,
  • SliderUtils$OnDemandReportStringifier,
  • SliderVersionInfo,
  • TestSliderUtils
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