congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
StringUtils.toUpperCase
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.apache.hadoop/hadoop-common

public static AuthenticationMethod getAuthenticationMethod(Configuration conf) {
 String value = conf.get(HADOOP_SECURITY_AUTHENTICATION, "simple");
 try {
  return Enum.valueOf(AuthenticationMethod.class,
    StringUtils.toUpperCase(value));
 } catch (IllegalArgumentException iae) {
  throw new IllegalArgumentException("Invalid attribute value for " +
    HADOOP_SECURITY_AUTHENTICATION + " of " + value);
 }
}
origin: org.apache.hadoop/hadoop-common

private HostnameVerifier getHostnameVerifier(Configuration conf)
  throws GeneralSecurityException, IOException {
 return getHostnameVerifier(StringUtils.toUpperCase(
   conf.get(SSL_HOSTNAME_VERIFIER_KEY, "DEFAULT").trim()));
}
origin: org.apache.hadoop/hadoop-common

public static StorageType parseStorageType(String s) {
 return StorageType.valueOf(StringUtils.toUpperCase(s));
}
origin: org.apache.hadoop/hadoop-common

 private InitMode initMode() {
  LOG.debug("from system property: "+ System.getProperty(MS_INIT_MODE_KEY));
  LOG.debug("from environment variable: "+ System.getenv(MS_INIT_MODE_KEY));
  String m = System.getProperty(MS_INIT_MODE_KEY);
  String m2 = m == null ? System.getenv(MS_INIT_MODE_KEY) : m;
  return InitMode.valueOf(
    StringUtils.toUpperCase((m2 == null ? InitMode.NORMAL.name() : m2)));
 }
}
origin: org.apache.hadoop/hadoop-common

/**
 * This method checks if the given HTTP request corresponds to a management
 * operation.
 *
 * @param request The HTTP request
 * @return true if the given HTTP request corresponds to a management
 *         operation false otherwise
 * @throws IOException In case of I/O error.
 */
protected final boolean isManagementOperation(HttpServletRequest request)
  throws IOException {
 String op = ServletUtils.getParameter(request,
   KerberosDelegationTokenAuthenticator.OP_PARAM);
 op = (op != null) ? StringUtils.toUpperCase(op) : null;
 return DELEGATION_TOKEN_OPS.contains(op) &&
   !request.getMethod().equals("OPTIONS");
}
origin: org.apache.hadoop/hadoop-common

 /**
  * A util function to retrieve specific additional sasl property from config.
  * Used by subclasses to read sasl properties used by themselves.
  * @param conf the configuration
  * @param configKey the config key to look for
  * @param defaultQOP the default QOP if the key is missing
  * @return sasl property associated with the given key
  */
 static Map<String, String> getSaslProperties(Configuration conf,
   String configKey, QualityOfProtection defaultQOP) {
  Map<String, String> saslProps = new TreeMap<>();
  String[] qop = conf.getStrings(configKey, defaultQOP.toString());

  for (int i=0; i < qop.length; i++) {
   qop[i] = QualityOfProtection.valueOf(
     StringUtils.toUpperCase(qop[i])).getSaslQop();
  }

  saslProps.put(Sasl.QOP, StringUtils.join(",", qop));
  saslProps.put(Sasl.SERVER_AUTH, "true");

  return saslProps;
 }
}
origin: org.apache.hadoop/hadoop-common

@Override
public void setConf(Configuration conf) {
 this.conf = conf;
 properties = new TreeMap<String,String>();
 String[] qop = conf.getTrimmedStrings(
   CommonConfigurationKeysPublic.HADOOP_RPC_PROTECTION,
   QualityOfProtection.AUTHENTICATION.toString());
 for (int i=0; i < qop.length; i++) {
  qop[i] = QualityOfProtection.valueOf(
    StringUtils.toUpperCase(qop[i])).getSaslQop();
 }
 properties.put(Sasl.QOP, StringUtils.join(",", qop));
 properties.put(Sasl.SERVER_AUTH, "true");
}
origin: org.apache.hadoop/hadoop-common

@Override
protected void processOptions(LinkedList<String> args) throws IOException {
 name = StringUtils.popOptionWithArgument("-n", args);
 String en = StringUtils.popOptionWithArgument("-e", args);
 if (en != null) {
  try {
   encoding = XAttrCodec.valueOf(StringUtils.toUpperCase(en));
  } catch (IllegalArgumentException e) {
   throw new IllegalArgumentException(
     "Invalid/unsupported encoding option specified: " + en);
  }
  Preconditions.checkArgument(encoding != null,
    "Invalid/unsupported encoding option specified: " + en);
 }
 boolean r = StringUtils.popOption("-R", args);
 setRecursive(r);
 dump = StringUtils.popOption("-d", args);
 if (!dump && name == null) {
  throw new HadoopIllegalArgumentException(
    "Must specify '-n name' or '-d' option.");
 }
 if (args.isEmpty()) {
  throw new HadoopIllegalArgumentException("<path> is missing.");
 }
 if (args.size() > 1) {
  throw new HadoopIllegalArgumentException("Too many arguments.");
 }
}
origin: org.apache.hadoop/hadoop-common

