You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2022/03/22 07:34:28 UTC

[GitHub] [bookkeeper] poorbarcode opened a new issue #3132: [feature] [distributedlog] The api for delete empty zookeeper node

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: issues-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [bookkeeper] poorbarcode commented on issue #3132: [feature] [distributedlog] The api for delete empty zookeeper node

Posted by GitBox <gi...@apache.org>.
poorbarcode commented on issue #3132:
URL: https://github.com/apache/bookkeeper/issues/3132#issuecomment-1074834453


   I submitted a PR: https://github.com/apache/bookkeeper/pull/3133


-- 
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: issues-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org