Exemplo n.º 1
0
  private void runNewCode(NoSqlEntityManager mgr, PlayOrmCronJob mon) {
    TableMonitor tableMon = TableMonitor.copy(mon);
    if (log.isInfoEnabled()) log.info("monitor firing(new version)=" + tableMon);

    String tableName = tableMon.getTableName();
    RawProcessor p = new RawProcessor(true);
    VisitorInfo visitor = new VisitorInfo(null, null, true, mgr);
    String path = "rawdataV1/" + tableName + "/0/null";
    HashMap<String, String> options = new HashMap<String, String>();
    p.init(path, null, visitor, options);

    DateTime now = new DateTime();
    ReadResult res = p.read();
    if (res.isEndOfStream()) {
      fireEmailStreamIsDown("new", null, now, tableMon);
      return;
    }

    TSRelational row = res.getRow();
    long timestamp = row.getTime();

    runDataCheck("new", tableMon, now, timestamp);
  }