code: public List<VersionInfo> getDistinctVersions(String cluster, String user,
        String appId) throws IOException {
      Get get = new Get(getRowKey(cluster, user, appId));
      List<VersionInfo> versions = Lists.newArrayList();
      Long ts = 0L;
      Table versionsTable = null;
      try {
        versionsTable = hbaseConnection
            .getTable(TableName.valueOf(Constants.HISTORY_APP_VERSION_TABLE));
        Result r = versionsTable.get(get);
        if (r != null && !r.isEmpty()) {
          for (Cell c : r.listCells()) {
            ts = 0L;
            try {
              ts = Bytes.toLong(CellUtil.cloneValue(c));
              versions.add(new VersionInfo(
                  Bytes.toString(CellUtil.cloneQualifier(c)), ts));
            } catch (IllegalArgumentException e1) {
              // Bytes.toLong may throw IllegalArgumentException, although
              // unlikely.
              LOG.error(
                  "Caught conversion error while converting timestamp to long value "
                      + e1.getMessage());
              // rethrow the exception in order to propagate it
              throw e1;
            }
          }
        }
  
        if (versions.size() > 0) {
          Collections.sort(versions);
        }
      } finally {
        if (versionsTable != null) {
          versionsTable.close();
        }
      }
  
      return versions;
    }
docs: Returns the list of distinct versions for the given application sorted in
  reverse chronological order
  
  @param cluster
  @param user
  @param appId
  @return the list of versions sorted in reverse chronological order (the
  list will be empty if no versions are found)
  @throws IOException