MCPcopy Create free account
hub / github.com/apache/pig / setLoadDataMap

Method setLoadDataMap

src/org/apache/pig/pen/ExampleGenerator.java:306–326  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

304 }
305
306 private void setLoadDataMap() {
307 // This function sets up the LO-TO-Data map, eq. class, and lineage for the base data used in the coming runner
308 // this must be called after logToDataMap has been properly (re)set and before the runner is started
309 if (baseData != null) {
310 if (poToEqclassesMap == null)
311 poToEqclassesMap = new HashMap<PhysicalOperator, Collection<IdentityHashSet<Tuple>>>();
312 else
313 poToEqclassesMap.clear();
314 for (LOLoad lo : baseData.keySet()) {
315 logToDataMap.get(lo).addAll(baseData.get(lo));
316 LinkedList<IdentityHashSet<Tuple>> equivalenceClasses = new LinkedList<IdentityHashSet<Tuple>>();
317 IdentityHashSet<Tuple> equivalenceClass = new IdentityHashSet<Tuple>();
318 equivalenceClasses.add(equivalenceClass);
319 for (Tuple t : baseData.get(lo)) {
320 lineage.insert(t);
321 equivalenceClass.add(t);
322 }
323 poToEqclassesMap.put(logToPhyMap.get(lo), equivalenceClasses);
324 }
325 }
326 }
327
328 public Collection<IdentityHashSet<Tuple>> getEqClasses() {
329 Map<LogicalRelationalOperator, Collection<IdentityHashSet<Tuple>>> logToEqclassesMap = getLoToEqClassMap();

Callers 1

getDataMethod · 0.95

Calls 8

addMethod · 0.95
clearMethod · 0.65
addAllMethod · 0.65
getMethod · 0.65
addMethod · 0.65
keySetMethod · 0.45
insertMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected