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

Ianoc/configure set converter #1400

Merged
merged 5 commits into from
Aug 3, 2015
Merged

Ianoc/configure set converter #1400

merged 5 commits into from
Aug 3, 2015

Conversation

ianoc
Copy link
Collaborator

@ianoc ianoc commented Aug 3, 2015

Allows using the object to set the configuration of which deserializer is being used.


conf.set(ConfigBinaryConverterProvider.ProviderConfKey, ExternalizerSerializer.inj(extern))

LzoGenericScheme.setConverter(conv, conf)
Copy link
Contributor

Choose a reason for hiding this comment

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

So we don't want to set the converter here when it's already been set earlier. I'm guessing this is because we want it to be configurable via the new method, before this scheme code is executed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Exactly, if something else has gotten there first and wanted to set how the deserialization between the two fixed types is done we don't want to override. I'd view this as the default path per say.

Use case so far is that I can swap out different thrift implementations for testing by setting this param

@rubanm
Copy link
Contributor

rubanm commented Aug 3, 2015

LGTM

ianoc added a commit that referenced this pull request Aug 3, 2015
@ianoc ianoc merged commit 410ffc3 into develop Aug 3, 2015
@ianoc ianoc deleted the ianoc/configureSetConverter branch August 3, 2015 18:38
if ((conf.get(ConfigBinaryConverterProvider.ProviderConfKey) == null) || overrideConf) {
val extern = Externalizer(conv)
try {
ExternalizerSerializer.inj.invert(ExternalizerSerializer.inj(extern)).get
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should move this to ExternalizerSerialization.testRoundTrip(i: Any): Try[Unit]

@ianoc ianoc mentioned this pull request Aug 10, 2015
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.

3 participants