i am unable to compile this code on redhat linux
package hiveudf; import org.apache.hadoop.hive.ql.exec.UDF; import org.apache.hadoop.io.Text; public class lowercaseudf extends UDF { public Text evaluate(final Text s) { if (s == null) { return null;} return new Text(s.toString().lowerCase()); } } }
# javac -classpath /usr/hdp/2.6.5.0-292/hive2/lib/*:/usr/hdp/2.6.5.0-292/hadoop/*:/usr/hdp/2.6.5.0-292/hadoop-mapreduce/* lowercaseudf.java lowercaseudf.java:7: error: cannot find symbol return new Text(s.toString().lowerCase()); ^ symbol: method lowerCase() location: class String 1 error