org.apache.hadoop.streaming
Class StreamUtil

java.lang.Object
  extended by org.apache.hadoop.streaming.StreamUtil

@InterfaceAudience.Private
public class StreamUtil
extends Object

Utilities used in streaming


Constructor Summary
StreamUtil()
           
 
Method Summary
static String findInClasspath(String className)
           
static String findInClasspath(String className, ClassLoader loader)
           
static Class goodClassOrNull(org.apache.hadoop.conf.Configuration conf, String className, String defaultPackage)
          It may seem strange to silently switch behaviour when a String is not a classname; the reason is simplified Usage:
static boolean isLocalJobTracker(org.apache.hadoop.mapred.JobConf job)
           
static String regexpEscape(String plain)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamUtil

public StreamUtil()
Method Detail

goodClassOrNull

public static Class goodClassOrNull(org.apache.hadoop.conf.Configuration conf,
                                    String className,
                                    String defaultPackage)
It may seem strange to silently switch behaviour when a String is not a classname; the reason is simplified Usage:
 -mapper [classname | program ]
 instead of the explicit Usage:
 [-mapper program | -javamapper classname], -mapper and -javamapper are mutually exclusive.
 (repeat for -reducer, -combiner) 


findInClasspath

public static String findInClasspath(String className)

findInClasspath

public static String findInClasspath(String className,
                                     ClassLoader loader)
Returns:
a jar file path or a base directory or null if not found.

regexpEscape

public static String regexpEscape(String plain)

isLocalJobTracker

public static boolean isLocalJobTracker(org.apache.hadoop.mapred.JobConf job)


Copyright © 2014 Apache Software Foundation. All Rights Reserved.