use of org.apache.drill.exec.physical.base.FragmentLeaf in project drill by axbaretto.
the class PhysicalPlanReader method readFragmentLeaf.
@VisibleForTesting
public FragmentLeaf readFragmentLeaf(String json) throws JsonProcessingException, IOException {
logger.debug("Attempting to read {}", json);
PhysicalOperator op = operatorReader.readValue(json);
if (op instanceof FragmentLeaf) {
return (FragmentLeaf) op;
} else {
throw new UnsupportedOperationException(String.format("The provided json fragment is not a FragmentLeaf. The operator was %s.", op.getClass().getCanonicalName()));
}
}
use of org.apache.drill.exec.physical.base.FragmentLeaf in project drill by apache.
the class PhysicalPlanReader method readFragmentOperator.
public FragmentRoot readFragmentOperator(String json) throws JsonProcessingException, IOException {
logger.debug("Attempting to read {}", json);
PhysicalOperator op = operatorReader.readValue(json);
if (op instanceof FragmentLeaf) {
return (FragmentRoot) op;
} else {
throw new UnsupportedOperationException(String.format("The provided json fragment doesn't have a FragmentRoot as its root operator. The operator was %s.", op.getClass().getCanonicalName()));
}
}
use of org.apache.drill.exec.physical.base.FragmentLeaf in project drill by apache.
the class PhysicalPlanReader method readFragmentLeaf.
@VisibleForTesting
public FragmentLeaf readFragmentLeaf(String json) throws IOException {
logger.debug("Attempting to read {}", json);
PhysicalOperator op = operatorReader.readValue(json);
if (op instanceof FragmentLeaf) {
return (FragmentLeaf) op;
} else {
throw new UnsupportedOperationException(String.format("The provided json fragment is not a FragmentLeaf. " + "The operator was %s.", op.getClass().getCanonicalName()));
}
}
Aggregations