hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/web/client/OzoneVolume.java
public void deleteBucket(String bucketName) throws OzoneException {
    HttpDelete delRequest = null;
    try (CloseableHttpClient httpClient = newHttpClient()) {
      OzoneUtils.verifyResourceName(bucketName);
      URIBuilder builder = new URIBuilder(getClient().getEndPointURI());
      builder.setPath("/" + getVolumeName() + "/" + bucketName).build();

      delRequest = client.getHttpDelete(builder.toString());
      executeDeleteBucket(delRequest, httpClient);

    } catch (IOException | URISyntaxException | IllegalArgumentException ex) {
      throw new OzoneRestClientException(ex.getMessage(), ex);
    } finally {
      releaseConnection(delRequest);
    }
  }
/**
   * Delete an empty bucket.
   *
   * @param bucketName - Name of the bucket to delete
   *
   * @throws OzoneException
   */
Delete an empty bucket.
@param bucketName - Name of the bucket to delete


Delete an empty bucket . @param bucketName - Name of the bucket to delete
public void deleteBucket(String bucketName) throws OzoneException {
    HttpDelete delRequest = null;
    try (CloseableHttpClient httpClient = newHttpClient()) {
      OzoneUtils.verifyResourceName(bucketName);
      URIBuilder builder = new URIBuilder(getClient().getEndPointURI());
      builder.setPath("/" + getVolumeName() + "/" + bucketName).build();
      delRequest = client.getHttpDelete(builder.toString());
      executeDeleteBucket(delRequest, httpClient);
    } catch (IOException | URISyntaxException | IllegalArgumentException ex) {
      throw new OzoneRestClientException(ex.getMessage(), ex);
    } finally {
      releaseConnection(delRequest);
    }
  }
public void deleteBucket ( String bucketName ) throws OzoneException { HttpDelete delRequest = null ; try ( CloseableHttpClient httpClient = newHttpClient ( ) ) { OzoneUtils . verifyResourceName ( bucketName ) ; URIBuilder builder = new URIBuilder ( getClient ( ) . getEndPointURI ( ) ) ; builder . setPath ( "/" + getVolumeName ( ) + "/" + bucketName ) . build ( ) ; delRequest = client . getHttpDelete ( builder . toString ( ) ) ; executeDeleteBucket ( delRequest , httpClient ) ; } catch ( IOException | URISyntaxException | IllegalArgumentException ex ) { throw new OzoneRestClientException ( ex . getMessage ( ) , ex ) ; } finally { releaseConnection ( delRequest ) ; } }
Delete an empty bucket.
Delete an empty bucket .