Difference between revisions of "Executing slave pipelines"
From CCIL
(→Inline) |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
=== Inline === | === Inline === | ||
− | + | The following code is taken from the [[DBEnumResultSetStage]] class. | |
<pre> | <pre> | ||
@Override | @Override |
Latest revision as of 12:56, 2 June 2017
Inline
The following code is taken from the DBEnumResultSetStage class.
@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); } }