Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive, mail # user - Getting a weird error when using the ngrams function


Copy link to this message
-
Getting a weird error when using the ngrams function
Matthew Rathbone 2011-06-20, 15:06
Hoping someone with more expertise could help on this:

I have no idea what's causing this to happen, but here is the exception:

java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row (tag=0) {"key":{},"value":{"_col0":["0","0","0","0"]},"alias":0} at org.apache.hadoop.hive.ql.exec.ExecReducer.reduce(ExecReducer.java:268) at org.apache.hadoop.mapred.ReduceTask.runOldReducer(ReduceTask.java:467) at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:415) at org.apache.hadoop.mapred.Child.main(Child.java:170) Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row (tag=0) {"key":{},"value":{"_col0":["0","0","0","0"]},"alias":0} at org.apache.hadoop.hive.ql.exec.ExecReducer.reduce(ExecReducer.java:256) ... 3 more Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: GenericUDAFnGramEvaluator: mismatch in value for 'n', which usually is caused by a non-constant expression. Found '0' and '1'. at org.apache.hadoop.hive.ql.udf.generic.GenericUDAFnGrams$GenericUDAFnGramEvaluator.merge(GenericU
 DAFnGram
s.java:239) at org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.aggregate(GenericUDAFEvaluator.java:142) at org.apache.hadoop.hive.ql.exec.GroupByOperator.updateAggregations(GroupByOperator.java:592) at org.apache.hadoop.hive.ql.exec.GroupByOperator.processAggr(GroupByOperator.java:816) at org.apache.hadoop.hive.ql.exec.GroupByOperator.processOp(GroupByOperator.java:716) at org.apache.hadoop.hive.ql.exec.Operator.process(Operator.java:470) at org.apache.hadoop.hive.ql.exec.ExecReducer.reduce(ExecReducer.java:247)

What does 'mismatch in value for n' mean?
My query is super simple:
select ngrams(sentences(text), 1, 50) from messages
--
Matthew Rathbone
Foursquare | Software Engineer | Server Engineering Team
[EMAIL PROTECTED] (mailto:[EMAIL PROTECTED]) | @rathboma (http://twitter.com/rathboma) | 4sq (http://foursquare.com/rathboma)