|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cascading.util.Util
public class Util
Class Util provides reusable operations.
Nested Class Summary | |
---|---|
static interface |
Util.RetryOperator<T>
|
Constructor Summary | |
---|---|
Util()
|
Method Summary | ||
---|---|---|
static String |
captureDebugTrace(Class type)
|
|
static Object |
createProtectedObject(Class type,
Object[] parameters,
Class[] parameterTypes)
|
|
static String |
createUniqueID(String seed)
This method creates a globally unique HEX value seeded by the given string. |
|
static Object |
deserializeBase64(String string)
This method deserializes the Base64 encoded String into an Object instance. |
|
static Object |
deserializeBase64(String string,
boolean decompress)
|
|
static Class |
findMainClass(Class defaultType)
|
|
static String |
formatRawTrace(Pipe pipe,
String message)
Method formatRawTrace does not include the pipe name |
|
static String |
formatTrace(Operation operation,
String message)
|
|
static String |
formatTrace(Pipe pipe,
String message)
|
|
static String |
formatTrace(Scheme scheme,
String message)
|
|
static Thread |
getHDFSShutdownHook()
|
|
static
|
getProperty(Map<Object,Object> properties,
String key,
A defaultValue)
|
|
static Object |
invokeStaticMethod(Class type,
String methodName,
Object[] parameters,
Class[] parameterTypes)
|
|
static String |
join(Collection collection)
This method joins each value in the collection with a tab character as the delimiter. |
|
static String |
join(Collection collection,
String delim)
This method joins each valuein the collection with the given delimiter. |
|
static String |
join(Collection collection,
String delim,
boolean printNull)
|
|
static String |
join(int[] list,
String delim)
This method joins the values in the given list with the delim String value. |
|
static String |
join(int[] list,
String delim,
boolean printNull)
|
|
static String |
join(Object[] list,
String delim)
This method joins the values in the given list with the delim String value. |
|
static String |
join(Object[] list,
String delim,
boolean printNull)
|
|
static String |
join(String delim,
boolean printNull,
String... strings)
|
|
static void |
join(StringBuffer buffer,
Collection collection,
String delim)
This method joins each value in the collection with the given delimiter. |
|
static void |
join(StringBuffer buffer,
Collection collection,
String delim,
boolean printNull)
|
|
static String |
join(String delim,
String... strings)
|
|
static String |
normalizeUrl(String url)
This methdo attempts to remove duplicate consecutive forward slashes from the given url. |
|
static String |
print(Collection collection,
String delim)
|
|
static void |
print(StringBuffer buffer,
Collection collection,
String delim)
|
|
static void |
printGraph(PrintStream out,
org.jgrapht.graph.SimpleDirectedGraph graph)
|
|
static String |
printGraph(org.jgrapht.graph.SimpleDirectedGraph graph)
|
|
static void |
printGraph(String filename,
org.jgrapht.graph.SimpleDirectedGraph graph)
|
|
static void |
printMatrix(PrintStream out,
org.jgrapht.graph.SimpleDirectedGraph<FlowElement,Scope> graph)
|
|
static Collection<String> |
quote(Collection<String> collection,
String quote)
|
|
static void |
removeAllNulls(List list)
This method removes all nulls from the given List. |
|
static String[] |
removeNulls(String... strings)
|
|
static
|
retry(org.apache.log4j.Logger logger,
int retries,
int secondsDelay,
String message,
Util.RetryOperator<T> operator)
|
|
static String |
sanitizeUrl(String url)
This method attempts to remove any username and password from the given url String. |
|
static String |
serializeBase64(Object object)
This method serializes the given Object instance and retunrs a String Base64 representation. |
|
static String |
serializeBase64(Object object,
boolean compress)
|
|
static String |
toNull(Object object)
This method returns the Object.toString() of the given object, or an empty String if the object
is null. |
|
static String |
truncate(String string,
int maxSize)
This method truncates the given String value to the given size, but appends an ellipse ("...") if the String is larger than maxSize. |
|
static void |
writeDOT(Writer writer,
org.jgrapht.graph.SimpleDirectedGraph graph,
org.jgrapht.ext.IntegerNameProvider vertexIdProvider,
org.jgrapht.ext.VertexNameProvider vertexNameProvider,
org.jgrapht.ext.EdgeNameProvider edgeNameProvider)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Util()
Method Detail |
---|
public static String serializeBase64(Object object) throws IOException
object
- to be serialized
IOException
public static String serializeBase64(Object object, boolean compress) throws IOException
IOException
public static Object deserializeBase64(String string) throws IOException
string
-
IOException
public static Object deserializeBase64(String string, boolean decompress) throws IOException
IOException
public static String createUniqueID(String seed)
seed
-
public static String join(int[] list, String delim)
list
- delim
-
public static String join(int[] list, String delim, boolean printNull)
public static String join(String delim, String... strings)
public static String join(String delim, boolean printNull, String... strings)
public static String join(Object[] list, String delim)
list
- delim
-
public static String join(Object[] list, String delim, boolean printNull)
public static String join(Collection collection)
collection
-
public static String join(Collection collection, String delim)
collection
- delim
-
public static String join(Collection collection, String delim, boolean printNull)
public static void join(StringBuffer buffer, Collection collection, String delim)
StringBuffer
instance.
buffer
- collection
- delim
- public static void join(StringBuffer buffer, Collection collection, String delim, boolean printNull)
public static String[] removeNulls(String... strings)
public static Collection<String> quote(Collection<String> collection, String quote)
public static String print(Collection collection, String delim)
public static void print(StringBuffer buffer, Collection collection, String delim)
public static String sanitizeUrl(String url)
url
-
public static String normalizeUrl(String url)
url
-
public static String toNull(Object object)
Object.toString()
of the given object, or an empty String if the object
is null.
object
-
public static String truncate(String string, int maxSize)
string
- maxSize
-
public static <A> A getProperty(Map<Object,Object> properties, String key, A defaultValue)
public static String printGraph(org.jgrapht.graph.SimpleDirectedGraph graph)
public static void printGraph(PrintStream out, org.jgrapht.graph.SimpleDirectedGraph graph)
public static void printGraph(String filename, org.jgrapht.graph.SimpleDirectedGraph graph)
public static void printMatrix(PrintStream out, org.jgrapht.graph.SimpleDirectedGraph<FlowElement,Scope> graph)
public static void removeAllNulls(List list)
list
- public static String formatTrace(Scheme scheme, String message)
public static String formatRawTrace(Pipe pipe, String message)
pipe
- of type Pipemessage
- of type String
public static String formatTrace(Pipe pipe, String message)
public static String formatTrace(Operation operation, String message)
public static String captureDebugTrace(Class type)
public static Class findMainClass(Class defaultType)
public static void writeDOT(Writer writer, org.jgrapht.graph.SimpleDirectedGraph graph, org.jgrapht.ext.IntegerNameProvider vertexIdProvider, org.jgrapht.ext.VertexNameProvider vertexNameProvider, org.jgrapht.ext.EdgeNameProvider edgeNameProvider)
public static <T> T retry(org.apache.log4j.Logger logger, int retries, int secondsDelay, String message, Util.RetryOperator<T> operator) throws Exception
Exception
public static Object createProtectedObject(Class type, Object[] parameters, Class[] parameterTypes)
public static Thread getHDFSShutdownHook()
public static Object invokeStaticMethod(Class type, String methodName, Object[] parameters, Class[] parameterTypes)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |