gaoran10 commented on a change in pull request #11490:
URL: https://github.com/apache/pulsar/pull/11490#discussion_r681464789



##########
File path: 
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/MetaStoreImpl.java
##########
@@ -47,9 +54,31 @@
     private final MetadataStore store;
     private final OrderedExecutor executor;
 
+    public static final short MAGIC_MANAGED_LEDGER_INFO_METADATA = 0x0b9c;
+    private final CompressionType compressionType;
+
     public MetaStoreImpl(MetadataStore store, OrderedExecutor executor) {
         this.store = store;
         this.executor = executor;
+        this.compressionType = CompressionType.NONE;
+    }
+
+    public MetaStoreImpl(MetadataStore store, OrderedExecutor executor, String 
compressionType) {
+        this.store = store;
+        this.executor = executor;
+        CompressionType finalCompressionType;
+        if (compressionType != null) {
+            try {
+                finalCompressionType = 
CompressionType.valueOf(compressionType);
+            } catch (Exception e) {
+                log.warn("Failed to get compression type {}, disable 
managedLedgerInfo compression, error msg: {}.",

Review comment:
       Ok, I'll throw the exception.




-- 
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