nexr / RHive

RHive is an R extension facilitating distributed computing via Apache Hive.
http://nexr.github.io/RHive
122 stars 63 forks source link

RHIVE M/R Unable to find class: com.nexr.rhive.hive.udf.RUDF #71

Closed ghost closed 9 years ago

ghost commented 9 years ago

running the following code - I see this in the Mapper logs:

2014-11-03 12:08:58,087 ERROR [main] org.apache.hadoop.hive.ql.exec.Utilities: Failed to load plan: hdfs://nameservice1/tmp/hive-hive/hive_2014-11-03_12-08-30_313_5075028444451877361-7/-mr-10003/afcb75de-afeb-4f1e-949a-dab421dc0873/map.xml org.apache.hive.com.esotericsoftware.kryo.KryoException: Unable to find class: com.nexr.rhive.hive.udf.RUDF Serialization trace: genericUDF (org.apache.hadoop.hive.ql.plan.ExprNodeGenericFuncDesc) colExprMap (org.apache.hadoop.hive.ql.exec.SelectOperator) childOperators (org.apache.hadoop.hive.ql.exec.TableScanOperator) aliasToWork (org.apache.hadoop.hive.ql.plan.MapWork) at org.apache.hive.com.esotericsoftware.kryo.util.DefaultClassResolver.readName(DefaultClassResolver.java:138) at org.apache.hive.com.esotericsoftware.kryo.util.DefaultClassResolver.readClass(DefaultClassResolver.java:115) at org.apache.hive.com.esotericsoftware.kryo.Kryo.readClass(Kryo.java:656)

ghost commented 9 years ago

This was a simple issue - all the datanodes need access to com.nexr.rhive.hive.udf.RUDF to run the underlying R code - so I copied the rhive_udf.jar into the classpath of the mapper/reducer everything worked fine