This Confluence has been LDAP enabled, if you are an ASF Committer, please use your LDAP Credentials to login. Any problems file an INFRA jira ticket please.

Child pages
  • PiggyBank

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Make sure your classpath includes the hadoop jars as well. This workedforme worked for me using the cloudera CDH2 / hadoop AMIs:

Code Block
pig_version=0.4.99.0+10   ; pig_dir=/usr/lib/pig ;
hadoop_version=0.20.1+152 ; hadoop_dir=/usr/lib/hadoop ;
export CLASSPATH=$CLASSPATH:${hadoop_dir}/hadoop-${hadoop_version}-core.jar:${hadoop_dir}/hadoop-${hadoop_version}-tools.jar:${hadoop_dir}/hadoop-${hadoop_version}-ant.jar:${hadoop_dir}/lib/commons-logging-1.0.4.jar:${pig_dir}/pig-${pig_version}-core.jar
export PIG_CONF_DIR=/path/to/mapred-site/and/core-site/pointing/to/your/cluster

To obtain `javadoc` description of the functions run `ant javadoc` from `trunk/contrib/piggybank/java` directory. The documentation is generate in `trunk/contrib/piggybank/java/build/javadoc` directory.

...

  1. Check existing javadoc to make sure that the function does not already exist as described in PiggyBank#Using#Using_Functions
  2. Checkout UDF code as described in PiggyBank#Using#Using_Functions
  3. Place your java code in the directory that makes sense for your function. The directory structure as of now has two levels: function type as described in #Using_Functions and function subtype (like math or string for eval functions) for some of the types. If you feel that your function requires a new subtype, feel free to add one.
  4. Make sure that your function is well documented and uses javadoc style of documentation.
  5. Make sure that your code follows Pig coding conventions described in HowToContribute
  6. Make sure that for each function, you add a corresponding test class in the test part of the tree.
  7. Submit your patch following the process described HowToContribute