Skip to content

Conversation

@rdhabalia
Copy link
Contributor

Motivation

Generalizing PulsarConfigurationLoader helps to load different ServiceConfiguration of BrokerService, DiscoveryService, WebSocketProxy in a generic way without adding additional logic-layer to parse those config.

Modifications

Generalizing "Config" Parsing for all the services such as BrokerService, DiscoveryService, WebSocketProxy

Result

No functionality change.

@yahoocla
Copy link

CLA is valid!

2 similar comments
@yahoocla
Copy link

CLA is valid!

@yahoocla
Copy link

CLA is valid!

@rdhabalia rdhabalia added the type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages label Jan 17, 2017
@rdhabalia rdhabalia added this to the 1.16 milestone Jan 17, 2017
@rdhabalia rdhabalia self-assigned this Jan 17, 2017
Copy link
Contributor

@merlimat merlimat left a comment

Choose a reason for hiding this comment

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

Looks good, just couple of minor comments

Copy link
Contributor

Choose a reason for hiding this comment

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

Are we using the properties anywhere other than when loading the config file ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No. So, made PulsarConfiguration interface and implementation config class will implement it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Should have a create that doesn't take any properties? In general we should try to avoid using System.getProperties() since it can lead to unpredictable tests, depending on what was passed on the command 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.

that's true. Made create(Properties) private and made appropriate test-case changes.

Copy link
Member

@maskit maskit left a comment

Choose a reason for hiding this comment

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

This change looks familiar. It might be a change I sent before?
It looks some of tests doesn't make sense. Should check if the modified test cases are valid.

Copy link
Member

Choose a reason for hiding this comment

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

This test case doesn't test anything about PulsarConfigurationLoader. It should call PulsarConfigurationLoader.create(prop, ServiceConfiguration.class).

Copy link
Member

Choose a reason for hiding this comment

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

This one too. It should use PulsarConfigurationLoader.

Copy link
Member

Choose a reason for hiding this comment

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

I think this class should be renamed to PulsarConfigurationLoaderTest, because ServiceConfigurationLoader is renamed to PulsarConfigurationLoader.

Also, this class was a test class for ServiceConfigurationLoader but not for ServiceConfiguration. I guess this naming mismatch causes a misread, which is the reason why some of test methods are (incorrectly) simply creating a ServiceConfiguration instance without PulsarConfigurationLoader.

@rdhabalia rdhabalia force-pushed the config branch 2 times, most recently from 10f221a to d9b36c6 Compare January 20, 2017 21:25
@rdhabalia
Copy link
Contributor Author

@maskit .. Yes, after introducing separate configs for broker, discovery and websocket service, it makes sense to get the config-generalization change which we missed earlier to bring it here. Also fixed the test-cases for PulsarConfigurationLoader.

Copy link
Member

@maskit maskit 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 the fix. Looks good to me.

Copy link
Contributor

@merlimat merlimat left a comment

Choose a reason for hiding this comment

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

👍

@merlimat merlimat merged commit 616d84f into apache:master Jan 21, 2017
@rdhabalia rdhabalia deleted the config branch June 21, 2017 18:55
sijie added a commit to sijie/pulsar that referenced this pull request Mar 4, 2018
* Improve pulsar functions logging

- inject instance id in thread context. so we can have instance id information in function log
- rename dlog logging to bk logging, so all bk/dlog logging can be routed there
- add more variables to allow overrides by sys variables
- fixes some scripts

* Improve the logic for finding java instance location

* Improve configuring log directory for pulsar worker

* Fix python location

* Fix license header
hrsakai pushed a commit to hrsakai/pulsar that referenced this pull request Dec 10, 2020
hangc0276 pushed a commit to hangc0276/pulsar that referenced this pull request May 26, 2021
…taIfMissing… (apache#168)

* Added a new MetadataUtils with an implementation of createKafkaMetadataIfMissing that coes not overwrite the cluster metadata. Modified several use cases to support the change.
Logic for the createKafkaMetadataIfMissing implementation is as follows:
 - If the tenant does not exist it will be created
 - If the tenant exists but the allowedClusters list does not include the cluster this method will add the cluster to the allowedClusters list
 - If the namespace does not exist it will be created
 - If the namespace exists but the replicationClusters list does not include the cluster this method will add the cluster to the replicationClusters list
 - If the offset topic does not exist it will be created
 - If the offset topic exists but some partitions are missing, the missing partitions will be created

* Fixing checkstyle errors

Co-authored-by: William Mccarley <mccarwi@win.eng.vzwnet.com>
hangc0276 pushed a commit to hangc0276/pulsar that referenced this pull request May 26, 2021
…ache#445)

This case is usually encountered when attempting to use KoP with standalone mode. When new behavior was introduced in apache#168 standalone mode was broken due to sample namespace setup etc not taking place until after the broker is initialized (which in turn initializes protocol handlers).

Fixes apache#185
dlg99 pushed a commit to dlg99/pulsar that referenced this pull request Mar 21, 2023
michaeljmarshall pushed a commit to michaeljmarshall/pulsar that referenced this pull request Apr 4, 2024
…ry (apache#168)

(cherry picked from commit 335ab8a)

 Conflicts:
	tiered-storage/jcloud/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/impl/BlobStoreBackedReadHandleImpl.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants