Useful Pig User-Defined Functions (UDF) we are using everyday in Omnilab, SJTU (http://omnilab.sjtu.edu.cn/).