private void updateNormalMetrics(int writeCount) { int readCount = currentChunkStatus.getItemsTouchedInCurrentChunk(); int filterCount = readCount - writeCount; if (readCount < 0 || filterCount < 0 || writeCount < 0) { throw new IllegalStateException("Somehow one of the metrics was zero. Read count: " + readCount + ", Filter count: " + filterCount + ", Write count: " + writeCount); } runtimeStepExecution.getMetric(MetricImpl.MetricType.COMMIT_COUNT).incValue(); runtimeStepExecution.getMetric(MetricImpl.MetricType.READ_COUNT).incValueBy(readCount); runtimeStepExecution.getMetric(MetricImpl.MetricType.FILTER_COUNT).incValueBy(filterCount); runtimeStepExecution.getMetric(MetricImpl.MetricType.WRITE_COUNT).incValueBy(writeCount); }
private void incrementMetrics() { rse.getMetric(MetricImpl.MetricType.READ_COUNT).incValue(); rse.getMetric(MetricImpl.MetricType.WRITE_COUNT).incValue(); rse.getMetric(MetricImpl.MetricType.FILTER_COUNT).incValue(); rse.getMetric(MetricImpl.MetricType.COMMIT_COUNT).incValue(); rse.getMetric(MetricImpl.MetricType.READ_SKIP_COUNT).incValue(); rse.getMetric(MetricImpl.MetricType.PROCESS_SKIP_COUNT).incValue(); rse.getMetric(MetricImpl.MetricType.WRITE_SKIP_COUNT).incValue(); rse.getMetric(MetricImpl.MetricType.ROLLBACK_COUNT).incValue(); }
private void rollbackAfterRetryableException() { writerProxy.close(); readerProxy.close(); callChunkListenerOnError(currentChunkStatus.getRetryableException()); transactionManager.rollback(); stepContext.getMetric(MetricImpl.MetricType.ROLLBACK_COUNT).incValue(); }
private void updateNormalMetrics(int writeCount) { int readCount = currentChunkStatus.getItemsTouchedInCurrentChunk(); int filterCount = readCount - writeCount; if (readCount < 0 || filterCount < 0 || writeCount < 0) { throw new IllegalStateException("Somehow one of the metrics was zero. Read count: " + readCount + ", Filter count: " + filterCount + ", Write count: " + writeCount); } stepContext.getMetric(MetricImpl.MetricType.COMMIT_COUNT).incValue(); stepContext.getMetric(MetricImpl.MetricType.READ_COUNT).incValueBy(readCount); stepContext.getMetric(MetricImpl.MetricType.FILTER_COUNT).incValueBy(filterCount); stepContext.getMetric(MetricImpl.MetricType.WRITE_COUNT).incValueBy(writeCount); }
stepContext.getMetric(MetricImpl.MetricType.FILTER_COUNT).incValue(); status.setFiltered(true); if (processedItem == null) { stepContext.getMetric(MetricImpl.MetricType.FILTER_COUNT).incValue(); status.setFiltered(true); rollbackRetry = true; stepContext.getMetric(MetricImpl.MetricType.ROLLBACK_COUNT).incValue(); stepContext.getMetric(MetricImpl.MetricType.PROCESS_SKIP_COUNT).incValue(); if (skipProcessException(e, itemRead)) { status.setSkipped(true); stepContext.getMetric(MetricImpl.MetricType.PROCESS_SKIP_COUNT).incValue(); } else if (retryProcessException(e, itemRead)) { if (!retryHandler.isRollbackException(e)) { if (processedItem == null) { stepContext.getMetric(MetricImpl.MetricType.FILTER_COUNT).incValue(); status.setFiltered(true); rollbackRetry = true; stepContext.getMetric(MetricImpl.MetricType.ROLLBACK_COUNT).incValue();
private void rollbackAfterRetryableException(int currentChunk) { JoblogUtil.logToJobLogAndTraceOnly(Level.FINE, "chunk.rollback.and.retry", new Object[] { runtimeStepExecution.getStepName(), getJobInstanceId(), getJobExecutionId(), runtimeStepExecution.getMetrics() }, logger); writerProxy.close(); readerProxy.close(); callChunkListenerOnError(currentChunkStatus.getRetryableException()); getTransactionManager().rollback(); runtimeStepExecution.getMetric(MetricImpl.MetricType.ROLLBACK_COUNT).incValue(); }
stepContext.getMetric(MetricImpl.MetricType.READ_COUNT).incValue(); rollbackRetry = true; stepContext.getMetric(MetricImpl.MetricType.ROLLBACK_COUNT).incValue(); stepContext.getMetric(MetricImpl.MetricType.READ_SKIP_COUNT).incValue(); stepContext.getMetric(MetricImpl.MetricType.READ_SKIP_COUNT).incValue(); status.setRollback(true); stepContext.getMetric(MetricImpl.MetricType.ROLLBACK_COUNT).incValue();
stepContext.getMetric(MetricImpl.MetricType.ROLLBACK_COUNT).incValue(); } finally { transactionManager.rollback();
runtimeStepExecution.getMetric(MetricImpl.MetricType.PROCESS_SKIP_COUNT).incValue(); } else { throw new BatchContainerRuntimeException(e); if (skipProcessException(e, itemRead)) { currentItemStatus.setSkipped(true); runtimeStepExecution.getMetric(MetricImpl.MetricType.PROCESS_SKIP_COUNT).incValue(); } else if (retryProcessException(e, itemRead)) {
runtimeStepExecution.getMetric(MetricImpl.MetricType.ROLLBACK_COUNT).incValue();