class MetaStoreRestApi {

  @GET
  @Path("/table/count")
  @SubmarineApi
  public Response getTableCount() {
    int tableCount;
    try {
      tableCount = submarineMetaStore.getTableCount();
    } 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<Integer>(Response.Status.OK)
            .success(true).result(tableCount).build();
  }

  @Inject public  MetaStoreRestApi();

}