| 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); |