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

[testclient] Make --payload-file take effect in PerformanceClient #12187

Merged
merged 2 commits into from
Oct 12, 2021
Merged

[testclient] Make --payload-file take effect in PerformanceClient #12187

merged 2 commits into from
Oct 12, 2021

Conversation

yuruguo
Copy link
Contributor

@yuruguo yuruguo commented Sep 25, 2021

Motivation

The option --payload-file is just defined but does not work in PerformanceClient, this PR supports to use payload from a file instead of empty buffer.

Modifications

  • Add option --payload-delimiter, --format-payload, and --format-class
  • produceSocket sends payloadData

Documentation

Need to update docs

  • doc-required

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

Lgtm

Thanks

Copy link
Member

@Anonymitaet Anonymitaet left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution. Does this affect only master or other versioned docs?
If latter, could you please help update all affected versions? Thanks

@yuruguo
Copy link
Contributor Author

yuruguo commented Sep 26, 2021

Thanks for your contribution. Does this affect only master or other versioned docs?
If latter, could you please help update all affected versions? Thanks

This only affects master branch because they are new options.
please add doc label for this PR, thx!

}
} else {
for (int i = 0; i < payloadBytes.length; ++i) {
payloadBytes[i] = (byte) (random.nextInt(26) + 65);
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this 65?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The value of the payloadBytes is from A to Z and the ASCII of A-Z is 65 - 90, so we need to add 65.

Copy link
Contributor

@k2la k2la Sep 28, 2021

Choose a reason for hiding this comment

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

I see.
I think it would be easier for developers to understand that if 65 is replaced with a constant or if comments are added.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have added a comment to explain about 65.

@Anonymitaet Anonymitaet added the doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. label Sep 30, 2021
@Anonymitaet Anonymitaet added this to the 2.9.0 milestone Oct 12, 2021
@Anonymitaet Anonymitaet merged commit 1ae131a into apache:master Oct 12, 2021
@yuruguo
Copy link
Contributor Author

yuruguo commented Oct 12, 2021

@Anonymitaet Thank you for merging this PR, please also assign it to me and mark the corresponding label (component/tools).

@Anonymitaet
Copy link
Member

@yuruguo done

@yuruguo
Copy link
Contributor Author

yuruguo commented Oct 13, 2021

@yuruguo done

thx :)

zeo1995 pushed a commit to zeo1995/pulsar that referenced this pull request Oct 14, 2021
* up/master: (26 commits)
  [pulsar-admin] Allow setting --forward-source-message-property to false when updating a pulsar function (apache#12128)
  [website][upgrade]feat: docs migration - Development (apache#12320)
  Update delete inactive topic configuration documentation (apache#12350)
  [PIP 95][Issue 12040][broker] Multiple bind addresses for Pulsar protocol (apache#12056)
  Added Debezium Source for MS SQL Server (apache#12256)
  Fix: flaky oracle tests (apache#12306)
  [C++] Use URL encoded content type for OAuth 2.0 authentication (apache#12341)
  [C++] Handle OAuth 2.0 exceptional cases gracefully (apache#12335)
  feat(cli): add restart command to pulsar-daemon (apache#12279)
  [client-tools] Remove redundant initial value (apache#12296)
  Make AuthenticationTokenTest to run on windows (apache#12329)
  [offload] fix FileSystemManagedLedgerOffloader can not cleanup outdated ledger data (apache#12309)
  [Doc]--Update contents for Pulsar adaptor for Apache Spark (apache#12338)
  [PIP 95][Issue 12040][broker] Improved multi-listener in standalone mode (apache#12066)
  [website][upgrade]feat: docs migration - Cookbooks (apache#12319)
  [testclient] Make --payload-file take effect in PerformanceClient (apache#12187)
  [website][upgrade]feat: docs migration - adaptor (apache#12318)
  [pulsar-client] Add partition-change api for producer/consumer interceptors (apache#12287)
  [Transaction]Fix lowWaterMark of TopicTransactionBuffer (apache#12312)
  [pulsar-admin] New option takes precedence over deprecated option (apache#12260)
  ...

# Conflicts:
#	site2/website-next/docusaurus.config.js
#	site2/website-next/versions.json
bharanic-dev pushed a commit to bharanic-dev/pulsar that referenced this pull request Mar 18, 2022
…ache#12187)

* [testclient] Make --payload-file take effect in PerformanceClient

* [testclient] Make --payload-file take effect in PerformanceClient
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tool doc Your PR contains doc changes, no matter whether the changes are in markdown or code files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants