Skip to content

Commit 04891b3

Browse files
committed
update code example
1 parent be8273e commit 04891b3

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

RFC-0012-thrift-serialization-for-task-updates.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,30 @@ public class Split {
5151

5252
#### For Polymorphic Types e.g. ConnectorSplit
5353
```java
54+
55+
public class HandleJsonModule
56+
implements Module
57+
{
58+
@Override
59+
public void configure(Binder binder)
60+
{
61+
jsonBinder(binder).addModuleBinding().to(TableHandleJacksonModule.class);
62+
jsonBinder(binder).addModuleBinding().to(TableLayoutHandleJacksonModule.class);
63+
jsonBinder(binder).addModuleBinding().to(ColumnHandleJacksonModule.class);
64+
jsonBinder(binder).addModuleBinding().to(SplitJacksonModule.class);
65+
jsonBinder(binder).addModuleBinding().to(OutputTableHandleJacksonModule.class);
66+
jsonBinder(binder).addModuleBinding().to(InsertTableHandleJacksonModule.class);
67+
jsonBinder(binder).addModuleBinding().to(DeleteTableHandleJacksonModule.class);
68+
jsonBinder(binder).addModuleBinding().to(IndexHandleJacksonModule.class);
69+
jsonBinder(binder).addModuleBinding().to(TransactionHandleJacksonModule.class);
70+
jsonBinder(binder).addModuleBinding().to(PartitioningHandleJacksonModule.class);
71+
jsonBinder(binder).addModuleBinding().to(FunctionHandleJacksonModule.class);
72+
jsonBinder(binder).addModuleBinding().to(MetadataUpdateJacksonModule.class);
73+
74+
binder.bind(HandleResolver.class).in(Scopes.SINGLETON);
75+
}
76+
}
77+
5478
// A handle resolver to return the correct type info in runtime
5579
public HandleResolver()
5680
{

0 commit comments

Comments
 (0)