Codota Logo
SliderUtils.isSet
Code IndexAdd Codota to your IDE (free)

How to use
isSet
method
in
org.apache.slider.common.tools.SliderUtils

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: apache/incubator-slider

/**
 * Release a tag associated with a container
 *
 * @param component
 * @param containerId
 */
public void releaseTag(String component, String containerId) {
 if (SliderUtils.isSet(component) && SliderUtils.isSet(containerId)) {
  ConcurrentHashMap<String, String> compTags = allTags.get(component);
  if (compTags != null) {
   synchronized (compTags) {
    for (String key : compTags.keySet()) {
     if (compTags.get(key).equals(containerId)) {
      compTags.put(key, FREE);
     }
    }
   }
  }
 }
}
origin: apache/incubator-slider

public YarnRegistryViewForProviders(RegistryOperations registryOperations,
  String user,
  String sliderServiceClass,
  String instanceName,
  ApplicationAttemptId applicationAttemptId) {
 Preconditions.checkArgument(registryOperations != null,
   "null registry operations");
 Preconditions.checkArgument(user != null, "null user");
 Preconditions.checkArgument(SliderUtils.isSet(sliderServiceClass),
   "unset service class");
 Preconditions.checkArgument(SliderUtils.isSet(instanceName),
   "instanceName");
 Preconditions.checkArgument(applicationAttemptId != null,
   "null applicationAttemptId");
 this.registryOperations = registryOperations;
 this.user = user;
 this.sliderServiceClass = sliderServiceClass;
 this.instanceName = instanceName;
 this.applicationAttemptId = applicationAttemptId;
}
origin: org.apache.slider/slider-core

/**
 * Release a tag associated with a container
 *
 * @param component
 * @param containerId
 */
public void releaseTag(String component, String containerId) {
 if (SliderUtils.isSet(component) && SliderUtils.isSet(containerId)) {
  ConcurrentHashMap<String, String> compTags = allTags.get(component);
  if (compTags != null) {
   synchronized (compTags) {
    for (String key : compTags.keySet()) {
     if (compTags.get(key).equals(containerId)) {
      compTags.put(key, FREE);
     }
    }
   }
  }
 }
}
origin: apache/incubator-slider

/**
 * Set the size of the heap if a non-empty heap is passed in. 
 * @param heap empty string or something like "128M" ,"1G" etc. The value is
 * trimmed.
 */
public void setJVMHeap(String heap) {
 if (SliderUtils.isSet(heap)) {
  add("-Xmx" + heap.trim());
 }
}
origin: org.apache.slider/slider-core

/**
 * Set the size of the heap if a non-empty heap is passed in. 
 * @param heap empty string or something like "128M" ,"1G" etc. The value is
 * trimmed.
 */
public void setJVMHeap(String heap) {
 if (SliderUtils.isSet(heap)) {
  add("-Xmx" + heap.trim());
 }
}
origin: org.apache.slider/slider-core

public boolean isSet(String key) {
 return SliderUtils.isSet(get(key));
}
origin: apache/incubator-slider

public boolean isSet(String key) {
 return SliderUtils.isSet(get(key));
}
origin: org.apache.slider/slider-core

/**
 * Build up the path string for package install location -no attempt to
 * create the directory is made
 *
 * @return the path for persistent app package
 */
public Path buildPackageDirPath(String packageName, String packageVersion) {
 Preconditions.checkNotNull(packageName);
 Path path = getBaseApplicationPath();
 path = new Path(path, SliderKeys.PACKAGE_DIRECTORY + "/" + packageName);
 if (SliderUtils.isSet(packageVersion)) {
  path = new Path(path, packageVersion);
 }
 return path;
}
origin: apache/incubator-slider

/**
 * Build up the path string for package install location -no attempt to
 * create the directory is made
 *
 * @return the path for persistent app package
 */
public Path buildPackageDirPath(String packageName, String packageVersion) {
 Preconditions.checkNotNull(packageName);
 Path path = getBaseApplicationPath();
 path = new Path(path, SliderKeys.PACKAGE_DIRECTORY + "/" + packageName);
 if (SliderUtils.isSet(packageVersion)) {
  path = new Path(path, packageVersion);
 }
 return path;
}
origin: org.apache.slider/slider-core

private boolean isDockerContainer(String roleGroup) {
 String type = getApplicationComponent(roleGroup).getType();
 if (SliderUtils.isSet(type)) {
  return type.toLowerCase().equals(SliderUtils.DOCKER) || type.toLowerCase().equals(SliderUtils.DOCKER_YARN);
 }
 return false;
}
origin: apache/incubator-slider

private boolean isDockerContainer(String roleGroup) {
 String type = getApplicationComponent(roleGroup).getType();
 if (SliderUtils.isSet(type)) {
  return type.toLowerCase().equals(SliderUtils.DOCKER) || type.toLowerCase().equals(SliderUtils.DOCKER_YARN);
 }
 return false;
}
origin: org.apache.slider/slider-core

private boolean isYarnDockerContainer(String roleGroup) {
 String type = getApplicationComponent(roleGroup).getType();
 if (SliderUtils.isSet(type)) {
  return type.toLowerCase().equals(SliderUtils.DOCKER_YARN);
 }
 return false;
}
origin: apache/incubator-slider

