use of org.apache.solr.client.solrj.io.stream.expr.StreamExplanation in project lucene-solr by apache.
the class LetStream method toExplanation.
@Override
public Explanation toExplanation(StreamFactory factory) throws IOException {
StreamExplanation explanation = new StreamExplanation(getStreamNodeId().toString());
explanation.setFunctionName(factory.getFunctionName(this.getClass()));
explanation.setImplementingClass(this.getClass().getName());
explanation.setExpressionType(ExpressionType.STREAM_DECORATOR);
explanation.setExpression(toExpression(factory, false).toString());
explanation.addChild(stream.toExplanation(factory));
return explanation;
}
use of org.apache.solr.client.solrj.io.stream.expr.StreamExplanation in project lucene-solr by apache.
the class ListStream method toExplanation.
@Override
public Explanation toExplanation(StreamFactory factory) throws IOException {
StreamExplanation explanation = new StreamExplanation(getStreamNodeId().toString());
explanation.setFunctionName(factory.getFunctionName(this.getClass()));
explanation.setImplementingClass(this.getClass().getName());
explanation.setExpressionType(ExpressionType.STREAM_DECORATOR);
explanation.setExpression(toExpression(factory, false).toString());
for (TupleStream stream : streams) {
explanation.addChild(stream.toExplanation(factory));
}
return explanation;
}
use of org.apache.solr.client.solrj.io.stream.expr.StreamExplanation in project lucene-solr by apache.
the class MergeStream method toExplanation.
@Override
public Explanation toExplanation(StreamFactory factory) throws IOException {
StreamExplanation explanation = new StreamExplanation(getStreamNodeId().toString());
explanation.setFunctionName(factory.getFunctionName(this.getClass()));
explanation.setImplementingClass(this.getClass().getName());
explanation.setExpressionType(ExpressionType.STREAM_DECORATOR);
explanation.setExpression(toExpression(factory, false).toString());
explanation.addHelper(comp.toExplanation(factory));
for (PushBackStream stream : streams) {
explanation.addChild(stream.toExplanation(factory));
}
return explanation;
}
use of org.apache.solr.client.solrj.io.stream.expr.StreamExplanation in project lucene-solr by apache.
the class JDBCStream method toExplanation.
@Override
public Explanation toExplanation(StreamFactory factory) throws IOException {
StreamExplanation explanation = new StreamExplanation(getStreamNodeId().toString());
explanation.setFunctionName(factory.getFunctionName(this.getClass()));
explanation.setImplementingClass(this.getClass().getName());
explanation.setExpressionType(ExpressionType.STREAM_SOURCE);
StreamExpression expression = (StreamExpression) toExpression(factory);
explanation.setExpression(expression.toString());
String driverClassName = this.driverClassName;
if (null == driverClassName) {
try {
driverClassName = DriverManager.getDriver(connectionUrl).getClass().getName();
} catch (Exception e) {
driverClassName = String.format(Locale.ROOT, "Failed to find driver for connectionUrl='%s'", connectionUrl);
}
}
// child is a datastore so add it at this point
StreamExplanation child = new StreamExplanation(getStreamNodeId() + "-datastore");
child.setFunctionName("jdbc-source");
child.setImplementingClass(driverClassName);
child.setExpressionType(ExpressionType.DATASTORE);
child.setExpression(sqlQuery);
explanation.addChild(child);
return explanation;
}
use of org.apache.solr.client.solrj.io.stream.expr.StreamExplanation in project lucene-solr by apache.
the class ParallelStream method toExplanation.
@Override
public Explanation toExplanation(StreamFactory factory) throws IOException {
StreamExplanation explanation = new StreamExplanation(getStreamNodeId().toString());
explanation.setFunctionName(factory.getFunctionName(this.getClass()));
explanation.setImplementingClass(this.getClass().getName());
explanation.setExpressionType(ExpressionType.STREAM_DECORATOR);
explanation.setExpression(toExpression(factory, false).toString());
// add a child for each worker
for (int idx = 0; idx < workers; ++idx) {
explanation.addChild(tupleStream.toExplanation(factory));
}
return explanation;
}
Aggregations