private void cleanupClient(FlowProcess<Properties> flowProcess) throws IOException { if (client != null) { client.close(); report(client.stats(), flowProcess); client = null; } }
protected void doClose(Progressable progressable) { if (log.isTraceEnabled()) { log.trace(String.format("Closing RecordWriter [%s][%s]", uri, resource)); } if (beat != null) { beat.stop(); } if (repository != null) { repository.close(); ReportingUtils.report(progressable, repository.stats()); } initialized = false; } }
@Override public void close() throws IOException { try { if (log.isDebugEnabled()) { log.debug(String.format("Closing RecordReader for [%s]", esSplit)); } if (beat != null) { beat.stop(); } if (scrollQuery != null) { scrollQuery.close(); } if (client != null) { client.close(); } } finally { Stats stats = new Stats(); if (client != null) { stats.aggregate(client.stats()); client = null; } if (scrollQuery != null) { stats.aggregate(scrollQuery.stats()); scrollQuery = null; } ReportingUtils.report(progressable, stats); } }
@Override public void sourceCleanup(FlowProcess<Properties> flowProcess, SourceCall<Object[], ScrollQuery> sourceCall) throws IOException { // in case of a source there's no local client so do all reporting here report(sourceCall.getInput().stats(), flowProcess); report(sourceCall.getInput().repository().stats(), flowProcess); sourceCall.getInput().close(); sourceCall.setContext(null); // used for consistency cleanupClient(flowProcess); }
private void cleanupClient(FlowProcess<Properties> flowProcess) throws IOException { if (client != null) { client.close(); report(client.stats(), flowProcess); client = null; } }
protected void doClose(Progressable progressable) { if (log.isTraceEnabled()) { log.trace(String.format("Closing RecordWriter [%s][%s]", uri, resource)); } if (beat != null) { beat.stop(); } if (repository != null) { repository.close(); ReportingUtils.report(progressable, repository.stats()); } initialized = false; } }
protected void doClose(Progressable progressable) { if (log.isTraceEnabled()) { log.trace(String.format("Closing RecordWriter [%s][%s]", uri, resource)); } if (beat != null) { beat.stop(); } if (repository != null) { repository.close(); ReportingUtils.report(progressable, repository.stats()); } initialized = false; } }
protected void doClose(Progressable progressable) { if (log.isTraceEnabled()) { log.trace(String.format("Closing RecordWriter [%s][%s]", uri, resource)); } if (beat != null) { beat.stop(); } if (repository != null) { repository.close(); ReportingUtils.report(progressable, repository.stats()); } initialized = false; } }
protected void doClose(Progressable progressable) { if (log.isTraceEnabled()) { log.trace(String.format("Closing RecordWriter [%s][%s]", uri, resource)); } if (beat != null) { beat.stop(); } if (repository != null) { repository.close(); ReportingUtils.report(progressable, repository.stats()); } initialized = false; } }
@Override public void close() throws IOException { try { if (log.isDebugEnabled()) { log.debug(String.format("Closing RecordReader for [%s]", esSplit)); } if (beat != null) { beat.stop(); } if (scrollQuery != null) { scrollQuery.close(); } if (client != null) { client.close(); } } finally { Stats stats = new Stats(); if (client != null) { stats.aggregate(client.stats()); client = null; } if (scrollQuery != null) { stats.aggregate(scrollQuery.stats()); scrollQuery = null; } ReportingUtils.report(progressable, stats); } }
@Override public void close() throws IOException { try { if (log.isDebugEnabled()) { log.debug(String.format("Closing RecordReader for [%s]", esSplit)); } if (beat != null) { beat.stop(); } if (scrollQuery != null) { scrollQuery.close(); } if (client != null) { client.close(); } } finally { Stats stats = new Stats(); if (client != null) { stats.aggregate(client.stats()); client = null; } if (scrollQuery != null) { stats.aggregate(scrollQuery.stats()); scrollQuery = null; } ReportingUtils.report(progressable, stats); } }
@Override public void close() throws IOException { try { if (log.isDebugEnabled()) { log.debug(String.format("Closing RecordReader for [%s]", esSplit)); } if (beat != null) { beat.stop(); } if (scrollQuery != null) { scrollQuery.close(); } if (client != null) { client.close(); } } finally { Stats stats = new Stats(); if (client != null) { stats.aggregate(client.stats()); client = null; } if (scrollQuery != null) { stats.aggregate(scrollQuery.stats()); scrollQuery = null; } ReportingUtils.report(progressable, stats); } }
@Override public void close() throws IOException { try { if (log.isDebugEnabled()) { log.debug(String.format("Closing RecordReader for [%s]", esSplit)); } if (beat != null) { beat.stop(); } if (scrollQuery != null) { scrollQuery.close(); } if (client != null) { client.close(); } } finally { Stats stats = new Stats(); if (client != null) { stats.aggregate(client.stats()); client = null; } if (scrollQuery != null) { stats.aggregate(scrollQuery.stats()); scrollQuery = null; } ReportingUtils.report(progressable, stats); } }
@Override public void sourceCleanup(FlowProcess<Properties> flowProcess, SourceCall<Object[], ScrollQuery> sourceCall) throws IOException { // in case of a source there's no local client so do all reporting here report(sourceCall.getInput().stats(), flowProcess); report(sourceCall.getInput().repository().stats(), flowProcess); sourceCall.getInput().close(); sourceCall.setContext(null); // used for consistency cleanupClient(flowProcess); }