|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pig.impl.util.Utils
public class Utils
Class with utility static methods
Constructor Summary | |
---|---|
Utils()
|
Method Summary | ||
---|---|---|
static FuncSpec |
buildSimpleFuncSpec(String className,
byte... types)
|
|
static boolean |
checkNullAndClass(Object obj1,
Object obj2)
This method is a helper for classes to implement Object.equals(java.lang.Object)
The method checks whether the two arguments are both null or both not null and
whether they are of the same class |
|
static boolean |
checkNullEquals(Object obj1,
Object obj2,
boolean checkEquality)
This method is a helper for classes to implement Object.equals(java.lang.Object)
checks if two objects are equals - two levels of checks are
made - first if both are null or not null. |
|
static ResourceSchema |
getSchema(LoadFunc wrappedLoadFunc,
String location,
boolean checkExistence,
org.apache.hadoop.mapreduce.Job job)
|
|
static Schema |
getSchemaFromString(String schemaString)
|
|
static Schema |
getScriptSchema(String loadFuncSignature,
org.apache.hadoop.conf.Configuration conf)
A helper function for retrieving the script schema set by the LOLoad function. |
|
static String |
getStringFromArray(String[] arr)
|
|
static String |
getTmpFileCompressorName(PigContext pigContext)
|
|
static FileInputLoadFunc |
getTmpFileStorageObject(org.apache.hadoop.conf.Configuration conf)
|
|
static
|
mergeCollection(Collection<O> a,
Collection<O> b)
|
|
static LogicalSchema |
parseSchema(String schemaString)
|
|
static String |
slashisize(String str)
Replace sequences of two slashes ("\\") with one slash ("\") (not escaping a slash in grunt is disallowed, but a double slash doesn't get converted into a regular slash, so we have to do it instead) |
|
static boolean |
tmpFileCompression(PigContext pigContext)
|
|
static String |
tmpFileCompressionCodec(PigContext pigContext)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Utils()
Method Detail |
---|
public static boolean checkNullEquals(Object obj1, Object obj2, boolean checkEquality)
Object.equals(java.lang.Object)
checks if two objects are equals - two levels of checks are
made - first if both are null or not null. If either is null,
check is made whether both are null.
If both are non null, equality also is checked if so indicated
obj1
- first object to be comparedobj2
- second object to be comparedcheckEquality
- flag to indicate whether object equality should
be checked if obj1 and obj2 are non-null
public static boolean checkNullAndClass(Object obj1, Object obj2)
Object.equals(java.lang.Object)
The method checks whether the two arguments are both null or both not null and
whether they are of the same class
obj1
- first object to compareobj2
- second object to compare
public static Schema getScriptSchema(String loadFuncSignature, org.apache.hadoop.conf.Configuration conf) throws IOException
loadFuncSignature
- conf
-
IOException
public static ResourceSchema getSchema(LoadFunc wrappedLoadFunc, String location, boolean checkExistence, org.apache.hadoop.mapreduce.Job job) throws IOException
IOException
public static Schema getSchemaFromString(String schemaString) throws ParserException
schemaString
-
ParserException
public static LogicalSchema parseSchema(String schemaString) throws ParserException
ParserException
public static String getTmpFileCompressorName(PigContext pigContext)
public static FileInputLoadFunc getTmpFileStorageObject(org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
public static boolean tmpFileCompression(PigContext pigContext)
public static String tmpFileCompressionCodec(PigContext pigContext) throws IOException
IOException
public static String getStringFromArray(String[] arr)
public static FuncSpec buildSimpleFuncSpec(String className, byte... types)
public static String slashisize(String str)
str
-
public static <O> Collection<O> mergeCollection(Collection<O> a, Collection<O> b)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |