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

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

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

origin: apache/flink

/**
 * Set the array of string values for the <code>name</code> property as
 * as comma delimited values.
 *
 * @param name property name.
 * @param values The values
 */
public void setStrings(String name, String... values) {
 set(name, StringUtils.arrayToString(values));
}
origin: apache/flink

/**
 * Set the array of string values for the <code>name</code> property as
 * as comma delimited values.
 *
 * @param name property name.
 * @param values The values
 */
public void setStrings(String name, String... values) {
  set(name, StringUtils.arrayToString(values));
}
origin: org.apache.hadoop/hadoop-common

/** 
 * Set the array of string values for the <code>name</code> property as 
 * as comma delimited values.  
 * 
 * @param name property name.
 * @param values The values
 */
public void setStrings(String name, String... values) {
 set(name, StringUtils.arrayToString(values));
}
origin: apache/hive

public static String hadoopFsListAsString(String files, Configuration conf,
           String user)
 throws URISyntaxException, FileNotFoundException, IOException,
 InterruptedException {
 if (files == null || conf == null) {
  return null;
 }
 return StringUtils.arrayToString(hadoopFsListAsArray(files, conf, user));
}
origin: apache/hive

/**
 * Take an array of strings and encode it into one string.
 */
public static String encodeArray(String[] plain) {
 if (plain == null)
  return null;
 String[] escaped = new String[plain.length];
 for (int i = 0; i < plain.length; ++i) {
  if (plain[i] == null) {
   plain[i] = "";
  }
  escaped[i] = StringUtils.escapeString(plain[i]);
 }
 return StringUtils.arrayToString(escaped);
}
origin: apache/hive

@SuppressWarnings("SameParameterValue") static void addDependencyJars(Configuration conf, Class<?>... classes)
  throws IOException {
 FileSystem localFs = FileSystem.getLocal(conf);
 Set<String> jars = new HashSet<>(conf.getStringCollection("tmpjars"));
 for (Class<?> clazz : classes) {
  if (clazz == null) {
   continue;
  }
  final String path = Utilities.jarFinderGetJar(clazz);
  if (path == null) {
   throw new RuntimeException("Could not find jar for class " + clazz + " in order to ship it to the cluster.");
  }
  if (!localFs.exists(new Path(path))) {
   throw new RuntimeException("Could not validate jar file " + path + " for class " + clazz);
  }
  jars.add(path);
 }
 if (jars.isEmpty()) {
  return;
 }
 //noinspection ToArrayCallWithZeroLengthArrayArgument
 conf.set("tmpjars", StringUtils.arrayToString(jars.toArray(new String[jars.size()])));
}
origin: apache/hive

@SuppressWarnings("SameParameterValue") static void copyDependencyJars(Configuration conf, Class<?>... classes)
  throws IOException {
 Set<String> jars = new HashSet<>();
 FileSystem localFs = FileSystem.getLocal(conf);
 jars.addAll(conf.getStringCollection("tmpjars"));
 jars.addAll(Arrays.stream(classes)
   .filter(Objects::nonNull)
   .map(clazz -> {
    String path = Utilities.jarFinderGetJar(clazz);
    if (path == null) {
     throw new RuntimeException("Could not find jar for class "
       + clazz
       + " in order to ship it to the cluster.");
    }
    try {
     if (!localFs.exists(new Path(path))) {
      throw new RuntimeException("Could not validate jar file " + path + " for class " + clazz);
     }
    } catch (IOException e) {
     throw new RuntimeException(e);
    }
    return path;
   }).collect(Collectors.toList()));
 if (jars.isEmpty()) {
  return;
 }
 conf.set("tmpjars", StringUtils.arrayToString(jars.toArray(new String[0])));
}
origin: apache/hbase

conf.set("tmpjars", StringUtils.arrayToString(jars.toArray(new String[jars.size()])));
origin: apache/hive

public static String getLocalDirList(Configuration conf) {
 if (HiveConf.getVar(conf, HiveConf.ConfVars.HIVE_EXECUTION_ENGINE).equals("tez")) {
  TezContext tezContext = (TezContext) TezContext.get();
  if (tezContext != null && tezContext.getTezProcessorContext() != null) {
   return StringUtils.arrayToString(tezContext.getTezProcessorContext().getWorkDirs());
  } // otherwise fall back to return null, i.e. to use local tmp dir only
 }
 return null;
}
origin: apache/drill

 public static String getLocalDirList(Configuration conf) {
  if (HiveConf.getVar(conf, HiveConf.ConfVars.HIVE_EXECUTION_ENGINE).equals("tez")) {
   TezContext tezContext = (TezContext) TezContext.get();
   if (tezContext != null && tezContext.getTezProcessorContext() != null) {
    return StringUtils.arrayToString(tezContext.getTezProcessorContext().getWorkDirs());
   } // otherwise fall back to return null, i.e. to use local tmp dir only
  }

  return null;
 }
}
origin: apache/hive

