Skip to content

Conversation

@nicoloboschi
Copy link
Contributor

@nicoloboschi nicoloboschi commented Aug 23, 2022

Fixes #16688

TL; DR - now Pulsar shell works on Windows
Screen Shot 2022-08-23 at 6 02 50 PM

Motivation

Currently pulsar shell is only runnable on Unix system because the entry point script is written in bash.

Modifications

  1. Provided a new pulsar-shell.cmd, pulsar-admin.cmd, pulsar-client.cmd and pulsar-perf.cmd files (written in Windows Command Prompt language) that starts their processes

It implements the exact same configurations from the current pulsar-shell, even the java8 detection. The only thing not implemented is the on-the-fly compile. Actually, the batch script only work if you unzip the distro tarball. Running it from the codebase (so without the lib dir) is not supported (and it's okay since currently it's not even possible develop Pulsar on a Win machine)

  1. Added the jna lib to make the jline command prompt display colors correctly - will need to upgrade to the latest JNA version to fix some current issues

  2. Added zip distribution to pulsar-shell (distribution/shell). The idea is to distribute both and suggest to download the .zip for Windows user

  • doc-not-needed

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.

#16688 refers also to pulsar-admin.
this patch does not completely fixes that issue.

Also we should do this also for pulsar-admin, pulsar-client, pulsar-perf and pulsar standalone

@nicoloboschi nicoloboschi changed the title [improve][cli] Pulsar shell: support for Windows [improve][cli] Pulsar shell, Pulsar admin and Pulsar client: support for Windows Aug 24, 2022
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

great work !

@eolivelli
Copy link
Contributor

@eolivelli license check is failing

@nicoloboschi nicoloboschi changed the title [improve][cli] Pulsar shell, Pulsar admin and Pulsar client: support for Windows [improve][cli] Pulsar shell, Pulsar admin, Pulsar client and Pulsar perf: support for Windows Aug 25, 2022
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Aug 25, 2022
@nicoloboschi nicoloboschi force-pushed the pulsar-shell-windows branch 4 times, most recently from 7c6929a to c77668a Compare August 29, 2022 12:47
@nicoloboschi nicoloboschi reopened this Aug 29, 2022
Copy link
Member

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

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

I don't have a Windows environment to verify these scripts, though.

nicoloboschi added a commit to datastax/pulsar that referenced this pull request Aug 30, 2022
@nicoloboschi nicoloboschi merged commit 2e6c53e into apache:master Aug 30, 2022
@nicoloboschi nicoloboschi deleted the pulsar-shell-windows branch August 30, 2022 17:15
@zymap zymap added this to the 2.11.0 milestone Sep 5, 2022
set "OPTS=%OPTS% -Dpulsar.routing.appender.default=%PULSAR_ROUTING_APPENDER_DEFAULT%"

:error
exit /b 1
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you add this line? I cannot use pulsar-shell on Windows unless I removed this line.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's a leftover, we can drop it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows support for admin CLI tools

6 participants