src/main/java/org/apache/hadoop/hdfs/server/namenode/analytics/web/NamenodeAnalyticsMethods.java
@GET
  @Path("/quotas")
  @Produces(MediaType.APPLICATION_JSON)
  public Response quotas() {
    try {
      final NameNodeLoader nnLoader = (NameNodeLoader) context.getAttribute(NNA_NN_LOADER);
      before();
      boolean allJson = request.getParameterMap().containsKey("all");
      String sum = request.getParameter("sum");
      String resp;
      if (allJson) {
        resp = nnLoader.getSuggestionsEngine().getAllQuotasAsJson(sum);
      } else {
        String user = request.getParameter("user");
        resp = nnLoader.getSuggestionsEngine().getQuotaAsJson(user, sum);
      }
      return Response.ok(resp, MediaType.APPLICATION_JSON).build();
    } catch (Exception ex) {
      return handleException(ex);
    } finally {
      after();
    }
  }
/**
   * QUOTAS endpoint is a reader-level endpoint meant to dump the cached set of detected quotas by
   * NNA.
   */
QUOTAS endpoint is a reader-level endpoint meant to dump the cached set of detected quotas by
NNA.
QUOTAS endpoint is a reader - level endpoint meant to dump the cached set of detected quotas by NNA .
@GET
  @Path("/quotas")
  @Produces(MediaType.APPLICATION_JSON)
  public Response quotas() {
    try {
      final NameNodeLoader nnLoader = (NameNodeLoader) context.getAttribute(NNA_NN_LOADER);
      before();
      boolean allJson = request.getParameterMap().containsKey("all");
      String sum = request.getParameter("sum");
      String resp;
      if (allJson) {
        resp = nnLoader.getSuggestionsEngine().getAllQuotasAsJson(sum);
      } else {
        String user = request.getParameter("user");
        resp = nnLoader.getSuggestionsEngine().getQuotaAsJson(user, sum);
      }
      return Response.ok(resp, MediaType.APPLICATION_JSON).build();
    } catch (Exception ex) {
      return handleException(ex);
    } finally {
      after();
    }
  }
@ GET @ Path ( "/quotas" ) @ Produces ( MediaType . APPLICATION_JSON ) public Response quotas ( ) { try { final NameNodeLoader nnLoader = ( NameNodeLoader ) context . getAttribute ( NNA_NN_LOADER ) ; before ( ) ; boolean allJson = request . getParameterMap ( ) . containsKey ( "all" ) ; String sum = request . getParameter ( "sum" ) ; String resp ; if ( allJson ) { resp = nnLoader . getSuggestionsEngine ( ) . getAllQuotasAsJson ( sum ) ; } else { String user = request . getParameter ( "user" ) ; resp = nnLoader . getSuggestionsEngine ( ) . getQuotaAsJson ( user , sum ) ; } return Response . ok ( resp , MediaType . APPLICATION_JSON ) . build ( ) ; } catch ( Exception ex ) { return handleException ( ex ) ; } finally { after ( ) ; } }
QUOTAS endpoint is a reader-level endpoint meant to dump the cached set of detected quotas by
 NNA.
QUOTAS endpoint is a reader - level endpoint meant to dump the cached set of detected quotas by NNA .