Skip to content

Commit 9e3dccf

Browse files
authored
Fix duplicate binding for spark (#25729)
## Description 1. Fix duplicate binding for facebook spark ``` 1) [Guice/BindingAlreadySet]: ThriftCodecManager was bound multiple times. Bound at: 1 : PrestoSparkModule.setup(PrestoSparkModule.java:432) 2 : ThriftCodecModule.configure(ThriftCodecModule.java:54) \_ installed by: PrestoFacebookSparkManifoldMetadataStorageModule -> BlobStoreServiceModule -> SmcClientModule -> ThriftCodecModule ``` ## Motivation and Context <!---Why is this change required? What problem does it solve?--> <!---If it fixes an open issue, please link to the issue here.--> ## Impact <!---Describe any public API or user-facing feature change or any performance impact--> ## Test Plan 1. Internal test passed x12384909565983874 3. ## Contributor checklist - [ ] Please make sure your submission complies with our [contributing guide](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md), in particular [code style](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md#code-style) and [commit standards](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md#commit-standards). - [ ] PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced. - [ ] Documented new properties (with its default value), SQL syntax, functions, or other functionality. - [ ] If release notes are required, they follow the [release notes guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines). - [ ] Adequate tests were added if applicable. - [ ] CI passed. ## Release Notes ``` == NO RELEASE NOTE == ```
1 parent e0d3305 commit 9e3dccf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

presto-spark-base/src/main/java/com/facebook/presto/spark/PrestoSparkModule.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import com.facebook.airlift.json.smile.SmileCodec;
2020
import com.facebook.airlift.node.NodeConfig;
2121
import com.facebook.airlift.node.NodeInfo;
22-
import com.facebook.drift.codec.ThriftCodecManager;
22+
import com.facebook.drift.codec.guice.ThriftCodecModule;
2323
import com.facebook.presto.ClientRequestFilterManager;
2424
import com.facebook.presto.GroupByHashPageIndexerFactory;
2525
import com.facebook.presto.PagesIndexPageSorter;
@@ -429,7 +429,7 @@ protected void setup(Binder binder)
429429
binder.bind(PageSourceProvider.class).to(PageSourceManager.class).in(Scopes.SINGLETON);
430430

431431
// for thrift serde
432-
newOptionalBinder(binder, ThriftCodecManager.class).setDefault().toInstance(new ThriftCodecManager());
432+
binder.install(new ThriftCodecModule());
433433
binder.bind(ConnectorCodecManager.class).in(Scopes.SINGLETON);
434434

435435
// page sink provider

0 commit comments

Comments
 (0)