[GitHub] jvrao commented on a change in pull request #1121: [Merge Yahoo repo]: AsyncReadLastEntry should trigger callback with error when ledger is empty

2018-02-15 Thread GitBox
jvrao commented on a change in pull request #1121: [Merge Yahoo repo]: 
AsyncReadLastEntry should trigger callback with error when ledger is empty
URL: https://github.com/apache/bookkeeper/pull/1121#discussion_r168590070
 
 

 ##
 File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java
 ##
 @@ -787,6 +787,24 @@ public void onFailure(Throwable cause) {
 }
 }
 
+/*
+ * Read the last entry in the ledger
+ *
+ * @param cb
+ *object implementing read callback interface
+ * @param ctx
+ *control object
+ */
+public void asyncReadLastEntry(ReadCallback cb, Object ctx) {
+long lastEntryId = getLastAddConfirmed();
 
 Review comment:
   @sijie is this comment addressed?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jvrao commented on a change in pull request #1121: [Merge Yahoo repo]: AsyncReadLastEntry should trigger callback with error when ledger is empty

2018-02-13 Thread GitBox
jvrao commented on a change in pull request #1121: [Merge Yahoo repo]: 
AsyncReadLastEntry should trigger callback with error when ledger is empty
URL: https://github.com/apache/bookkeeper/pull/1121#discussion_r168089437
 
 

 ##
 File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java
 ##
 @@ -787,6 +787,24 @@ public void onFailure(Throwable cause) {
 }
 }
 
+/*
+ * Read the last entry in the ledger
+ *
+ * @param cb
+ *object implementing read callback interface
+ * @param ctx
+ *control object
+ */
+public void asyncReadLastEntry(ReadCallback cb, Object ctx) {
+long lastEntryId = getLastAddConfirmed();
 
 Review comment:
   +1 on Sijie's comment


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services