Difference between revisions of "Executing slave pipelines"
From CCIL
(→Inline) |
|||
Line 1: | Line 1: | ||
=== Inline === | === Inline === | ||
− | + | The following code is taken from | |
<pre> | <pre> | ||
@Override | @Override |
Revision as of 12:54, 2 June 2017
Inline
The following code is taken from
@Override public void run() throws ExecutionException { ResultSet rs = getStageInput(ResultSet.class); int limit = confInt(StageConfig.Keys.Limit); String process = confStr(StageConfig.Keys.Process); long c = 0L; try { while (rs.next()) { c = c + 1L; // run nested pipeline SlavePipelineApp processApp = new SlavePipelineApp( LocalServer.getSubsystem(IPlatformServer.class), env, process); processApp.runContext(env.getContext(), rs, null); if (limit > 0 && c >= limit) { if (log.isInfoEnabled()) { log.info(String .format("the limit of %d has been reached, exiting store iteration..", limit)); } break; } } } catch (SQLException e) { throw new ExecutionException("rs.next failed", e); } }