Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[INLONG-1570] Provide a more elegant way to set the parameter of config #1578

Merged
merged 1 commit into from
Sep 23, 2021

Conversation

TszKitLo40
Copy link
Contributor

Signed-off-by: Zijie Lu wslzj40@gmail.com

Title Name: [INLONG-XYZ][component] Title of the pull request

where XYZ should be replaced by the actual issue number.

Fixes #1570

Motivation

Explain here the context, and why you're making that change. What is the problem you're trying to solve.

Modifications

Describe the modifications you've done.

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

Documentation

  • Does this pull request introduce a new feature? (yes / no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
  • If a feature is not applicable for documentation, explain why?
  • If a feature is not documented yet in this PR, please create a followup issue for adding the documentation

@codecov-commenter
Copy link

codecov-commenter commented Sep 20, 2021

Codecov Report

Merging #1578 (52ccb6c) into INLONG-25 (67ceecd) will decrease coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@              Coverage Diff               @@
##             INLONG-25   #1578      +/-   ##
==============================================
- Coverage         7.51%   7.48%   -0.03%     
  Complexity         479     479              
==============================================
  Files              267     267              
  Lines            29500   29500              
  Branches          4843    4843              
==============================================
- Hits              2216    2209       -7     
- Misses           26810   26816       +6     
- Partials           474     475       +1     
Impacted Files Coverage Δ
.../java/org/apache/flume/sink/tubemq/TubemqSink.java 51.42% <0.00%> (-4.00%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 67ceecd...52ccb6c. Read the comment docs.

Copy link
Contributor

@gosonzhang gosonzhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@@ -744,3 +752,15 @@ func (c *consumer) closeAllBrokers() {
}
log.Infof("[CONSUMER] closeAllBrokers end, client=%s", c.clientID)
}

// Invoke implementation of TubeMQ consumer.
func (c *consumer) Invoke(config *config.Config, opts ...config.Option) (Consumer, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you can use NewConfig(opts ..config.Option) *config.Config is a good idea.
And use NewConsumer(config *config.Config) to start.

@dockerzhang dockerzhang changed the title [INLONG-1570]Provide a more elegant way to set the parameter of config [INLONG-1570] Provide a more elegant way to set the parameter of config Sep 22, 2021
@gosonzhang gosonzhang merged commit 080d60e into apache:INLONG-25 Sep 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants