Source:
<code>public History createHistory(final JPAEntity entity, final String message, final JobStatus jobStatus, final long executionTime) { requireNotDisposed(); SystemAssert.requireArgument(entity != null, "entity cannot be null."); SystemAssert.requireArgument(jobStatus != null, "jobStatus cannot be null."); long creationTime = System.currentTimeMillis(); String rowKey = new StringBuilder(entity.getId().toString()). append(ROWKEY_SEPARATOR). <START> append(_9sComplement(creationTime)). <END> append(ROWKEY_SEPARATOR). append(jobStatus). toString(); _logger.info("Creatiing history with row key: {}", rowKey); History history = new History(message, SystemConfiguration.getHostname(), entity.getId(), jobStatus, executionTime, creationTime); try { byte[] value = _mapper.writeValueAsBytes(Arrays.asList(history)); final PutRequest put = new PutRequest(TABLENAME, Bytes.toBytes(rowKey), COLUMN_FAMILY, COLUMN_QUALIFIER, value); Deferred<Object> deferred = _client.put(put); deferred.addCallback(new Callback<Object, Object>() { @Override public Object call(Object arg) throws Exception { _logger.trace(MessageFormat.format("Put to {0} successful.", TABLENAME)); return null; } }); deferred.addErrback(new Callback<Object, Exception>() { @Override public Object call(Exception e) throws Exception { throw new SystemException("Error occured while trying to execute put().", e); } }); if(_syncPut) { deferred.join(10000); } } catch (JsonProcessingException e) { _logger.warn("Failed to parse history object to bytes.", e); return null; } catch (InterruptedException e) { _logger.warn("Interrupted while waiting for put to finish.", e); return null; } catch (Exception e) { _logger.error("Exception while trying to create history.", e); throw new SystemException(e); } return history; }</code><technical_language>advantage do get convertion 9'scomplement for long timestamp</technical_language>

Target:
public History createHistory(final JPAEntity entity, final String message, final JobStatus jobStatus, final long executionTime) { requireNotDisposed(); SystemAssert.requireArgument(entity != null, "entity cannot be null."); SystemAssert.requireArgument(jobStatus != null, "jobStatus cannot be null."); long creationTime = System.currentTimeMillis(); String rowKey = new StringBuilder(entity.getId().toString()). append(ROWKEY_SEPARATOR). append(_9sComplement(creationTime)). append(ROWKEY_SEPARATOR). append(jobStatus). toString(); _logger.debug("Creating history with row key: {}", rowKey); History history = new History(message, SystemConfiguration.getHostname(), entity.getId(), jobStatus, executionTime, creationTime); try { byte[] value = _mapper.writeValueAsBytes(Arrays.asList(history)); final PutRequest put = new PutRequest(TABLENAME, Bytes.toBytes(rowKey), COLUMN_FAMILY, COLUMN_QUALIFIER, value); Deferred<Object> deferred = _client.put(put); deferred.addCallback(new Callback<Object, Object>() { @Override public Object call(Object arg) throws Exception { _logger.trace(MessageFormat.format("Put to {0} successful.", TABLENAME)); return null; } }); deferred.addErrback(new Callback<Object, Exception>() { @Override public Object call(Exception e) throws Exception { throw new SystemException("Error occured while trying to execute put().", e); } }); if(_syncPut) { deferred.join(PUT_TIMEOUT_MS); } } catch (JsonProcessingException e) { _logger.warn("Failed to parse history object to bytes.", e); return null; } catch (InterruptedException e) { _logger.warn("Interrupted while waiting for put to finish.", e); return null; } catch (Exception e) { _logger.error("Exception while trying to create history.", e); throw new SystemException(e); } return history; }