You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "poorbarcode (via GitHub)" <gi...@apache.org> on 2023/03/30 03:24:57 UTC

[GitHub] [pulsar] poorbarcode commented on a diff in pull request #19913: [fix][broker]Make LedgerOffloaderFactory compatible with old version.

poorbarcode commented on code in PR #19913:
URL: https://github.com/apache/pulsar/pull/19913#discussion_r1152689729


##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/LedgerOffloaderFactory.java:
##########
@@ -42,20 +42,39 @@
     boolean isDriverSupported(String driverName);
 
     /**
-     * Create a ledger offloader with the provided configuration, user-metadata and scheduler.
+     * Create a ledger offloader with the provided configuration, user-metadata, scheduler and offloaderStats.
      *
      * @param offloadPolicies offload policies
      * @param userMetadata user metadata
      * @param scheduler scheduler
      * @return the offloader instance
      * @throws IOException when fail to create an offloader
      */
+    default T create(OffloadPoliciesImpl offloadPolicies,
+             Map<String, String> userMetadata,
+             OrderedScheduler scheduler)
+            throws IOException {
+        return create(offloadPolicies, userMetadata, scheduler, null);

Review Comment:
   After this change, Is it possible to throw a NullPointerEx using the variable `offloaderStats`?
   



-- 
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: commits-unsubscribe@pulsar.apache.org

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