Hadoop Spark certification course

Discussion in 'Simplilearn Support' started by Jency Paul, Jun 14, 2019.

  1. Jency Paul

    Jency Paul Member

    May 21, 2019
    Likes Received:
    I have a question on creating UDF on hive. I used the hava code given in the simplilearn docs. It is giving me error. Could you please guide me how to do this.

    import org.apache.udf.simplilearn.converter;
    import org.apache.hadoop.hive.ql.exec.UDF;
    public class ConvertToCelcius extends UDF {
    public double evaluate(double value) {
    return (value - 32) / 1.8;

    The error I get is given below.
    ConvertToCelcius.java:1: error: package org.apache.udf.simplilearn does not exist
    import org.apache.udf.simplilearn.converter;

    ConvertToCelcius.java:2: error: package org.apache.hadoop.hive.ql.exec does not exist
    import org.apache.hadoop.hive.ql.exec.UDF;
    ConvertToCelcius.java:3: error: cannot find symbol
    public class ConvertToCelcius extends UDF

Share This Page