@Override
  public byte[] toBytes(JobKey jobKey) {
    if (jobKey == null) {
      return Constants.EMPTY_BYTES;
    } else {
      return ByteUtil.join(Constants.SEP_BYTES,
          Bytes.toBytes(jobKey.getCluster()),
          Bytes.toBytes(jobKey.getUserName()),
          Bytes.toBytes(jobKey.getAppId()),
          Bytes.toBytes(jobKey.getEncodedRunId()),
          idConv.toBytes(jobKey.getJobId()));
    }
  }
@ Override public byte [ ] toBytes ( JobKey jobKey ) { if ( jobKey == null ) { return Constants . EMPTY_BYTES ; } else { return ByteUtil . join ( Constants . SEP_BYTES , Bytes . toBytes ( jobKey . getCluster ( ) ) , Bytes . toBytes ( jobKey . getUserName ( ) ) , Bytes . toBytes ( jobKey . getAppId ( ) ) , Bytes . toBytes ( jobKey . getEncodedRunId ( ) ) , idConv . toBytes ( jobKey . getJobId ( ) ) ) ; } }
Returns the byte encoded representation of a JobKey

@param jobKey the JobKey to serialize
@return the byte encoded representation of the JobKey