No such method exception Hadoop

后端 未结 6 858
长情又很酷
长情又很酷 2020-12-01 06:12

When I am running a Hadoop .jar file from the command prompt, it throws an exception saying no such method StockKey method.

StockKey is my custom class defined for m

6条回答
  •  感情败类
    2020-12-01 06:52

    For scala too, I fixed the problem adding default constructor as below,

    class IntPair (first : IntWritable, second : IntWritable) extends WritableComparable[IntPair] {
    
         def this() = this(first = new IntWritable(), second = new IntWritable())
    
         def getFirst () : IntWritable = {
             first
         }
    
         def getSecond () : IntWritable = {
             second
         }
    
    }
    

提交回复
热议问题