rootContext.setBuffers(buffers);
// add fragment to local node.
status.add(new FragmentData(rootFragment.getHandle(), rootFragment.getAssignment(), true));
logger.debug("Fragment added to local node.");
rootRunner = new FragmentExecutor(rootContext, bee, rootOperator, new RootStatusHandler(rootContext, rootFragment));
RootFragmentManager fragmentManager = new RootFragmentManager(rootFragment.getHandle(), buffers, rootRunner);
if(buffers.isDone()){
// if we don't have to wait for any incoming data, start the fragment runner.
bee.addFragmentRunner(fragmentManager.getRunnable());
}else{
// if we do, record the fragment manager in the workBus.
workBus.setFragmentManager(fragmentManager);
}
}