Package edu.berkeley.xtrace

Examples of edu.berkeley.xtrace.TaskID


  public long dataAsOf() {
    return fileCache.lastSynched();
  }

  private TaskRecord readTaskRecord(ResultSet rs) throws SQLException {
    TaskID taskId = TaskID.createFromString(rs.getString("taskId"));
    Date firstSeen = new Date(rs.getTimestamp("firstSeen").getTime());
    Date lastUpdated = new Date(rs.getTimestamp("lastUpdated").getTime());
    String title = rs.getString("title");
    int numReports = rs.getInt("numReports");
    List<String> tags = Arrays.asList(rs.getString("tags").split(","));
View Full Code Here


    @Override
    public void run() {
      LOG.debug("Updating tasklist");
      TaskID[] newList = new TaskID[Math.max(1, reportsPerSecond / reportsPerTask)];
      for (int i = 0; i < newList.length; i++) {
        newList[i] = new TaskID(8);
      }
      taskList.set(newList);
    }
View Full Code Here

        sendReport();
      }
    }
   
    private void sendReport() {
      TaskID id = taskList.get()[rnd.nextInt(taskList.get().length)];
     
      Report r = new Report();
      r.put("X-Trace", new XTraceMetadata(id, 0).toString());
      r.put("Time", (new Date().toString()));
      r.put("Key1", "Value1");
View Full Code Here

    assertNull(kset);
  }

  @Test
  public void testGetMetadata() {
    TaskID task = new TaskID(8);
    XTraceMetadata md = new XTraceMetadata(task, 0);
   
    Report r = new Report();
    r.put("X-Trace", md.toString());
    r.put("Key1", "Value1");
View Full Code Here

    private boolean shouldStop;
    private int numSent;

    Worker() {
      r = new Random();
      task = new TaskID(4);
      shouldStop = false;
    }
View Full Code Here

TOP

Related Classes of edu.berkeley.xtrace.TaskID

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.