src/main/java/org/apache/hadoop/hdfs/server/namenode/analytics/web/NamenodeAnalyticsMethods.java
@GET
  @Path("/history")
  @Produces({MediaType.APPLICATION_JSON})
  public Response history() {
    try {
      final HsqlDriver hsqlDriver = (HsqlDriver) context.getAttribute(NNA_HSQL_DRIVER);
      before();
      String usernameStr = request.getParameter("username");
      String username = (usernameStr == null) ? "" : usernameStr;
      String fromDate = request.getParameter("fromDate");
      String toDate = request.getParameter("toDate");
      return Response.ok(
              hsqlDriver.getAllHistory(fromDate, toDate, username), MediaType.APPLICATION_JSON)
          .build();
    } catch (Exception ex) {
      return handleException(ex);
    } finally {
      after();
    }
  }
/** HISTORY endpoint returns a set of data points from DB-stored suggestion snapshots. */
HISTORY endpoint returns a set of data points from DB-stored suggestion snapshots.
HISTORY endpoint returns a set of data points from DB - stored suggestion snapshots .
@GET
  @Path("/history")
  @Produces({MediaType.APPLICATION_JSON})
  public Response history() {
    try {
      final HsqlDriver hsqlDriver = (HsqlDriver) context.getAttribute(NNA_HSQL_DRIVER);
      before();
      String usernameStr = request.getParameter("username");
      String username = (usernameStr == null) ? "" : usernameStr;
      String fromDate = request.getParameter("fromDate");
      String toDate = request.getParameter("toDate");
      return Response.ok(
              hsqlDriver.getAllHistory(fromDate, toDate, username), MediaType.APPLICATION_JSON)
          .build();
    } catch (Exception ex) {
      return handleException(ex);
    } finally {
      after();
    }
  }
@ GET @ Path ( "/history" ) @ Produces ( { MediaType . APPLICATION_JSON } ) public Response history ( ) { try { final HsqlDriver hsqlDriver = ( HsqlDriver ) context . getAttribute ( NNA_HSQL_DRIVER ) ; before ( ) ; String usernameStr = request . getParameter ( "username" ) ; String username = ( usernameStr == null ) ? "" : usernameStr ; String fromDate = request . getParameter ( "fromDate" ) ; String toDate = request . getParameter ( "toDate" ) ; return Response . ok ( hsqlDriver . getAllHistory ( fromDate , toDate , username ) , MediaType . APPLICATION_JSON ) . build ( ) ; } catch ( Exception ex ) { return handleException ( ex ) ; } finally { after ( ) ; } }
HISTORY endpoint returns a set of data points from DB-stored suggestion snapshots.
HISTORY endpoint returns a set of data points from DB - stored suggestion snapshots .