poorbarcode opened a new issue #3132:
URL: https://github.com/apache/bookkeeper/issues/3132


   **FEATURE REQUEST**
   
   ````
   // Def a log
   DistributedLogManager logManager = namespace.openLog(“default/example/v0.1”);
   // Write 
   DLOutputStream.openWriterAsync( logManager )
   .thenCompose(dlOutputStream -> dlOutputStream.writeAsync(inputStream)).get();
   
   // Delte it 
   namespace.getNamespaceDriver()
       .getLogMetadataStore()
       .getLogLocation(“default/example/v0.1”)
       .thenCompose(uri -> uri.map(value -> namespace.getNamespaceDriver()
                                                                                
        .getLogStreamMetadataStore(NamespaceDriver.Role.WRITER)
                                                                                
        .deleteLog(value, path)
       );
   ````
   
   After deleted, there has an dirty zk-node:  default/example
   
   I think there should has a safe way to remove nodes, just like this: 
   
   ````
   /**
    * Delete the metadata of a log, this method will not delete any child node,
    * When {@param streamName} is not empty, delete nothing.
    *
    * @param uri the location to store the metadata of the log
    * @param streamName the name of the log stream
    * @return When delete finish return {@link Boolean#TRUE};
    *         when {@param streamName} not exists return {@link Boolean#TRUE}
    *         when delete nothing return {@link Boolean#FALSE}
    */
   CompletableFuture<Boolean> deleteLogUnRecursive(URI uri, final String 
streamName);
   ````
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to