问题
I am currently working in pseudo-distributed mode in Hadoop. The way my reduce function works is: For each key it will create a arraylist of its value and then will make an instance of a singleton class [ This class is present in a library so I cannot change it ]. It then call a method of this instance.
Now my problem is: Suppose the map function emits 2 keys, then the reducer will only process one key for the another one it will say that "Java.lang.exception" the class[ the singleton one] cannot be instantiated.
My concern is why this is happening? As in pseudo-distributed mode each reducer run a different JVM!
来源:https://stackoverflow.com/questions/17756491/unusual-behavior-of-reducer-of-map-reduce-in-hadoop