You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "AnonHxy (via GitHub)" <gi...@apache.org> on 2023/09/04 08:59:01 UTC
[GitHub] [pulsar] AnonHxy opened a new pull request, #21119: [refactor][broker] Add BundleDataResources
AnonHxy opened a new pull request, #21119:
URL: https://github.com/apache/pulsar/pull/21119
### Motivation
Add `BundleDataResources` to unify the actions about handle bundle-date. For details reason:
https://github.com/apache/pulsar/pull/21078#discussion_r1308129685
https://github.com/apache/pulsar/pull/21078#issuecomment-1704524226
### Modifications
Add `BundleDataResources`
### Verifying this change
- [x] Make sure that the change passes the CI checks.
### Documentation
<!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
- [ ] `doc` <!-- Your PR contains doc changes. -->
- [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
- [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-complete` <!-- Docs have been already added -->
### Matching PR in forked repository
PR in forked repository: <!-- ENTER URL HERE -->
<!--
After opening this PR, the build in apache/pulsar will fail and instructions will
be provided for opening a PR in the PR author's forked repository.
apache/pulsar pull requests should be first tested in your own fork since the
apache/pulsar CI based on GitHub Actions has constrained resources and quota.
GitHub Actions provides separate quota for pull requests that are executed in
a forked repository.
The tests will be run in the forked repository until all PR review comments have
been handled, the tests pass and the PR is approved by a reviewer.
-->
--
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
Re: [PR] [refactor][broker] PIP-301 Part-1: Add BundleDataResources [pulsar]
Posted by "AnonHxy (via GitHub)" <gi...@apache.org>.
AnonHxy merged PR #21119:
URL: https://github.com/apache/pulsar/pull/21119
--
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
[GitHub] [pulsar] mattisonchao commented on a diff in pull request #21119: [refactor][broker] Add BundleDataResources
Posted by "mattisonchao (via GitHub)" <gi...@apache.org>.
mattisonchao commented on code in PR #21119:
URL: https://github.com/apache/pulsar/pull/21119#discussion_r1314655019
##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/resources/BundleDataResources.java:
##########
@@ -0,0 +1,64 @@
+/*
+ * 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.pulsar.broker.resources;
+
+import com.google.common.annotations.VisibleForTesting;
+import java.util.Optional;
+import java.util.concurrent.CompletableFuture;
+import org.apache.pulsar.common.naming.NamespaceName;
+import org.apache.pulsar.metadata.api.MetadataStore;
+import org.apache.pulsar.policies.data.loadbalancer.BundleData;
+
+public class BundleDataResources extends BaseResources<BundleData> {
Review Comment:
I agree with this refactoring. Maybe we should start a discussion about the naming. :) I prefer "loadbalancerxxxx"
Plus, should we raise a PIP for this refactoring?
--
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
[GitHub] [pulsar] AnonHxy closed pull request #21119: [refactor][broker] Add BundleDataResources
Posted by "AnonHxy (via GitHub)" <gi...@apache.org>.
AnonHxy closed pull request #21119: [refactor][broker] Add BundleDataResources
URL: https://github.com/apache/pulsar/pull/21119
--
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
[GitHub] [pulsar] AnonHxy commented on a diff in pull request #21119: [refactor][broker] Add BundleDataResources
Posted by "AnonHxy (via GitHub)" <gi...@apache.org>.
AnonHxy commented on code in PR #21119:
URL: https://github.com/apache/pulsar/pull/21119#discussion_r1314685005
##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/resources/BundleDataResources.java:
##########
@@ -0,0 +1,64 @@
+/*
+ * 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.pulsar.broker.resources;
+
+import com.google.common.annotations.VisibleForTesting;
+import java.util.Optional;
+import java.util.concurrent.CompletableFuture;
+import org.apache.pulsar.common.naming.NamespaceName;
+import org.apache.pulsar.metadata.api.MetadataStore;
+import org.apache.pulsar.policies.data.loadbalancer.BundleData;
+
+public class BundleDataResources extends BaseResources<BundleData> {
Review Comment:
OK. I will start a PIP later
--
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
[GitHub] [pulsar] AnonHxy commented on pull request #21119: [refactor][broker] PIP-301 Part-1: Add BundleDataResources
Posted by "AnonHxy (via GitHub)" <gi...@apache.org>.
AnonHxy commented on PR #21119:
URL: https://github.com/apache/pulsar/pull/21119#issuecomment-1734725066
@Technoboy- @codelipenghui @congbobo184 @mattisonchao PTAL
--
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
[GitHub] [pulsar] codecov-commenter commented on pull request #21119: [refactor][broker] PIP-301 Part-1: Add BundleDataResources
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #21119:
URL: https://github.com/apache/pulsar/pull/21119#issuecomment-1734681210
## [Codecov](https://app.codecov.io/gh/apache/pulsar/pull/21119?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
> Merging [#21119](https://app.codecov.io/gh/apache/pulsar/pull/21119?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (0fda81b) into [master](https://app.codecov.io/gh/apache/pulsar/commit/5c9b72a9880cfe6f09c28de910a1be2f7f139085?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (5c9b72a) will **increase** coverage by `48.37%`.
> Report is 2 commits behind head on master.
> The diff coverage is `81.69%`.
[](https://app.codecov.io/gh/apache/pulsar/pull/21119?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #21119 +/- ##
=============================================
+ Coverage 24.85% 73.23% +48.37%
- Complexity 197 32393 +32196
=============================================
Files 1696 1888 +192
Lines 130448 140170 +9722
Branches 14252 15428 +1176
=============================================
+ Hits 32429 102653 +70224
+ Misses 92949 29430 -63519
- Partials 5070 8087 +3017
```
| [Flag](https://app.codecov.io/gh/apache/pulsar/pull/21119/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [inttests](https://app.codecov.io/gh/apache/pulsar/pull/21119/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `24.14% <65.51%> (?)` | |
| [systests](https://app.codecov.io/gh/apache/pulsar/pull/21119/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `24.77% <28.16%> (-0.09%)` | :arrow_down: |
| [unittests](https://app.codecov.io/gh/apache/pulsar/pull/21119/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `72.52% <81.69%> (?)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Files](https://app.codecov.io/gh/apache/pulsar/pull/21119?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [.../pulsar/broker/resources/LoadBalanceResources.java](https://app.codecov.io/gh/apache/pulsar/pull/21119?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWJyb2tlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3B1bHNhci9icm9rZXIvcmVzb3VyY2VzL0xvYWRCYWxhbmNlUmVzb3VyY2VzLmphdmE=) | `100.00% <100.00%> (ø)` | |
| [...he/pulsar/broker/resources/NamespaceResources.java](https://app.codecov.io/gh/apache/pulsar/pull/21119?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWJyb2tlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3B1bHNhci9icm9rZXIvcmVzb3VyY2VzL05hbWVzcGFjZVJlc291cmNlcy5qYXZh) | `80.14% <ø> (+41.41%)` | :arrow_up: |
| [...pache/pulsar/broker/admin/impl/NamespacesBase.java](https://app.codecov.io/gh/apache/pulsar/pull/21119?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9hZG1pbi9pbXBsL05hbWVzcGFjZXNCYXNlLmphdmE=) | `72.84% <100.00%> (+61.22%)` | :arrow_up: |
| [...g/apache/pulsar/broker/admin/impl/TenantsBase.java](https://app.codecov.io/gh/apache/pulsar/pull/21119?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9hZG1pbi9pbXBsL1RlbmFudHNCYXNlLmphdmE=) | `96.45% <100.00%> (+61.70%)` | :arrow_up: |
| [...roker/loadbalance/impl/ModularLoadManagerImpl.java](https://app.codecov.io/gh/apache/pulsar/pull/21119?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9sb2FkYmFsYW5jZS9pbXBsL01vZHVsYXJMb2FkTWFuYWdlckltcGwuamF2YQ==) | `81.60% <100.00%> (+24.46%)` | :arrow_up: |
| [...rg/apache/pulsar/broker/web/PulsarWebResource.java](https://app.codecov.io/gh/apache/pulsar/pull/21119?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci93ZWIvUHVsc2FyV2ViUmVzb3VyY2UuamF2YQ==) | `64.76% <100.00%> (+34.41%)` | :arrow_up: |
| [...e/pulsar/io/elasticsearch/ElasticSearchClient.java](https://app.codecov.io/gh/apache/pulsar/pull/21119?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWlvL2VsYXN0aWMtc2VhcmNoL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9wdWxzYXIvaW8vZWxhc3RpY3NlYXJjaC9FbGFzdGljU2VhcmNoQ2xpZW50LmphdmE=) | `78.82% <100.00%> (+78.82%)` | :arrow_up: |
| [...pache/pulsar/broker/resources/PulsarResources.java](https://app.codecov.io/gh/apache/pulsar/pull/21119?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWJyb2tlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3B1bHNhci9icm9rZXIvcmVzb3VyY2VzL1B1bHNhclJlc291cmNlcy5qYXZh) | `84.78% <75.00%> (+1.06%)` | :arrow_up: |
| [...che/pulsar/io/elasticsearch/ElasticSearchSink.java](https://app.codecov.io/gh/apache/pulsar/pull/21119?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWlvL2VsYXN0aWMtc2VhcmNoL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9wdWxzYXIvaW8vZWxhc3RpY3NlYXJjaC9FbGFzdGljU2VhcmNoU2luay5qYXZh) | `75.75% <55.55%> (+75.75%)` | :arrow_up: |
... and [1540 files with indirect coverage changes](https://app.codecov.io/gh/apache/pulsar/pull/21119/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
--
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
[GitHub] [pulsar] mattisonchao commented on a diff in pull request #21119: [refactor][broker] Add BundleDataResources
Posted by "mattisonchao (via GitHub)" <gi...@apache.org>.
mattisonchao commented on code in PR #21119:
URL: https://github.com/apache/pulsar/pull/21119#discussion_r1314655019
##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/resources/BundleDataResources.java:
##########
@@ -0,0 +1,64 @@
+/*
+ * 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.pulsar.broker.resources;
+
+import com.google.common.annotations.VisibleForTesting;
+import java.util.Optional;
+import java.util.concurrent.CompletableFuture;
+import org.apache.pulsar.common.naming.NamespaceName;
+import org.apache.pulsar.metadata.api.MetadataStore;
+import org.apache.pulsar.policies.data.loadbalancer.BundleData;
+
+public class BundleDataResources extends BaseResources<BundleData> {
Review Comment:
I agree with this refactoring. Maybe we should start a discussion about the naming. :)
Plus, should we raise a PIP for this refactoring?
--
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