}
protected void setJobState(JobMetadata.Id jobId, String state, String msg) {
MetaGraphTx tx = metaGraphService.newTransaction();
try {
JobMetadata jobMetadata = tx.getJob(jobId);
jobMetadata.setState(state);
jobMetadata.setMessage(msg);
if (state.equals(JobMetadata.DONE)) {
jobMetadata.setProgress(1.0f);
}
tx.commit();
} catch (TitanException e) {
logger.debug("exception", e);