Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Big Data Hadoop & Spark by (6.5k points)
edited by

The following is my java code:

package com.hive.udf;

import org.apache.hadoop.hive.ql.exec.UDF;

import org.apache.hadoop.io.text;

public final class MyUpper extends UDF{

public Text evaluate(final Text s) {

if(s == null) {return null;}

return new text(s.toString().toUpperCase());

}

}

How to resolve this issue?

1 Answer

0 votes
by (11.3k points)

Try using the following command to fix this issue:

javac -cp 'hadoop classpath':”/usr/lib/hadoop/*:/usr/lib/hive/lib/*” com/hive/udf/MyUpper.java

Using this will direct you to the hadoop classpath directory and your error will be resolved as the package would be accessible. 

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Jul 11, 2019 in Java by Ritik (3.5k points)
0 votes
1 answer
asked Mar 28, 2021 in Java by dante07 (13.1k points)

Browse Categories

...