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

Method readBaseData

src/org/apache/pig/pen/ExampleGenerator.java:210–228  ·  view source on GitHub ↗
(List<Operator> loads)

Source from the content-addressed store, hash-verified

208 }
209
210 private void readBaseData(List<Operator> loads) throws IOException, InterruptedException, FrontendException, ExecException {
211 PhysicalPlan thisPhyPlan = new PhysicalPlan();
212 for (Operator op : loads) {
213 LogicalSchema schema = ((LOLoad) op).getSchema();
214 if(schema == null) {
215 throw new ExecException("Example Generator requires a schema. Please provide a schema while loading data.");
216 }
217 poLoadToSchemaMap.put((POLoad)logToPhyMap.get(op), schema);
218 thisPhyPlan.add(logToPhyMap.get(op));
219 }
220 baseData = null;
221 Map<Operator, DataBag> result = getData(thisPhyPlan);
222 baseData = new HashMap<LOLoad, DataBag>();
223 for (Operator lo : result.keySet()) {
224 if (lo instanceof LOLoad) {
225 baseData.put((LOLoad) lo, result.get(lo));
226 }
227 }
228 }
229
230 PhysicalPlan compilePlan(LogicalPlan plan) throws ExecException, FrontendException {
231 newPlan = new LogicalPlan(plan);

Callers 1

getExamplesMethod · 0.95

Calls 6

getDataMethod · 0.95
getSchemaMethod · 0.65
getMethod · 0.65
addMethod · 0.65
putMethod · 0.45
keySetMethod · 0.45

Tested by

no test coverage detected