Preconditions.checkArgument(Flowlet.class.isAssignableFrom(clz), "%s is not a Flowlet.", clz);
Class<? extends Flowlet> flowletClass = (Class<? extends Flowlet>) clz;
// Creates tx related objects
DataFabricFacade dataFabricFacade = dataFabricFacadeFactory.create(program);
// Creates flowlet context
flowletContext = new BasicFlowletContext(program, flowletName, instanceId, runId, instanceCount,
options.getUserArguments(), flowletDef.getFlowletSpec(),
metricsCollectionService, dataFabricFacade, serviceAnnouncer);