well this is just sample code. I am load a saved search in getInputData (); and I have another search I want to dynamically create and store the result as an array. I want this search to run one time and assign the result set to an array. Now this array is something I want to access in my map and reduce and I will shuffle this array again and again. I am running this search and saving it in array in get input data as it needs to be done only once. Problem being I can't use/access this array in Map Reduce as I am not returning it from getInputData. But the question here is that I defined this globally, so I should be able to access it anywhere. Right? But I am not able to. In map and reduce it is null.