private boolean isYarnDockerContainer(String roleGroup) {
 String type = getApplicationComponent(roleGroup).getType();
 if (SliderUtils.isSet(type)) {
  return type.toLowerCase().equals(SliderUtils.DOCKER_YARN);
 }
 return false;
}
origin: org.apache.slider/slider-core

 /**
  * Query for the image path being set (non null/non empty)
  * @return true if there is a path in the image path option
  */
 @JsonIgnore
 public boolean isImagePathSet() {
  return SliderUtils.isSet(getImagePath());
 }
}
origin: apache/incubator-slider

 /**
  * Query for the image path being set (non null/non empty)
  * @return true if there is a path in the image path option
  */
 @JsonIgnore
 public boolean isImagePathSet() {
  return SliderUtils.isSet(getImagePath());
 }
}
origin: apache/incubator-slider

/**
 * Inner Validation logic for container request
 * @param containerRequest request
 * @param priority raw priority of role
 * @param requestDetails details for error messages
 */
@VisibleForTesting
public static void validateContainerRequest(AMRMClient.ContainerRequest containerRequest,
 int priority, String requestDetails) {
 String exp = containerRequest.getNodeLabelExpression();
 boolean hasRacks = containerRequest.getRacks() != null &&
  (!containerRequest.getRacks().isEmpty());
 boolean hasNodes = containerRequest.getNodes() != null &&
  (!containerRequest.getNodes().isEmpty());
 boolean hasLabel = SliderUtils.isSet(exp);
 // Don't support specifying >= 2 node labels in a node label expression now
 if (hasLabel && (exp.contains("&&") || exp.contains("||"))) {
  throw new InvalidContainerRequestException(
    "Cannot specify more than two node labels"
      + " in a single node label expression: " + requestDetails);
 }
 // Don't allow specify node label against ANY request listing hosts or racks
 if (hasLabel && ( hasRacks || hasNodes)) {
  throw new InvalidContainerRequestException(
    "Cannot specify node label with rack or node: " + requestDetails);
 }
}
origin: org.apache.slider/slider-core

 @Override
 public void validate() throws BadCommandArgumentsException, UsageException {
  super.validate();
  if (keytab != null && SliderUtils.isUnset(principal)) {
   throw new UsageException("Missing argument " + ARG_PRINCIPAL);
  }
  if (keytab == null && SliderUtils.isSet(principal)) {
   throw new UsageException("Missing argument " + ARG_KEYTAB);
  }
 }
}
origin: apache/incubator-slider

 @Override
 public void validate() throws BadCommandArgumentsException, UsageException {
  super.validate();
  if (keytab != null && SliderUtils.isUnset(principal)) {
   throw new UsageException("Missing argument " + ARG_PRINCIPAL);
  }
  if (keytab == null && SliderUtils.isSet(principal)) {
   throw new UsageException("Missing argument " + ARG_KEYTAB);
  }
 }
}
origin: org.apache.slider/slider-core

/**
 * Add the ZK paths to the application options. 
 * 
 * @param zkBinding ZK binding
 */
public void addZKBinding(ZKPathBuilder zkBinding) throws BadConfigException {
 String quorum = zkBinding.getAppQuorum();
 if (SliderUtils.isSet(quorum)) {
  MapOperations globalAppOptions =
    instanceDescription.getAppConfOperations().getGlobalOptions();
  globalAppOptions.put(ZOOKEEPER_PATH, zkBinding.getAppPath());
  globalAppOptions.put(ZOOKEEPER_QUORUM, quorum);
  globalAppOptions.put(ZOOKEEPER_HOSTS,
    ZookeeperUtils.convertToHostsOnlyList(quorum));
 }
}
origin: apache/incubator-slider

/**
 * Add the ZK paths to the application options. 
 * 
 * @param zkBinding ZK binding
 */
public void addZKBinding(ZKPathBuilder zkBinding) throws BadConfigException {
 String quorum = zkBinding.getAppQuorum();
 if (SliderUtils.isSet(quorum)) {
  MapOperations globalAppOptions =
    instanceDescription.getAppConfOperations().getGlobalOptions();
  globalAppOptions.put(ZOOKEEPER_PATH, zkBinding.getAppPath());
  globalAppOptions.put(ZOOKEEPER_QUORUM, quorum);
  globalAppOptions.put(ZOOKEEPER_HOSTS,
    ZookeeperUtils.convertToHostsOnlyList(quorum));
 }
}
org.apache.slider.common.toolsSliderUtilsisSet

Popular methods of SliderUtils

  • buildEnvMap
  • extractDomainNameFromFQDN
  • extractFirstLine
    Extract the first line of a multi-line string. This is typically used to prune the stack trace appen
  • getApplicationResourceInputStream
  • getHdpVersion
    Retrieve the HDP version if it is an HDP cluster, or null otherwise. It first checks if system prope
  • isHdp
    Query to find if it is an HDP cluster
  • listDir
    List a directory in the local filesystem
  • sortApplicationsByMostRecent
    Sorts the given list of application reports, most recently started or finished instance first.
  • truncate
    Truncate the given string to a maximum length provided with a pad (...) added to the end if expected
  • write
    Write bytes to a file
  • addBuildInfo
    Add the cluster build information; this will include Hadoop details too
  • appReportToString
  • addBuildInfo,
  • appReportToString,
  • appendToURL,
  • buildApplicationReportMap,
  • buildClasspath,
  • checkCredentialCacheFile,
  • checkForRequiredNativeLibraries,
  • checkPort,
  • collectionToStringList

Popular in Java

  • Finding current android device location
  • compareTo (BigDecimal)
  • putExtra (Intent)
  • getExternalFilesDir (Context)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Kernel (java.awt.image)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • SortedSet (java.util)
    A Set that further provides a total ordering on its elements. The elements are ordered using their C
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now