No such method exception Hadoop

后端 未结 6 855
长情又很酷
长情又很酷 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:56

    There's another thing to check when getting errors like this for classes which are writables, mappers, reducers, etc.

    If the class is an inner class, make sure it's declared static (i.e. doesn't need an instance of the enclosing class). Otherwise, Hadoop cannot instantiate your inner class and will give this same error - that a zero-arg constructor is needed.

提交回复
热议问题