public Response listTables(String user, String db, String tablePattern)
    throws HcatException, NotAuthorizedException, BusyException,
    ExecuteException, IOException {
    String exec = String.format("use %s; show tables like '%s';",
      db, tablePattern);
    try {
      String res = jsonRun(user, exec);
      return JsonBuilder.create(res)
        .put("database", db)
        .build();
    } catch (HcatException e) {
      throw new HcatException("unable to show tables for: " + tablePattern,
        e.execBean, exec);
    }
  }
Return a json "show table like".  This will return a list of
tables.
hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/HcatDelegator.java