Skip to content

[fix][broker] Extract additional servlets to the default directory by… - #17477

Merged
codelipenghui merged 4 commits into
apache:masterfrom
andrasbeni:17472
Sep 22, 2022
Merged

[fix][broker] Extract additional servlets to the default directory by…#17477
codelipenghui merged 4 commits into
apache:masterfrom
andrasbeni:17472

Conversation

@andrasbeni

Copy link
Copy Markdown
Contributor

… default

Fixes #17472

Motivation

AdditionalServlets.load does not use the default value of narExtractionDirectory when the property is set to an empty string (which is the default in conf/broker.conf).

Modifications

Similar to FieldParser.update, empty string and null are made equivalent to AdditionalServlets.

Verifying this change

  • Make sure that the change passes the CI checks.

This change can be verified as follows:

  1. Create an AdditionalServlet implementation.
  2. Configure the broker to use it.
  3. Leave narExtractionDirectory in the broker.conf the default (empty string)
  4. Start the broker.
  5. Check /tmp/pulsar-nar for the extracted nar file

Does this pull request potentially affect one of the following parts:

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API: (no)
  • The schema: (no)
  • The default values of configurations: (no)
  • The wire protocol: ( no)
  • The rest endpoints: (no)
  • The admin cli options: (no)
  • Anything that affects deployment: (no)

Documentation

Check the box below or label this PR directly.

Need to update docs?

  • doc-not-needed
    This is a bugfix

@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Sep 5, 2022
import java.util.Map;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;

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.

Please use org.apache.commons.lang3.StringUtils instead of org.apache.commons.lang.StringUtils

@codelipenghui codelipenghui added this to the 2.12.0 milestone Sep 6, 2022
@andrasbeni

Copy link
Copy Markdown
Contributor Author

/pulsarbot rerun-failure-checks

@andrasbeni

Copy link
Copy Markdown
Contributor Author

/pulsarbot run-failure-checks

1 similar comment
@andrasbeni

Copy link
Copy Markdown
Contributor Author

/pulsarbot run-failure-checks

@andrasbeni andrasbeni closed this Sep 14, 2022
@andrasbeni andrasbeni reopened this Sep 14, 2022
@andrasbeni

Copy link
Copy Markdown
Contributor Author

@codelipenghui , do I need to rebase this PR and test it in my own fork, or can it be merged without all that?

@congbobo184 congbobo184 added the cherry-picked/branch-2.9 Archived: 2.9 is end of life label Nov 14, 2022
congbobo184 pushed a commit that referenced this pull request Dec 7, 2022
liangyepianzhou pushed a commit that referenced this pull request Dec 13, 2022
nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request Jan 10, 2023
nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/broker cherry-picked/branch-2.9 Archived: 2.9 is end of life cherry-picked/branch-2.10 cherry-picked/branch-2.11 doc-not-needed Your PR changes do not impact docs release/2.9.4 release/2.10.3 type/bug The PR fixed a bug or issue reported a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Additional servlets are extracted to wrong directory when narExtractionDirectory is not set

7 participants