Tabnine Logo
StringUtils.popFirstNonOption
Code IndexAdd Tabnine to your IDE (free)

How to use
popFirstNonOption
method
in
org.apache.hadoop.util.StringUtils

Best Java code snippets using org.apache.hadoop.util.StringUtils.popFirstNonOption (Showing top 20 results out of 315)

origin: org.apache.hadoop/hadoop-common

private int removeSpanReceiver(List<String> args) throws IOException {
 String indexStr = StringUtils.popFirstNonOption(args);
 long id = -1;
 try {
  id = Long.parseLong(indexStr);
 } catch (NumberFormatException e) {
  System.err.println("Failed to parse ID string " +
    indexStr + ": " + e.getMessage());
  return 1;
 }
 remote.removeSpanReceiver(id);
 System.err.println("Removed trace span receiver " + id);
 return 0;
}
origin: org.apache.hadoop/hadoop-hdfs

 @Override
 public int run(Configuration conf, List<String> args) throws IOException {
  String name = StringUtils.popFirstNonOption(args);
  if (name == null) {
   System.err.println("You must specify a name when deleting a " +
     "cache pool.");
   return 1;
  }
  if (!args.isEmpty()) {
   System.err.print("Can't understand arguments: " +
    Joiner.on(" ").join(args) + "\n");
   System.err.println("Usage is " + getShortUsage());
   return 1;
  }
  DistributedFileSystem dfs = AdminHelper.getDFS(conf);
  try {
   dfs.removeCachePool(name);
  } catch (IOException e) {
   System.err.println(AdminHelper.prettifyException(e));
   return 2;
  }
  System.out.println("Successfully removed cache pool " + name + ".");
  return 0;
 }
}
origin: org.apache.hadoop/hadoop-hdfs