String op = ServletUtils.getParameter(request,
  KerberosDelegationTokenAuthenticator.OP_PARAM);
op = (op != null) ? StringUtils.toUpperCase(op) : null;
if (isManagementOperation(request)) {
 KerberosDelegationTokenAuthenticator.DelegationTokenOperation dtOp =
origin: org.apache.hadoop/hadoop-common

try {
 aclType = Enum.valueOf(
   AclEntryType.class, StringUtils.toUpperCase(split[index]));
 builder.setType(aclType);
 index++;
origin: org.apache.hadoop/hadoop-hdfs

public RollingUpgradeOp(FSEditLogOpCodes code, String name) {
 super(code);
 this.name = StringUtils.toUpperCase(name);
}
origin: org.apache.hadoop/hadoop-hdfs

private static String getOp(QueryStringDecoder decoder) {
 Map<String, List<String>> parameters = decoder.parameters();
 return parameters.containsKey("op")
   ? StringUtils.toUpperCase(parameters.get("op").get(0)) : null;
}
origin: org.apache.hadoop/hadoop-hdfs

/**
 * Attempt to parse a storage uri with storage class and URI. The storage
 * class component of the uri is case-insensitive.
 *
 * @param rawLocation Location string of the format [type]uri, where [type] is
 *                    optional.
 * @return A StorageLocation object if successfully parsed, null otherwise.
 *         Does not throw any exceptions.
 */
public static StorageLocation parse(String rawLocation)
  throws IOException, SecurityException {
 Matcher matcher = regex.matcher(rawLocation);
 StorageType storageType = StorageType.DEFAULT;
 String location = rawLocation;
 if (matcher.matches()) {
  String classString = matcher.group(1);
  location = matcher.group(2).trim();
  if (!classString.isEmpty()) {
   storageType =
     StorageType.valueOf(StringUtils.toUpperCase(classString));
  }
 }
 //do Path.toURI instead of new URI(location) as this ensures that
 //"/a/b" and "/a/b/" are represented in a consistent manner
 return new StorageLocation(storageType, new Path(location).toUri());
}
origin: org.apache.hadoop/hadoop-hdfs

try (PrintStream out = outputFile.equals("-") ?
  System.out : new PrintStream(outputFile, "UTF-8")) {
 switch (StringUtils.toUpperCase(processor)) {
 case "FILEDISTRIBUTION":
  long maxSize = Long.parseLong(cmd.getOptionValue("maxSize", "0"));
origin: io.hops/hadoop-mapreduce-client-core

/**
 * Counters to measure the usage of the different file systems.
 * Always return the String array with two elements. First one is the name of  
 * BYTES_READ counter and second one is of the BYTES_WRITTEN counter.
 */
protected static String[] getFileSystemCounterNames(String uriScheme) {
 String scheme = StringUtils.toUpperCase(uriScheme);
 return new String[]{scheme+"_BYTES_READ", scheme+"_BYTES_WRITTEN"};
}

origin: org.apache.hadoop/hadoop-hdfs-client

 @Override
 final E parse(final String str) {
  return Enum.valueOf(enumClass, StringUtils.toUpperCase(str));
 }
}
origin: io.prestosql.hadoop/hadoop-apache

 @Override
 final E parse(final String str) {
  return Enum.valueOf(enumClass, StringUtils.toUpperCase(str));
 }
}
origin: org.apache.hadoop/hadoop-hdfs-client

 /** Convert the given String to a StoragePolicySatisfierMode. */
 public static StoragePolicySatisfierMode fromString(String s) {
  return MAP.get(StringUtils.toUpperCase(s));
 }
}
origin: io.hops/hadoop-common

 private InitMode initMode() {
  LOG.debug("from system property: "+ System.getProperty(MS_INIT_MODE_KEY));
  LOG.debug("from environment variable: "+ System.getenv(MS_INIT_MODE_KEY));
  String m = System.getProperty(MS_INIT_MODE_KEY);
  String m2 = m == null ? System.getenv(MS_INIT_MODE_KEY) : m;
  return InitMode.valueOf(
    StringUtils.toUpperCase((m2 == null ? InitMode.NORMAL.name() : m2)));
 }
}
origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager

public QueueState getState(String queue) {
 String state = get(getQueuePrefix(queue) + STATE);
 return (state != null) ? 
   QueueState.valueOf(StringUtils.toUpperCase(state)) : QueueState.RUNNING;
}

org.apache.hadoop.utilStringUtilstoUpperCase

Javadoc

Converts all of the characters in this String to upper case with Locale.ENGLISH.

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.
  • 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
  • getStringCollection
    Returns a collection of strings.
  • unEscapeString,
  • getStringCollection,
  • byteDesc,
  • formatPercent,
  • getTrimmedStrings,
  • equalsIgnoreCase,
  • format,
  • formatTimeDiff,
  • getTrimmedStringCollection

Popular in Java

  • Updating database using SQL prepared statement
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setRequestProperty (URLConnection)
  • compareTo (BigDecimal)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • JFileChooser (javax.swing)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top 17 PhpStorm Plugins
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