metricsCollectionService = injector.getInstance(MetricsCollectionService.class);
metricsCollectionService.startAndWait();
AppFabricHttpHandler httpHandler = injector.getInstance(AppFabricHttpHandler.class);
ServiceHttpHandler serviceHttpHandler = injector.getInstance(ServiceHttpHandler.class);
LocationFactory locationFactory = injector.getInstance(LocationFactory.class);
appFabricClient = new AppFabricClient(httpHandler, serviceHttpHandler, locationFactory);
DatasetFramework dsFramework = injector.getInstance(DatasetFramework.class);
datasetFramework =
new NamespacedDatasetFramework(dsFramework,
new DefaultDatasetNamespace(cConf, Namespace.USER));
schedulerService = injector.getInstance(SchedulerService.class);