@Override
public int run(Configuration conf, List<String> args) throws IOException {
 String idString= StringUtils.popFirstNonOption(args);
 if (idString == null) {
  System.err.println("You must specify a directive ID to remove.");
origin: org.apache.hadoop/hadoop-hdfs

String hostPort = StringUtils.popFirstNonOption(args);
if (hostPort == null) {
 System.err.println("You must specify a host:port pair.");
origin: org.apache.hadoop/hadoop-hdfs

 return 1;
String name = StringUtils.popFirstNonOption(args);
if (name == null) {
 System.err.println("You must specify a name when creating a " +
origin: org.apache.hadoop/hadoop-hdfs

@Override
public int run(Configuration conf, List<String> args) throws IOException {
 String name = StringUtils.popFirstNonOption(args);
 if (name == null) {
  System.err.println("You must specify a name when creating a " +
origin: org.apache.hadoop/hadoop-hdfs

@Override
public int run(Configuration conf, List<String> args) throws IOException {
 String name = StringUtils.popFirstNonOption(args);
 final boolean printStats = StringUtils.popOption("-stats", args);
 if (!args.isEmpty()) {
origin: com.github.jiayuhan-it/hadoop-common

private int removeSpanReceiver(List<String> args) throws IOException {
 String indexStr = StringUtils.popFirstNonOption(args);
 long id = -1;
 try {
  id = Long.parseLong(indexStr);
 } catch (NumberFormatException e) {
  System.err.println("Failed to parse ID string " +
    indexStr + ": " + e.getMessage());
  return 1;
 }
 remote.removeSpanReceiver(id);
 System.err.println("Removed trace span receiver " + id);
 return 0;
}
origin: ch.cern.hadoop/hadoop-common

private int removeSpanReceiver(List<String> args) throws IOException {
 String indexStr = StringUtils.popFirstNonOption(args);
 long id = -1;
 try {
  id = Long.parseLong(indexStr);
 } catch (NumberFormatException e) {
  System.err.println("Failed to parse ID string " +
    indexStr + ": " + e.getMessage());
  return 1;
 }
 remote.removeSpanReceiver(id);
 System.err.println("Removed trace span receiver " + id);
 return 0;
}
origin: io.prestosql.hadoop/hadoop-apache

private int removeSpanReceiver(List<String> args) throws IOException {
 String indexStr = StringUtils.popFirstNonOption(args);
 long id = -1;
 try {
  id = Long.parseLong(indexStr);
 } catch (NumberFormatException e) {
  System.err.println("Failed to parse ID string " +
    indexStr + ": " + e.getMessage());
  return 1;
 }
 remote.removeSpanReceiver(id);
 System.err.println("Removed trace span receiver " + id);
 return 0;
}
origin: io.hops/hadoop-common

private int removeSpanReceiver(List<String> args) throws IOException {
 String indexStr = StringUtils.popFirstNonOption(args);
 long id = -1;
 try {
  id = Long.parseLong(indexStr);
 } catch (NumberFormatException e) {
  System.err.println("Failed to parse ID string " +
    indexStr + ": " + e.getMessage());
  return 1;
 }
 remote.removeSpanReceiver(id);
 System.err.println("Removed trace span receiver " + id);
 return 0;
}
origin: ch.cern.hadoop/hadoop-hdfs

 @Override
 public int run(Configuration conf, List<String> args) throws IOException {
  String name = StringUtils.popFirstNonOption(args);
  if (name == null) {
   System.err.println("You must specify a name when deleting a " +
     "cache pool.");
   return 1;
  }
  if (!args.isEmpty()) {
   System.err.print("Can't understand arguments: " +
    Joiner.on(" ").join(args) + "\n");
   System.err.println("Usage is " + getShortUsage());
   return 1;
  }
  DistributedFileSystem dfs = AdminHelper.getDFS(conf);
  try {
   dfs.removeCachePool(name);
  } catch (IOException e) {
   System.err.println(AdminHelper.prettifyException(e));
   return 2;
  }
  System.out.println("Successfully removed cache pool " + name + ".");
  return 0;
 }
}
origin: io.prestosql.hadoop/hadoop-apache

@Override
public int run(Configuration conf, List<String> args) throws IOException {
 String idString= StringUtils.popFirstNonOption(args);
 if (idString == null) {
  System.err.println("You must specify a directive ID to remove.");
origin: ch.cern.hadoop/hadoop-hdfs

@Override
public int run(Configuration conf, List<String> args) throws IOException {
 String idString= StringUtils.popFirstNonOption(args);
 if (idString == null) {
  System.err.println("You must specify a directive ID to remove.");
origin: ch.cern.hadoop/hadoop-hdfs

String hostPort = StringUtils.popFirstNonOption(args);
if (hostPort == null) {
 System.err.println("You must specify a host:port pair.");
origin: io.prestosql.hadoop/hadoop-apache

 @Override
 public int run(Configuration conf, List<String> args) throws IOException {
  String name = StringUtils.popFirstNonOption(args);
  if (name == null) {
   System.err.println("You must specify a name when deleting a " +
     "cache pool.");
   return 1;
  }
  if (!args.isEmpty()) {
   System.err.print("Can't understand arguments: " +
    Joiner.on(" ").join(args) + "\n");
   System.err.println("Usage is " + getShortUsage());
   return 1;
  }
  DistributedFileSystem dfs = AdminHelper.getDFS(conf);
  try {
   dfs.removeCachePool(name);
  } catch (IOException e) {
   System.err.println(AdminHelper.prettifyException(e));
   return 2;
  }
  System.out.println("Successfully removed cache pool " + name + ".");
  return 0;
 }
}
origin: io.prestosql.hadoop/hadoop-apache

String hostPort = StringUtils.popFirstNonOption(args);
if (hostPort == null) {
 System.err.println("You must specify a host:port pair.");
origin: ch.cern.hadoop/hadoop-hdfs

@Override
public int run(Configuration conf, List<String> args) throws IOException {
 String name = StringUtils.popFirstNonOption(args);
 if (name == null) {
  System.err.println("You must specify a name when creating a " +
origin: ch.cern.hadoop/hadoop-hdfs

@Override
public int run(Configuration conf, List<String> args) throws IOException {
 String name = StringUtils.popFirstNonOption(args);
 final boolean printStats = StringUtils.popOption("-stats", args);
 if (!args.isEmpty()) {
origin: io.prestosql.hadoop/hadoop-apache

@Override
public int run(Configuration conf, List<String> args) throws IOException {
 String name = StringUtils.popFirstNonOption(args);
 if (name == null) {
  System.err.println("You must specify a name when creating a " +
org.apache.hadoop.utilStringUtilspopFirstNonOption

Javadoc

From a list of command-line arguments, return the first non-option argument. Non-option arguments are those which either come after a double dash (--) or do not start with a dash.

Popular methods of StringUtils

  • stringifyException
    Make a string representation of the exception.
  • join
    Concatenates strings, using a separator.
  • split
  • arrayToString
  • toLowerCase
    Converts all of the characters in this String to lower case with Locale.ENGLISH.
  • escapeString
  • startupShutdownMessage
    Print a log message for starting up and shutting down
  • getStrings
    Returns an arraylist of strings.
  • toUpperCase
    Converts all of the characters in this String to upper case with Locale.ENGLISH.
  • byteToHexString
    Given an array of bytes it will convert the bytes to a hex string representation of the bytes
  • formatTime
    Given the time in long milliseconds, returns a String in the format Xhrs, Ymins, Z sec.
  • unEscapeString
  • formatTime,
  • unEscapeString,
  • getStringCollection,
  • byteDesc,
  • formatPercent,
  • getTrimmedStrings,
  • equalsIgnoreCase,
  • format,
  • formatTimeDiff,
  • getTrimmedStringCollection

Popular in Java

  • Updating database using SQL prepared statement
  • onCreateOptionsMenu (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • compareTo (BigDecimal)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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