}
String stepTypeString = stepType.toString();
if (pop instanceof POStore) {
P2jLogicalRelationalOperator node = getOpForStore((POStore) pop);
if (node != null) {
node.setMapReduce(jid, stepTypeString);
return;
}
} else if (phy2LogMap.containsKey(pop) && reverseMap.containsKey(phy2LogMap.get(pop))) {
String nodeId = reverseMap.get(phy2LogMap.get(pop));
P2jLogicalRelationalOperator node = p2jMap.get(nodeId);
node.setMapReduce(jid, stepTypeString);
LOG.debug("Found key for: " + pop.toString());
return;
} else {
LOG.debug("No node for pop: " + pop + pop.getClass() + " ... Searching locationMap.");
boolean didAssign = false;
for (OriginalLocation loc : pop.getOriginalLocations()) {
LOG.debug("Checking location: " + loc);
if (locationMap.containsKey(loc.toString())) {
P2jLogicalRelationalOperator node = p2jMap.get(reverseMap.get(locationMap.get(loc.toString())));
LOG.debug("Found location... " + node);
if (node.getMapReduce() == null) {
if (node.getOperator().equalsIgnoreCase("LOJoin")
|| node.getOperator().equalsIgnoreCase("LOGroup")) {
stepTypeString = MRStepType.REDUCER.toString();
}
node.setMapReduce(jid, stepTypeString);
didAssign = true;
LOG.debug("Assign location... " + node);
}
}
}