streamBuilder.setSource("tail(\"" + sourceFilename + "\")");
StreamSymbol inputStream = streamBuilder.build();
getSymbolTable().addSymbol(inputStream);
LocalEnvironment env = getEnvironment();
env.connect();
// Create another stream that selects 2 * any value we put into 'inputstream'.
QuerySubmitResponse createResponse = env.submitQuery(
"CREATE STREAM doubled AS SELECT 2 * a as b FROM inputstream",
getQueryOpts());
LOG.info("Create response message: " + createResponse.getMessage());
FlowId createId = createResponse.getFlowId();
assertNotNull(createId);
// Select 3 * any value in doubled.
getConf().set(SelectStmt.CLIENT_SELECT_TARGET_KEY, "test6x");
QuerySubmitResponse queryResponse = env.submitQuery(
"SELECT 3 * b as c FROM doubled", getQueryOpts());
LOG.info("Query response message: " + queryResponse.getMessage());
FlowId queryId = queryResponse.getFlowId();
assertNotNull(queryId);