format = getPactContract().getFormatWrapper().getUserCodeObject(); Configuration config = getPactContract().getParameters(); config.setClassLoader(format.getClass().getClassLoader());
format = getPactContract().getFormatWrapper().getUserCodeObject(); Configuration config = getPactContract().getParameters(); config.setClassLoader(format.getClass().getClassLoader());
@Override public List<PlanNode> getAlternativePlans(CostEstimator estimator) { if (this.cachedPlans != null) { return this.cachedPlans; } SourcePlanNode candidate = new SourcePlanNode(this, "DataSource("+this.getPactContract().getName()+")"); candidate.updatePropertiesWithUniqueSets(getUniqueFields()); final Costs costs = new Costs(); if (FileInputFormat.class.isAssignableFrom(getPactContract().getFormatWrapper().getUserCodeClass()) && this.estimatedOutputSize >= 0) { estimator.addFileInputCost(this.estimatedOutputSize, costs); } candidate.setCosts(costs); // since there is only a single plan for the data-source, return a list with that element only List<PlanNode> plans = new ArrayList<PlanNode>(1); plans.add(candidate); this.cachedPlans = plans; return plans; }
@Override public List<PlanNode> getAlternativePlans(CostEstimator estimator) { if (this.cachedPlans != null) { return this.cachedPlans; } SourcePlanNode candidate = new SourcePlanNode(this, "DataSource("+this.getPactContract().getName()+")"); candidate.updatePropertiesWithUniqueSets(getUniqueFields()); final Costs costs = new Costs(); if (FileInputFormat.class.isAssignableFrom(getPactContract().getFormatWrapper().getUserCodeClass()) && this.estimatedOutputSize >= 0) { estimator.addFileInputCost(this.estimatedOutputSize, costs); } candidate.setCosts(costs); // since there is only a single plan for the data-source, return a list with that element only List<PlanNode> plans = new ArrayList<PlanNode>(1); plans.add(candidate); this.cachedPlans = plans; return plans; }