544545546547548549550551552
} } private static JsonCodec<ViewDefinition> createTestingViewCodec() { ObjectMapperProvider provider = new ObjectMapperProvider(); provider.setJsonDeserializers(ImmutableMap.<Class<?>, JsonDeserializer<?>>of(Type.class, new TypeDeserializer(new TypeRegistry()))); return new JsonCodecFactory(provider).jsonCodec(ViewDefinition.class); }
125126127128129130131132133134135
sqlTaskManager = new SqlTaskManager( planner, new MockLocationFactory(), taskExecutor, new QueryMonitor(new ObjectMapperProvider().get(), new NullEventClient(), new NodeInfo("test")), new TaskManagerConfig()); tableScanNodeId = new PlanNodeId("tableScan"); testFragment = new PlanFragment( new PlanFragmentId("fragment"),
269270271272273274275276277278279
{ sqlTaskManager = new SqlTaskManager( planner, new MockLocationFactory(), taskExecutor, new QueryMonitor(new ObjectMapperProvider().get(), new NullEventClient(), new NodeInfo("test")), new TaskManagerConfig().setInfoMaxAge(new Duration(5, TimeUnit.MILLISECONDS))); TaskInfo taskInfo = sqlTaskManager.updateTask(session, taskId, testFragment,
151152153154155156157158
new DataSize(32, Unit.MEGABYTE), taskExecutor, taskNotificationExecutor, new DataSize(256, Unit.MEGABYTE), new DataSize(8, Unit.MEGABYTE), new QueryMonitor(new ObjectMapperProvider().get(), new NullEventClient(), new NodeInfo("test")), false); }
126127128129130131132133134135136
270271272273274275276277278279280
152153154155156157158159
333435363738394041
public CodecSupplier(Class<T> clazz, Metadata metadata) { this.clazz = clazz; this.metadata = metadata; ObjectMapperProvider objectMapperProvider = new ObjectMapperProvider(); objectMapperProvider.setJsonDeserializers(ImmutableMap.<Class<?>, JsonDeserializer<?>>of(Type.class, new TypeDeserializer())); this.codecFactory = new JsonCodecFactory(objectMapperProvider); }