@Test public void testEncodedRunId() { JobKeyConverter conv = new JobKeyConverter(); long now = System.currentTimeMillis(); byte[] encoded = Bytes.toBytes(Long.MAX_VALUE - now); Bytes.putBytes(encoded, encoded.length-Constants.SEP_BYTES.length, Constants.SEP_BYTES, 0, Constants.SEP_BYTES.length); long badId = Long.MAX_VALUE - Bytes.toLong(encoded); LOG.info("Bad run ID is "+badId); JobIdConverter idConv = new JobIdConverter(); byte[] encodedKey = ByteUtil.join(Constants.SEP_BYTES, Bytes.toBytes("c1@local"), Bytes.toBytes("user1"), Bytes.toBytes("app1"), encoded, idConv.toBytes(new JobId("job_20120101000000_0001"))); JobKey key = conv.fromBytes(encodedKey); assertEquals("c1@local", key.getCluster()); assertEquals("user1", key.getUserName()); assertEquals("app1", key.getAppId()); assertEquals("job_20120101000000_0001", key.getJobId().getJobIdString()); }
public JobId getJobId() { return jobId; }
JobKey extends FlowKey implements Comparable<Object> { public JobId getJobId() { return jobId; } }
JobKey extends FlowKey implements Comparable<Object> { public JobId getJobId() { return jobId; } JobKey(String cluster, String userName, String appId, long runId,
      String jobId); @JsonCreator  JobKey(@JsonProperty("cluster") String cluster,
                @JsonProperty("userName") String userName,
                @JsonProperty("appId") String appId,
                @JsonProperty("runId") long runId,
                @JsonProperty("jobId") JobId jobId);  JobKey(QualifiedJobId qualifiedJobId, String userName, String appId,
      long runId);  JobKey(JobDesc jobDesc); }
JobKey extends FlowKey implements Comparable<Object> { public JobId getJobId() { return jobId; } JobKey(String cluster, String userName, String appId, long runId,
      String jobId); @JsonCreator  JobKey(@JsonProperty("cluster") String cluster,
                @JsonProperty("userName") String userName,
                @JsonProperty("appId") String appId,
                @JsonProperty("runId") long runId,
                @JsonProperty("jobId") JobId jobId);  JobKey(QualifiedJobId qualifiedJobId, String userName, String appId,
      long runId);  JobKey(JobDesc jobDesc); QualifiedJobId getQualifiedJobId(); JobId getJobId(); String toString(); @Override int compareTo(Object other); @Override boolean equals(Object other); @Override int hashCode(); }
JobKey extends FlowKey implements Comparable<Object> { public JobId getJobId() { return jobId; } JobKey(String cluster, String userName, String appId, long runId,
      String jobId); @JsonCreator  JobKey(@JsonProperty("cluster") String cluster,
                @JsonProperty("userName") String userName,
                @JsonProperty("appId") String appId,
                @JsonProperty("runId") long runId,
                @JsonProperty("jobId") JobId jobId);  JobKey(QualifiedJobId qualifiedJobId, String userName, String appId,
      long runId);  JobKey(JobDesc jobDesc); QualifiedJobId getQualifiedJobId(); JobId getJobId(); String toString(); @Override int compareTo(Object other); @Override boolean equals(Object other); @Override int hashCode();  }