This is an automated email from the ASF dual-hosted git repository.

sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git


The following commit(s) were added to refs/heads/master by this push:
     new 42e7780  DLog Namespace#openLog should declare LogNotFoundException
42e7780 is described below

commit 42e77802c025964d826c3b57e8f18c4bc464c481
Author: Ivan Kelly <[email protected]>
AuthorDate: Sun Apr 28 04:06:24 2019 +0200

    DLog Namespace#openLog should declare LogNotFoundException
    
    Other methods such as delete do, so openLog should declare it to be
    consistent and to give users a hint that it can be caught.
    
    
    Reviewers: Enrico Olivelli <[email protected]>
    
    This closes #2072 from ivankelly/dl-openlog-ex
---
 .../java/org/apache/distributedlog/api/namespace/Namespace.java     | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/stream/distributedlog/core/src/main/java/org/apache/distributedlog/api/namespace/Namespace.java
 
b/stream/distributedlog/core/src/main/java/org/apache/distributedlog/api/namespace/Namespace.java
index 712295d..1b2a787 100644
--- 
a/stream/distributedlog/core/src/main/java/org/apache/distributedlog/api/namespace/Namespace.java
+++ 
b/stream/distributedlog/core/src/main/java/org/apache/distributedlog/api/namespace/Namespace.java
@@ -128,10 +128,11 @@ public interface Namespace extends AutoCloseable{
      *          name of the log
      * @return distributedlog manager instance.
      * @throws InvalidStreamNameException if log name is invalid.
+     * @throws LogNotFoundException if log doesn't exist.
      * @throws IOException when encountered issues with backend.
      */
     DistributedLogManager openLog(String logName)
-            throws InvalidStreamNameException, IOException;
+            throws InvalidStreamNameException, LogNotFoundException, 
IOException;
 
     /**
      * Open a log named <i>logName</i> with specific log configurations.
@@ -149,13 +150,14 @@ public interface Namespace extends AutoCloseable{
      *          dynamic log configuration
      * @return distributedlog manager instance.
      * @throws InvalidStreamNameException if log name is invalid.
+     * @throws LogNotFoundException if log doesn't exist.
      * @throws IOException when encountered issues with backend.
      */
     DistributedLogManager openLog(String logName,
                                   Optional<DistributedLogConfiguration> 
logConf,
                                   Optional<DynamicDistributedLogConfiguration> 
dynamicLogConf,
                                   Optional<StatsLogger> perStreamStatsLogger)
-            throws InvalidStreamNameException, IOException;
+            throws InvalidStreamNameException, LogNotFoundException, 
IOException;
 
     /**
      * Check whether the log <i>logName</i> exist.

Reply via email to