hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/web/client/OzoneVolume.java
private void executeDeleteBucket(HttpDelete delRequest,
      CloseableHttpClient httpClient)
      throws IOException, OzoneException {
    HttpEntity entity = null;
    try {
      HttpResponse response = httpClient.execute(delRequest);
      int errorCode = response.getStatusLine().getStatusCode();
      entity = response.getEntity();

      if (errorCode == HTTP_OK) {
        return;
      }

      if (entity == null) {
        throw new OzoneRestClientException("Unexpected null in http payload.");
      }

      throw OzoneException.parse(EntityUtils.toString(entity));

    } finally {
      if (entity != null) {
        EntityUtils.consumeQuietly(entity);
      }
    }
  }
/**
   * Executes delete bucket call.
   *
   * @param delRequest - Delete Request
   * @param httpClient - Http Client
7   *
   * @throws IOException
   * @throws OzoneException
   */
Executes delete bucket call.
@param delRequest - Delete Request
@param httpClient - Http Client
7
@throws IOException
@throws OzoneException
Executes delete bucket call . @param delRequest - Delete Request @param httpClient - Http Client 7 @throws IOException @throws OzoneException
private void executeDeleteBucket(HttpDelete delRequest,
      CloseableHttpClient httpClient)
      throws IOException, OzoneException {
    HttpEntity entity = null;
    try {
      HttpResponse response = httpClient.execute(delRequest);
      int errorCode = response.getStatusLine().getStatusCode();
      entity = response.getEntity();
      if (errorCode == HTTP_OK) {
        return;
      }
      if (entity == null) {
        throw new OzoneRestClientException("Unexpected null in http payload.");
      }
      throw OzoneException.parse(EntityUtils.toString(entity));
    } finally {
      if (entity != null) {
        EntityUtils.consumeQuietly(entity);
      }
    }
  }
private void executeDeleteBucket ( HttpDelete delRequest , CloseableHttpClient httpClient ) throws IOException , OzoneException { HttpEntity entity = null ; try { HttpResponse response = httpClient . execute ( delRequest ) ; int errorCode = response . getStatusLine ( ) . getStatusCode ( ) ; entity = response . getEntity ( ) ; if ( errorCode == HTTP_OK ) { return ; } if ( entity == null ) { throw new OzoneRestClientException ( "Unexpected null in http payload." ) ; } throw OzoneException . parse ( EntityUtils . toString ( entity ) ) ; } finally { if ( entity != null ) { EntityUtils . consumeQuietly ( entity ) ; } } }
Executes delete bucket call.
Executes delete bucket call .