/** * <p>getUpdatesCompleted</p> * * @return a long. */ @Override public long getUpdatesCompleted() { if (getStatsStatus()) { return getRrdStrategy().getUpdatesCompleted(); } else { return 0; } }
@Override Object process(Object rrd) throws Exception { // open the file if we need to if (rrd == null) rrd = m_delegate.openFile(getFileName()); final String update = (String) getData(); try { // process the update m_delegate.updateFile(rrd, "", update); } catch (final Throwable e) { final String error = String.format("Error processing update for file %s: %s", getFileName(), update); m_log.debug(error, e); throw new Exception(error, e); } // keep stats setUpdatesCompleted(getUpdatesCompleted() + 1); if (getUpdatesCompleted() % m_modulus == 0) { logStats(); } // return the open rrd for further processing return rrd; }
@Override Object process(Object rrd) throws Exception { // open the file if we need to if (rrd == null) rrd = m_delegate.openFile(getFileName()); final String update = (String) getData(); try { // process the update m_delegate.updateFile(rrd, "", update); } catch (final Throwable e) { final String error = String.format("Error processing update for file %s: %s", getFileName(), update); m_log.debug(error, e); throw new Exception(error, e); } // keep stats setUpdatesCompleted(getUpdatesCompleted() + 1); if (getUpdatesCompleted() % m_modulus == 0) { logStats(); } // return the open rrd for further processing return rrd; }
@Override Object process(Object rrd) throws Exception { long ts = getFirstTimeStamp(); for (int i = 0; i < count; i++) { // open the file if we need to if (rrd == null) rrd = m_delegate.openFile(getFileName()); String update = ts + ":0"; try { // process the update m_delegate.updateFile(rrd, "", update); } catch (Throwable e) { throw new Exception("Error processing update " + i + " for file " + getFileName() + ": " + update, e); } ts += getInterval(); // keep stats setUpdatesCompleted(getUpdatesCompleted() + 1); if (getUpdatesCompleted() % m_modulus == 0) { logStats(); } } return rrd; }
@Override Object process(Object rrd) throws Exception { long ts = getFirstTimeStamp(); for (int i = 0; i < count; i++) { // open the file if we need to if (rrd == null) rrd = m_delegate.openFile(getFileName()); String update = ts + ":0"; try { // process the update m_delegate.updateFile(rrd, "", update); } catch (Throwable e) { throw new Exception("Error processing update " + i + " for file " + getFileName() + ": " + update, e); } ts += getInterval(); // keep stats setUpdatesCompleted(getUpdatesCompleted() + 1); if (getUpdatesCompleted() % m_modulus == 0) { logStats(); } } return rrd; }
", updatesCompleted=" + getUpdatesCompleted() + ", errors=" + getErrors() + ", promotionRate=" + ((double) (getPromotionCount() * 1000.0 / totalElapsedMillis)) +
", updatesCompleted=" + getUpdatesCompleted() + ", errors=" + getErrors() + ", promotionRate=" + ((double) (getPromotionCount() * 1000.0 / totalElapsedMillis)) +