hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/web/client/OzoneRestClient.java
public void deleteVolume(String volumeName) throws OzoneException {
    HttpDelete httpDelete = null;
    try (CloseableHttpClient httpClient = newHttpClient()) {
      OzoneUtils.verifyResourceName(volumeName);
      URIBuilder builder = new URIBuilder(endPointURI);
      builder.setPath("/" + volumeName).build();

      httpDelete = getHttpDelete(builder.toString());
      executeDeleteVolume(httpDelete, httpClient);
    } catch (IOException | URISyntaxException | IllegalArgumentException ex) {
      throw new OzoneRestClientException(ex.getMessage(), ex);
    } finally {
      releaseConnection(httpDelete);
    }
  }
/**
     * delete a given volume.
     *
     * @param volumeName - volume to be deleted.
     * @throws OzoneException - Ozone Exception
     */
delete a given volume.
@param volumeName - volume to be deleted.
@throws OzoneException - Ozone Exception
delete a given volume . @param volumeName - volume to be deleted . @throws OzoneException - Ozone Exception
public void deleteVolume(String volumeName) throws OzoneException {
    HttpDelete httpDelete = null;
    try (CloseableHttpClient httpClient = newHttpClient()) {
      OzoneUtils.verifyResourceName(volumeName);
      URIBuilder builder = new URIBuilder(endPointURI);
      builder.setPath("/" + volumeName).build();
      httpDelete = getHttpDelete(builder.toString());
      executeDeleteVolume(httpDelete, httpClient);
    } catch (IOException | URISyntaxException | IllegalArgumentException ex) {
      throw new OzoneRestClientException(ex.getMessage(), ex);
    } finally {
      releaseConnection(httpDelete);
    }
  }
public void deleteVolume ( String volumeName ) throws OzoneException { HttpDelete httpDelete = null ; try ( CloseableHttpClient httpClient = newHttpClient ( ) ) { OzoneUtils . verifyResourceName ( volumeName ) ; URIBuilder builder = new URIBuilder ( endPointURI ) ; builder . setPath ( "/" + volumeName ) . build ( ) ; httpDelete = getHttpDelete ( builder . toString ( ) ) ; executeDeleteVolume ( httpDelete , httpClient ) ; } catch ( IOException | URISyntaxException | IllegalArgumentException ex ) { throw new OzoneRestClientException ( ex . getMessage ( ) , ex ) ; } finally { releaseConnection ( httpDelete ) ; } }
delete a given volume.
delete a given volume .