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