Package co.cask.cdap.proto

Examples of co.cask.cdap.proto.RunRecord


    }
  }

  public void recordProgramStart(String accountId, String appId, String programId, String pid, long startTs) {
    write(new Key.Builder().add(TYPE_RUN_RECORD_STARTED, accountId, appId, programId, pid).build(),
          new RunRecord(pid, startTs));
  }
View Full Code Here


  }

  public void recordProgramStop(String accountId, String appId, String programId,
                                String pid, long stopTs, String endStatus) {
    Key key = new Key.Builder().add(TYPE_RUN_RECORD_STARTED, accountId, appId, programId, pid).build();
    RunRecord started = get(key, RunRecord.class);
    if (started == null) {
      String msg = String.format("No meta for started run record for account %s app %s program %s pid %s exists",
                                 accountId, appId, programId, pid);
      LOG.error(msg);
      throw new IllegalArgumentException(msg);
    }

    deleteAll(key);

    key = new Key.Builder()
      .add(TYPE_RUN_RECORD_COMPLETED, accountId, appId, programId)
      .add(getInvertedTsKeyPart(started.getStartTs()))
      .add(pid).build();
    write(key, new RunRecord(started, stopTs, endStatus));
  }
View Full Code Here

TOP

Related Classes of co.cask.cdap.proto.RunRecord

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.