2017-07-19 4 views
1

マップフェーズで自己作成関数でAvroを使用してデータを格納し、reduceフェーズに送信するHadoop MapReduceプログラムがあります。私は、関数を実行しているとき、私はこのエラーを取得:MapReduceの独自の関数からAvroオブジェクトを作成する際のjava.lang.IllegalAccessError

Caused by: java.lang.IllegalAccessError: tried to access method org.apache.avro.specific.SpecificData.<init>()V from class com.example.myapp.avro.PointList 

PointListデータ型は、int秒を持っていますが、それはdouble sの悩みを持っていませんでした。あなたはこれを引き起こしていることを知っていますか?

答えて

1

IllegalAccessErrorのJavadocを引用:

Thrown if an application attempts to access or modify a field, or to call a method that it does not have access to. Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed.

MapReduceのジョブを開発し、アブロの1つのバージョンに対してコンパイルして、Hadoopクラスタに展開した後、それは別のを使用して開始した可能性が高い、互換性がありません実行時にAvroのバージョン。ランタイムクラスパスを見直して、期待どおりのバージョンと異なるバージョンのAvroを取得しているかどうかを確認することをお勧めします。

関連する問題