@Override
protected Map<String, KeyValueStore<?, ?>> getRequiredStores() {
Map<String, KeyValueStore<?, ?>> requiredStores = new HashMap<String, KeyValueStore<?, ?>>();
if (mMapper instanceof KeyValueStoreClient) {
Map<String, KeyValueStore<?, ?>> mapperStores =
((KeyValueStoreClient) mMapper).getRequiredStores();
if (null != mapperStores) {
mergeStores(requiredStores, mapperStores);
}
}
if (null != mCombiner && mCombiner instanceof KeyValueStoreClient) {
Map<String, KeyValueStore<?, ?>> combinerStores =
((KeyValueStoreClient) mCombiner).getRequiredStores();
if (null != combinerStores) {
mergeStores(requiredStores, combinerStores);
}
}
if (null != mReducer && mReducer instanceof KeyValueStoreClient) {
Map<String, KeyValueStore<?, ?>> reducerStores =
((KeyValueStoreClient) mReducer).getRequiredStores();
if (null != reducerStores) {
mergeStores(requiredStores, reducerStores);
}
}
return requiredStores;
}