@Override
  public void execute(final TSDB tsdb, final HttpQuery query)
          throws IOException {
    http_requests.incrementAndGet();
    
    // only accept POST
    if (query.method() != HttpMethod.POST) {
      throw new BadRequestException(HttpResponseStatus.METHOD_NOT_ALLOWED,
          "Method not allowed", "The HTTP method [" + query.method().getName() +
          "] is not permitted for this endpoint");
    }

    final List<RollUpDataPoint> dps = query.serializer()
        .parsePutV1(RollUpDataPoint.class, HttpJsonSerializer.TR_ROLLUP);
    processDataPoint(tsdb, query, dps);
  }
@ Override public void execute ( final TSDB tsdb , final HttpQuery query ) throws IOException { http_requests . incrementAndGet ( ) ; if ( query . method ( ) != HttpMethod . POST ) { throw new BadRequestException ( HttpResponseStatus . METHOD_NOT_ALLOWED , "Method not allowed" , "The HTTP method [" + query . method ( ) . getName ( ) + "] is not permitted for this endpoint" ) ; } final List < RollUpDataPoint > dps = query . serializer ( ) . parsePutV1 ( RollUpDataPoint . class , HttpJsonSerializer . TR_ROLLUP ) ; processDataPoint ( tsdb , query , dps ) ; }
Handles HTTP RPC put requests
@param tsdb The TSDB to which we belong
@param query The HTTP query from the user
@throws IOException if there is an error parsing the query or formatting
the output
@throws BadRequestException if the user supplied bad data