code: byte[] getValue(String key, int value) {
      byte[] valueBytes = null;
      Class<?> clazz = JobHistoryKeys.KEY_TYPES.get(JobHistoryKeys.valueOf(key));
      if (clazz == null) {
        throw new IllegalArgumentException(" unknown key " + key + " encountered while parsing "
            + this.jobKey);
      }
      if (Long.class.equals(clazz)) {
        valueBytes = (value != 0L) ? Bytes.toBytes(new Long(value)) : Constants.ZERO_LONG_BYTES;
      } else {
        valueBytes = (value != 0) ? Bytes.toBytes(value) : Constants.ZERO_INT_BYTES;
      }
      return valueBytes;
    }
docs: gets the int values as ints or longs some keys in 2.0 are now int, they were longs in 1.0 this
  will maintain compatiblity between 1.0 and 2.0 by casting those ints to long
  
  keeping this function package level visible (unit testing)
  @throws IllegalArgumentException if new key is encountered