|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||||
| Class Summary | |
|---|---|
| HashFNV |
Syntax:
long HashFNV(String string_to_hash, [int mod]).
|
| HashFNV1 | Implementation for HashFNV which takes 1 parameter |
| HashFNV2 | Implementation for HashFNV which takes 2 parameter |
| INDEXOF | string.INDEXOF implements eval function to search for a string Example: register pigudfs.jar; A = load 'mydata' as (name); B = foreach A generate string.INDEXOF(name, ","); dump B; |
| LASTINDEXOF | string.INSTR implements eval function to search for the last occurrence of a string Returns null on error Example:
register pigudfs.jar;
A = load 'mydata' as (name);
B = foreach A generate string.LASTINDEXOF(name, ",");
dump B;
|
| LcFirst | lower-case the first character of a string |
| LENGTH | string.LENGTH implements eval function to find length of a string Example: register piggybank.jar; A = load 'mydata' as (name); B = foreach A generate string.LENGTH(name); dump B; |
| LookupInFiles |
Syntax:
int lookupInFiles(String expression,... |
| LOWER | string.LOWER implements eval function to convert a string to lower case Example: register pigudfs.jar; A = load 'mydata' as (name); B = foreach A generate string.LOWER(name); dump B; |
| RegexExtract |
Syntax:
String RegexExtract(String expression, String regex, int match_index).
Input:
expression-source string.
regex-regular expression.
match_index-index of the group to extract.
Output:
extracted group, if fail, return null.
|
| RegexExtractAll |
Syntax:
String RegexExtractAll(String expression, String regex).
Input:
expression-source string.
regex-regular expression.
Output:
A tuple of matched strings.
|
| RegexMatch |
Syntax:
int RegexMatch(String expression, String regex).
Output:
return 1 if expression contains regex, 0 otherwise.
|
| REPLACE | string.REPLACE implements eval function to replace part of a string. |
| Reverse | |
| Split | Wrapper around Java's String.split input tuple: first column is assumed to have a string to split; the optional second column is assumed to have the delimiter or regex to split on; if not provided, it's assumed to be '\s' (space) the optional third column may provide a limit to the number of results. If limit is not provided, 0 is assumed, as per Java's split(). |
| SUBSTRING | string.SUBSTRING implements eval function to get a part of a string. |
| Trim | |
| UcFirst | upper-case the first character of a string |
| UPPER | string.UPPER implements eval function to convert a string to upper case Example: register pigudfs.jar; A = load 'mydata' as (name); B = foreach A generate string.UPPER(name); dump B; |
|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||||