You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/03/13 04:02:49 UTC

[GitHub] [pulsar] murong00 opened a new pull request #6532: [Issue 5902] Support to get managed ledger info of a partitioned topic

murong00 opened a new pull request #6532: [Issue 5902] Support to get managed ledger info of a partitioned topic
URL: https://github.com/apache/pulsar/pull/6532
 
 
   ### Motivation
   
   Fixes #5902
   
   If there is a partitioned topic with too many partitions, users need to get the `internal-info` one by one. If called `internal-info` on a partitioned topic, it fails as below:
   
   ```
   $ bin/pulsar-admin topics info-internal persistent://public/default/test2
   HTTP 400 Bad Request
   
   Reason: HTTP 400 Bad Request
   ```
   
   ### Modifications
   
   Support to get all partitions `internal-info` of a partitioned topic, seems like below:
   
   ```
   $ bin/pulsar-admin topics info-internal persistent://public/default/test2
   {
     "version": 0,
     "partitions": {
       "persistent://public/default/test2-partition-1": {
         "version": 1,
         "creationDate": "2020-03-12T21:24:52.777+08:00",
         "modificationDate": "2020-03-12T21:25:50.85+08:00",
         "ledgers": [
           {
             "ledgerId": 16
           }
         ],
         "cursors": {
           "test2-sub": {
             "version": 0,
             "creationDate": "2020-03-12T21:25:51.178+08:00",
             "modificationDate": "2020-03-12T21:25:51.178+08:00",
             "cursorsLedgerId": 18,
             "markDelete": {
               "ledgerId": 16,
               "entryId": -1
             }
           }
         }
       },
       "persistent://public/default/test2-partition-0": {
         "version": 1,
         "creationDate": "2020-03-12T21:24:52.777+08:00",
         "modificationDate": "2020-03-12T21:25:50.952+08:00",
         "ledgers": [
           {
             "ledgerId": 17
           }
         ],
         "cursors": {
           "test2-sub": {
             "version": 0,
             "creationDate": "2020-03-12T21:25:51.177+08:00",
             "modificationDate": "2020-03-12T21:25:51.177+08:00",
             "cursorsLedgerId": 19,
             "markDelete": {
               "ledgerId": 17,
               "entryId": -1
             }
           }
         }
       }
     }
   }
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar] codelipenghui commented on a change in pull request #6532: [Issue 5902] Support to get managed ledger info of a partitioned topic

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on a change in pull request #6532: [Issue 5902] Support to get managed ledger info of a partitioned topic
URL: https://github.com/apache/pulsar/pull/6532#discussion_r392858181
 
 

 ##########
 File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/PartitionedManagedLedgerInfo.java
 ##########
 @@ -0,0 +1,32 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.bookkeeper.mledger;
+
+import com.google.common.collect.Maps;
+
+import java.util.Map;
+
+public class PartitionedManagedLedgerInfo extends ManagedLedgerInfo {
 
 Review comment:
   It's better to move it to the broker module since the `mledger` does not have any concepts about partition.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar] murong00 commented on issue #6532: [Issue 5902] Support to get managed ledger info of a partitioned topic

Posted by GitBox <gi...@apache.org>.
murong00 commented on issue #6532: [Issue 5902] Support to get managed ledger info of a partitioned topic
URL: https://github.com/apache/pulsar/pull/6532#issuecomment-599833164
 
 
   /pulsarbot run-failure-checks

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar] murong00 commented on a change in pull request #6532: [Issue 5902] Support to get managed ledger info of a partitioned topic

Posted by GitBox <gi...@apache.org>.
murong00 commented on a change in pull request #6532: [Issue 5902] Support to get managed ledger info of a partitioned topic
URL: https://github.com/apache/pulsar/pull/6532#discussion_r392886289
 
 

 ##########
 File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/PartitionedManagedLedgerInfo.java
 ##########
 @@ -0,0 +1,32 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.bookkeeper.mledger;
+
+import com.google.common.collect.Maps;
+
+import java.util.Map;
+
+public class PartitionedManagedLedgerInfo extends ManagedLedgerInfo {
 
 Review comment:
   Done.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar] murong00 commented on issue #6532: [Issue 5902] Support to get managed ledger info of a partitioned topic

Posted by GitBox <gi...@apache.org>.
murong00 commented on issue #6532: [Issue 5902] Support to get managed ledger info of a partitioned topic
URL: https://github.com/apache/pulsar/pull/6532#issuecomment-598581212
 
 
   /pulsarbot run-failure-checks

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar] codelipenghui commented on issue #6532: [Issue 5902] Support to get managed ledger info of a partitioned topic

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on issue #6532: [Issue 5902] Support to get managed ledger info of a partitioned topic
URL: https://github.com/apache/pulsar/pull/6532#issuecomment-599454983
 
 
   /pulsarbot run-failure-checks

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar] sijie merged pull request #6532: [Issue 5902] Support to get managed ledger info of a partitioned topic

Posted by GitBox <gi...@apache.org>.
sijie merged pull request #6532: [Issue 5902] Support to get managed ledger info of a partitioned topic
URL: https://github.com/apache/pulsar/pull/6532
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar] murong00 commented on issue #6532: [Issue 5902] Support to get managed ledger info of a partitioned topic

Posted by GitBox <gi...@apache.org>.
murong00 commented on issue #6532: [Issue 5902] Support to get managed ledger info of a partitioned topic
URL: https://github.com/apache/pulsar/pull/6532#issuecomment-599435384
 
 
   @codelipenghui Please help to review again, thanks.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services