TableMapReduceUtil.addDependencyJars(copy);
merged.addAll(copy.getConfiguration().getStringCollection("tmpjars"));
jobConf.set("tmpjars", StringUtils.arrayToString(merged.toArray(new String[0])));
origin: apache/hive

this.shuffleHandlerConf.setInt(ShuffleHandler.SHUFFLE_PORT_CONFIG_KEY, shufflePort);
this.shuffleHandlerConf.set(ShuffleHandler.SHUFFLE_HANDLER_LOCAL_DIRS,
  StringUtils.arrayToString(localDirs));
this.shuffleHandlerConf.setBoolean(ShuffleHandler.SHUFFLE_DIR_WATCHER_ENABLED,
  HiveConf.getBoolVar(daemonConf, ConfVars.LLAP_DAEMON_SHUFFLE_DIR_WATCHER_ENABLED));
origin: com.facebook.hadoop/hadoop-core

/** 
 * Set the array of string values for the <code>name</code> property as 
 * as comma delimited values.  
 * 
 * @param name property name.
 * @param values The values
 */
public void setStrings(String name, String... values) {
 set(name, StringUtils.arrayToString(values));
}
origin: io.hops/hadoop-common

/** 
 * Set the array of string values for the <code>name</code> property as 
 * as comma delimited values.  
 * 
 * @param name property name.
 * @param values The values
 */
public void setStrings(String name, String... values) {
 set(name, StringUtils.arrayToString(values));
}
origin: ch.cern.hadoop/hadoop-common

/** 
 * Set the array of string values for the <code>name</code> property as 
 * as comma delimited values.  
 * 
 * @param name property name.
 * @param values The values
 */
public void setStrings(String name, String... values) {
 set(name, StringUtils.arrayToString(values));
}
origin: org.jvnet.hudson.hadoop/hadoop-core

/** 
 * Set the array of string values for the <code>name</code> property as 
 * as comma delimited values.  
 * 
 * @param name property name.
 * @param values The values
 */
public void setStrings(String name, String... values) {
 set(name, StringUtils.arrayToString(values));
}
origin: co.cask.tigon/tigon-yarn

/**
 * Set the array of string values for the <code>name</code> property as
 * as comma delimited values.
 *
 * @param name property name.
 * @param values The values
 */
public void setStrings(String name, String... values) {
 set(name, StringUtils.arrayToString(values));
}
origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

public void setQueues(String queue, String[] subQueues) {
 set(getQueuePrefix(queue) + QUEUES, StringUtils.arrayToString(subQueues));
 LOG.debug("CSConf - setQueues: qPrefix=" + getQueuePrefix(queue) + 
   ", queues=" + StringUtils.arrayToString(subQueues));
}

origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager

public void setQueues(String queue, String[] subQueues) {
 set(getQueuePrefix(queue) + QUEUES, StringUtils.arrayToString(subQueues));
 LOG.debug("CSConf - setQueues: qPrefix=" + getQueuePrefix(queue) + 
   ", queues=" + StringUtils.arrayToString(subQueues));
}

origin: com.github.jiayuhan-it/hadoop-yarn-server-resourcemanager

public void setQueues(String queue, String[] subQueues) {
 set(getQueuePrefix(queue) + QUEUES, StringUtils.arrayToString(subQueues));
 LOG.debug("CSConf - setQueues: qPrefix=" + getQueuePrefix(queue) + 
   ", queues=" + StringUtils.arrayToString(subQueues));
}

org.apache.hadoop.utilStringUtilsarrayToString

Javadoc

Given an array of strings, return a comma-separated list of its elements.

Popular methods of StringUtils

  • stringifyException
    Make a string representation of the exception.
  • join
    Concatenates strings, using a separator.
  • split
  • 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
  • getStringCollection
    Returns a collection of strings.
  • unEscapeString,
  • getStringCollection,
  • byteDesc,
  • formatPercent,
  • getTrimmedStrings,
  • equalsIgnoreCase,
  • format,
  • formatTimeDiff,
  • getTrimmedStringCollection

Popular in Java

  • Reactive rest calls using spring rest template
  • getApplicationContext (Context)
  • getResourceAsStream (ClassLoader)
  • runOnUiThread (Activity)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • String (java.lang)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top plugins for Android Studio
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