class MetaStoreRestApi {

  @GET
  @Path("/table/list")
  @SubmarineApi
  public Response listTables(@QueryParam("database") String databaseName) {
    List<String> tables;
    try {
      tables = submarineMetaStore.getAllTables(databaseName);
    } catch (MetaException e) {
      LOG.error(e.getMessage(), e);
      return new JsonResponse.Builder<String>(Response.Status.INTERNAL_SERVER_ERROR)
              .success(false).build();
    }
    return new JsonResponse.Builder<List<String>>(Response.Status.OK)
            .success(true).result(tables).build();
  }

  @Inject public  MetaStoreRestApi();

}