@Override
    public void onCompletion(Void result, Exception exception) {
      long processingStartTimeMs = SystemTime.getInstance().milliseconds();
      metrics.getPeersSecurityPostProcessRequestTimeInMs.update(processingStartTimeMs - operationStartTimeMs);
      ReadableStreamChannel channel = null;
      try {
        if (exception == null) {
          DataNodeId dataNodeId = getDataNodeId(restRequest);
          LOGGER.trace("Getting peer hosts for {}:{}", dataNodeId.getHostname(), dataNodeId.getPort());
          Set<DataNodeId> peerDataNodeIds = new HashSet<>();
          List<? extends ReplicaId> replicaIdList = clusterMap.getReplicaIds(dataNodeId);
          for (ReplicaId replicaId : replicaIdList) {
            List<? extends ReplicaId> peerReplicaIds = replicaId.getPeerReplicaIds();
            for (ReplicaId peerReplicaId : peerReplicaIds) {
              peerDataNodeIds.add(peerReplicaId.getDataNodeId());
            }
          }
          channel = getResponseBody(peerDataNodeIds);
          restResponseChannel.setHeader(RestUtils.Headers.DATE, new GregorianCalendar().getTime());
          restResponseChannel.setHeader(RestUtils.Headers.CONTENT_TYPE, RestUtils.JSON_CONTENT_TYPE);
          restResponseChannel.setHeader(RestUtils.Headers.CONTENT_LENGTH, channel.getSize());
        }
      } catch (Exception e) {
        exception = e;
      } finally {
        metrics.getPeersProcessingTimeInMs.update(SystemTime.getInstance().milliseconds() - processingStartTimeMs);
        callback.onCompletion(exception == null ? channel : null, exception);
      }
    }
If {@code exception} is null, gathers all the peers of the datanode that corresponds to the params in the request
and returns them as a JSON with the field {@link #PEERS_FIELD_NAME} whose value is a JSON array of objects with
fields {@link #NAME_QUERY_PARAM} and {@link #PORT_QUERY_PARAM}.
@param result The result of the request. This would be non null when the request executed successfully
@param exception The exception that was reported on execution of the request
ambry-frontend/src/main/java/com/github/ambry/frontend/GetPeersHandler.java