code: protected void executeProgram(PackagedProgram program, ClusterClient<?> client, int parallelism) throws ProgramMissingJobException, ProgramInvocationException {
  		logAndSysout("Starting execution of program");
  
  		final JobSubmissionResult result = client.run(program, parallelism);
  
  		if (null == result) {
  			throw new ProgramMissingJobException("No JobSubmissionResult returned, please make sure you called " +
  				"ExecutionEnvironment.execute()");
  		}
  
  		if (result.isJobExecutionResult()) {
  			logAndSysout("Program execution finished");
  			JobExecutionResult execResult = result.getJobExecutionResult();
  			System.out.println("Job with JobID " + execResult.getJobID() + " has finished.");
  			System.out.println("Job Runtime: " + execResult.getNetRuntime() + " ms");
  			Map<String, Object> accumulatorsResult = execResult.getAllAccumulatorResults();
  			if (accumulatorsResult.size() > 0) {
  				System.out.println("Accumulator Results: ");
  				System.out.println(AccumulatorHelper.getResultsFormatted(accumulatorsResult));
  			}
  		} else {
  			logAndSysout("Job has been submitted with JobID " + result.getJobID());
  		}
  	}
docs: --------------------------------------------------------------------------------------------