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

      if (errorCode != HTTP_OK) {
        throw OzoneException.parse(EntityUtils.toString(entity));
      }
    } finally {
      if (entity != null) {
        EntityUtils.consumeQuietly(entity);
      }
    }
  }
/**
   * Delete Volume.
   *
   * @param httpDelete - Http Delete Request
   * @throws IOException
   * @throws OzoneException
   */
Delete Volume.
@param httpDelete - Http Delete Request
@throws IOException
@throws OzoneException
Delete Volume . @param httpDelete - Http Delete Request @throws IOException @throws OzoneException
private void executeDeleteVolume(HttpDelete httpDelete,
      final CloseableHttpClient httpClient)
      throws IOException, OzoneException {
    HttpEntity entity = null;
    try {
      HttpResponse response = httpClient.execute(httpDelete);
      int errorCode = response.getStatusLine().getStatusCode();
      entity = response.getEntity();
      if (errorCode != HTTP_OK) {
        throw OzoneException.parse(EntityUtils.toString(entity));
      }
    } finally {
      if (entity != null) {
        EntityUtils.consumeQuietly(entity);
      }
    }
  }
private void executeDeleteVolume ( HttpDelete httpDelete , final CloseableHttpClient httpClient ) throws IOException , OzoneException { HttpEntity entity = null ; try { HttpResponse response = httpClient . execute ( httpDelete ) ; int errorCode = response . getStatusLine ( ) . getStatusCode ( ) ; entity = response . getEntity ( ) ; if ( errorCode != HTTP_OK ) { throw OzoneException . parse ( EntityUtils . toString ( entity ) ) ; } } finally { if ( entity != null ) { EntityUtils . consumeQuietly ( entity ) ; } } }
Delete Volume.
Delete Volume .