Skip to content

KAFKA-2431: Easier Testing of SSL#217

Closed
benstopford wants to merge 3 commits into
apache:trunkfrom
benstopford:ssl-1
Closed

KAFKA-2431: Easier Testing of SSL#217
benstopford wants to merge 3 commits into
apache:trunkfrom
benstopford:ssl-1

Conversation

@benstopford

Copy link
Copy Markdown
Contributor
  • Allow cipher suites to be specified relevant properties
  • Avoid System.exit in ProducerPerformance so this can be externally invoked
  • Add command line option so that a default properties can be specified in ConsumerPerformance (needed for ssl properties)
  • Allow cipher suites to be specified via properties
  • Increase timeout in ConsumerPerformance (useful when running with SSL under load)
  • Use a relative default value for the reporting interval in Consumer Performance
  • Add option for show-all-stats (includes intermediary and summary stats) in Consumer Performance

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: space between if and (.

Also, I would suggest to do if (!cipherSuitesList.isEmpty()) 😉

@asfbot

asfbot commented Sep 15, 2015

Copy link
Copy Markdown

kafka-trunk-git-pr #428 FAILURE
Looks like there's a problem with this pull request

@asfbot

asfbot commented Sep 15, 2015

Copy link
Copy Markdown

kafka-trunk-git-pr #429 SUCCESS
This pull request looks good

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Out of curiosity, why are we doing the isEmpty check here? We don't do the same check when setting the enabledProtocols. It seems to add noise for little benefit given how this is used.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's because the enabled protocols have a kafka supplied default value. With the cipher suite I left it up to the JVM.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oh I see, if you pass an empty collection, the JDK defaults are no longer used? The change makes sense then. We should probably be using the JDK defaults for enabled protocols by default too IMO, but that can be handled via KAFKA-2456

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes - I agree. I don't think overriding the JVM defaults is a good idea unless there is a specific, documented intent.

@ijuma

ijuma commented Sep 16, 2015

Copy link
Copy Markdown
Member

A few mostly minor comments, the rest looks good. The command-line switch option name is something I think is important to address before merging.

@asfbot

asfbot commented Sep 19, 2015

Copy link
Copy Markdown

kafka-trunk-git-pr #450 SUCCESS
This pull request looks good

@ijuma

ijuma commented Sep 20, 2015

Copy link
Copy Markdown
Member

LGTM

@ijuma

ijuma commented Sep 22, 2015

Copy link
Copy Markdown
Member

@harshach, are you interested in reviewing and merging this PR since you are now a committer? /cc @gwenshap @junrao too

@asfbot

asfbot commented Sep 24, 2015

Copy link
Copy Markdown

kafka-trunk-git-pr #515 SUCCESS
This pull request looks good

@asfbot

asfbot commented Sep 24, 2015

Copy link
Copy Markdown

kafka-trunk-git-pr #516 SUCCESS
This pull request looks good

@asfbot

asfbot commented Sep 24, 2015

Copy link
Copy Markdown

kafka-trunk-git-pr #517 SUCCESS
This pull request looks good

@asfbot

asfbot commented Sep 24, 2015

Copy link
Copy Markdown

kafka-trunk-git-pr #518 FAILURE
Looks like there's a problem with this pull request

@asfbot

asfbot commented Sep 24, 2015

Copy link
Copy Markdown

kafka-trunk-git-pr #519 FAILURE
Looks like there's a problem with this pull request

@asfbot

asfbot commented Sep 24, 2015

Copy link
Copy Markdown

kafka-trunk-git-pr #520 FAILURE
Looks like there's a problem with this pull request

@asfbot

asfbot commented Sep 24, 2015

Copy link
Copy Markdown

kafka-trunk-git-pr #521 FAILURE
Looks like there's a problem with this pull request

@asfbot

asfbot commented Sep 24, 2015

Copy link
Copy Markdown

kafka-trunk-git-pr #522 FAILURE
Looks like there's a problem with this pull request

@asfbot

asfbot commented Sep 24, 2015

Copy link
Copy Markdown

kafka-trunk-git-pr #523 FAILURE
Looks like there's a problem with this pull request

@benstopford

Copy link
Copy Markdown
Contributor Author

tests run locally

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we really need a new option for this? I was a bit surprised that showDetailedStats doesn't show the final result to be honest. You probably did this for compatibility reasons, but it would be good to get a second opinion from @gwenshap or @junrao.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I know exactly what you mean fella. In fact my first reaction was to just change the behaviour, but it's an external interface so people may have coupled to this behaviour. That's why I went down the additional option route.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, I understand. It seems like we don't offer strong compatibility guarantees for these scripts though, see discussion in #242. Do you think that people would actually rely on the fact that there is no additional entry with the overall results at the end?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Quite likely not I expect, but we should overhaul these scripts if we're going down that route. I should add that the way we use jopt a little problematic. We end up overriding the system's default values just because jopt leads you down the line of providing a default value. Lots of the values used don't make much sense. For settings that map directly to kafka properties it would be better if we enforced that mapping explicitly.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I agree with @ijuma . It seems it's simpler to just always print the final result instead of introducing a new option. This is a change of behavior, but it probably matches most people's expectation. ProducerPerformance is already like that.

@benstopford

Copy link
Copy Markdown
Contributor Author

Addressed comments from above. Also added a few other bits:

  • The ability to pass freeform properties of the format key=val,key=val etc. Generally useful but avoids the need for a properties file for SSL
  • Added a header that prints the properties being used (so it's clear what is being overridden as various defaults are hard coded in both ProducerPerformance and ConsumerPerformance and differ from documented defaults)
  • Made linger.ms a command line option for ProducerPerf. This is an important setting.

@asfbot

asfbot commented Sep 29, 2015

Copy link
Copy Markdown

kafka-trunk-git-pr #599 FAILURE
Looks like there's a problem with this pull request

@ijuma

ijuma commented Sep 29, 2015

Copy link
Copy Markdown
Member

Note that this doesn't merge cleanly anymore.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Space after if

@asfbot

asfbot commented Sep 29, 2015

Copy link
Copy Markdown

kafka-trunk-git-pr #600 FAILURE
Looks like there's a problem with this pull request

- Avoid System.exit in ProducerPerformance so this can be externally invoked
- Add command line option so that a default set of properties can be speicfied in ConsumerPerformance (needed for ssl properties)
- Allow cipher suites to be specified via properties
- Increase timeout in ConsumerPerformance (useful when running with SSL under load)
- Use a relative default value for the reporting interval
- Add option for show-all-stats (includes intermediary and summary stats)
@benstopford

Copy link
Copy Markdown
Contributor Author

Addressed comments from @ijuma addressed. Rebased.

@asfbot

asfbot commented Sep 29, 2015

Copy link
Copy Markdown

kafka-trunk-git-pr #601 FAILURE
Looks like there's a problem with this pull request

- paramaterised test-timeout in the consumer so it's a command line option
- added header for Producer/Consumer properties (so it's clear what is being overridden)
- added command line option to Producer/Consumer for freeform properties of the format key=val,key=val etc
- made linger.ms a command line option for ProducerPerf. This is a key setting.
- cleanup based on comments from Jun/Ismael
@asfbot

asfbot commented Sep 29, 2015

Copy link
Copy Markdown

kafka-trunk-git-pr #602 FAILURE
Looks like there's a problem with this pull request

@asfbot

asfbot commented Sep 29, 2015

Copy link
Copy Markdown

kafka-trunk-git-pr #603 FAILURE
Looks like there's a problem with this pull request

@asfbot

asfbot commented Sep 29, 2015

Copy link
Copy Markdown

kafka-trunk-git-pr #609 SUCCESS
This pull request looks good

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just noticed that ConsoleProducer has the following:

    val producerPropertyOpt = parser.accepts("producer-property", "A mechanism to pass user-defined properties in the form key=value to the producer. ")
            .withRequiredArg
            .describedAs("producer_prop")
            .ofType(classOf[String])

And it uses CommandLineUtils.parseKeyValueArgs(options.valuesOf(propertyOpt)). We probably should be using the same naming and parsing code here.

@benstopford benstopford closed this Oct 9, 2015
@benstopford
benstopford deleted the ssl-1 branch October 22, 2015 11:56
efeg pushed a commit to efeg/kafka that referenced this pull request Jan 29, 2020
wyuka pushed a commit to wyuka/kafka that referenced this pull request Jan 21, 2022
…ests (apache#217)

TICKET = LIKAFKA-41598
LI_DESCRIPTION = This extends the existing integration-test framework by adding a "sister tree" of test-harness classes modified for multi-cluster use. (For now, the client side still supports only cluster 0.)
EXIT_CRITERIA = N/A
wyuka pushed a commit to wyuka/kafka that referenced this pull request Mar 16, 2022
…ests (apache#305)

The original commit in 2.4-li branch is
- [LI-HOTFIX] Basic server-side support for multi-cluster integration tests (apache#217)

TICKET = LIKAFKA-41598
LI_DESCRIPTION = This extends the existing integration-test framework by adding a "sister tree" of test-harness classes modified for multi-cluster use. (For now, the client side still supports only cluster 0.)
EXIT_CRITERIA = N/A

Co-authored-by: Greg Roelofs <newt@pobox.com>
wyuka pushed a commit to wyuka/kafka that referenced this pull request Mar 28, 2022
…ests (apache#305)

The original commit in 2.4-li branch is
- [LI-HOTFIX] Basic server-side support for multi-cluster integration tests (apache#217)

TICKET = LIKAFKA-41598
LI_DESCRIPTION = This extends the existing integration-test framework by adding a "sister tree" of test-harness classes modified for multi-cluster use. (For now, the client side still supports only cluster 0.)
EXIT_CRITERIA = N/A

Co-authored-by: Greg Roelofs <newt@pobox.com>
wyuka pushed a commit to wyuka/kafka that referenced this pull request Jun 16, 2022
…ests (apache#305)

The original commit in 2.4-li branch is
- [LI-HOTFIX] Basic server-side support for multi-cluster integration tests (apache#217)

TICKET = LIKAFKA-41598
LI_DESCRIPTION = This extends the existing integration-test framework by adding a "sister tree" of test-harness classes modified for multi-cluster use. (For now, the client side still supports only cluster 0.)
EXIT_CRITERIA = N/A

Co-authored-by: Greg Roelofs <newt@pobox.com>
davide-armand pushed a commit to aiven/kafka that referenced this pull request Dec 1, 2025
jeqo added a commit to aiven/kafka that referenced this pull request Jan 16, 2026
fvaleri pushed a commit to fvaleri/kafka that referenced this pull request Jul 8, 2026
Simplify LME lookup to direct failback only
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants