public void startNewRemoteFragment(PlanFragment fragment) throws ExecutionSetupException{
logger.debug("Received remote fragment start instruction", fragment);
FragmentContext context = new FragmentContext(bee.getContext(), fragment, null, bee.getContext().getFunctionImplementationRegistry());
ControlTunnel tunnel = bee.getContext().getController().getTunnel(fragment.getForeman());
NonRootStatusReporter listener = new NonRootStatusReporter(context, tunnel);
try{
FragmentRoot rootOperator = bee.getContext().getPlanReader().readFragmentOperator(fragment.getFragmentJson());
FragmentExecutor fr = new FragmentExecutor(context, bee, rootOperator, listener);
bee.addFragmentRunner(fr);
} catch (Exception e) {
listener.fail(fragment.getHandle(), "Failure due to uncaught exception", e);
} catch (OutOfMemoryError t) {
if(t.getMessage().startsWith("Direct buffer")){
listener.fail(fragment.getHandle(), "Failure due to error", t);
}else{
throw t;
}
}