131132133134135136137138139140141
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"),
275276277278279280281282283284285
{ 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,
525526527528529530531532533
} } 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); }
184185186187188189190
StringResponse response = client.execute(request, createStringResponseHandler()); assertEquals(response.getStatusCode(), 200, response.getBody()); assertContentType(response, JSON_UTF_8); return new ObjectMapperProvider().get().readTree(response.getBody()); }
204205206207208209210
String jsonp = response.getBody().trim(); assertTrue(jsonp.startsWith("test("), jsonp); assertTrue(jsonp.endsWith(")"), jsonp); jsonp = jsonp.substring(5, jsonp.length() - 1); return new ObjectMapperProvider().get().readTree(jsonp); }
509510511512513514515516517
150151152153154155156157
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); }
124125126127128129130131132133134
268269270271272273274275276277278
111112113114115116117118119120121