I tried running the same with python which worked fine. I also added groovy to pig_classpath, I set groovy in $PATH Please find attached code sample which has python and groovy code along with their pig scripts.
Could you please help here? On Mon, Apr 14, 2014 at 5:45 PM, Chandramohan <[EMAIL PROTECTED]>wrote:
emp.csv 1 CM 5000 2 TJ 4000 3 RN 5600 4 SJ 6345 5 RB 7325 6 AJ 7634 7 AR 9800 emp_g.pig register 'test.groovy' using groovy as myfuncs;
A = LOAD 'emp.csv' As(id:int, name:chararray, salary:long); B = FOR EACH A myfuncs.square(A.id); DUMP B;
emp_py.pig Register 'test.py' using org.apache.pig.scripting.jython.JythonScriptEngine as myfuncs; A = LOAD 'emp.csv' As(id:int, name:chararray, salary:long); B = FOREACH A generate myfuncs.bonus(salary);
Is there any sample on how to do exception handling and logging in groovy UDFs, so that pig can know about exceptions.
On Tue, Apr 15, 2014 at 11:58 PM, Cheolsoo Park <[EMAIL PROTECTED]>wrote:
NEW: Monitor These Apps!
Apache Lucene, Apache Solr and all other Apache Software Foundation projects and their respective logos are trademarks of the Apache Software Foundation.
Elasticsearch, Kibana, Logstash, and Beats are trademarks of Elasticsearch BV, registered in the U.S. and in other countries. This site and Sematext Group is in no way affiliated with Elasticsearch BV.
Service operated by Sematext