Reputation: 183
I am writing a UDF for Hive using Java. I have to read excel files stored in hdfs and do some processing using udf. I am using poi library for processing.
When we read from hdfs we get FSDataInputStream but When we create Workbook using POI it needs InputStream Object.
Though code is not giving error at compile time.
FSDataInputStream stream = hdfs.open(new Path(inputFile));
Workbook workbook= new XSSFWorkbook(stream);
But When I create temporary function I get:
Execution Error, return code -101 from org.apache.hadoop.hive.ql.exec.FunctionTask. org/apache/poi/ss/usermodel/Workbook
Upvotes: 1
Views: 1103
Reputation: 2246
It looks like you didn't add all dependent jars. You need to either build your jar with dependency or add all dependent jars one by one.
Command: hive> add myjar.jar
Upvotes: 1