@SuppressWarnings("unchecked")
	public static TaskManagerProfiler loadTaskManagerProfiler(String profilerClassName, InetAddress jobManagerAddress,
			InstanceConnectionInfo instanceConnectionInfo) {

		final Class<? extends TaskManagerProfiler> profilerClass;
		try {
			profilerClass = (Class<? extends TaskManagerProfiler>) Class.forName(profilerClassName);
		} catch (ClassNotFoundException e) {
			LOG.error("Cannot find class " + profilerClassName + ": " + StringUtils.stringifyException(e));
			return null;
		}

		Constructor<? extends TaskManagerProfiler> constructor = null;
		try {
			constructor = profilerClass.getConstructor(InetAddress.class, InstanceConnectionInfo.class);
		} catch (SecurityException e1) {
			LOG.error(e1);
			return null;
		} catch (NoSuchMethodException e1) {
			LOG.error(e1);
			return null;
		}

		TaskManagerProfiler profiler = null;
		try {
			profiler = constructor.newInstance(jobManagerAddress, instanceConnectionInfo);
		} catch (IllegalArgumentException e) {
			LOG.error(e);
		} catch (InstantiationException e) {
			LOG.error(e);
		} catch (IllegalAccessException e) {
			LOG.error(e);
		} catch (InvocationTargetException e) {
			LOG.error(e);
		}

		return profiler;
	}
@ SuppressWarnings ( "unchecked" ) public static TaskManagerProfiler loadTaskManagerProfiler ( String profilerClassName , InetAddress jobManagerAddress , InstanceConnectionInfo instanceConnectionInfo ) { final Class < ? extends TaskManagerProfiler > profilerClass ; try { profilerClass = ( Class < ? extends TaskManagerProfiler > ) Class . forName ( profilerClassName ) ; } catch ( ClassNotFoundException e ) { LOG . error ( "Cannot find class " + profilerClassName + ": " + StringUtils . stringifyException ( e ) ) ; return null ; } Constructor < ? extends TaskManagerProfiler > constructor = null ; try { constructor = profilerClass . getConstructor ( InetAddress . class , InstanceConnectionInfo . class ) ; } catch ( SecurityException e1 ) { LOG . error ( e1 ) ; return null ; } catch ( NoSuchMethodException e1 ) { LOG . error ( e1 ) ; return null ; } TaskManagerProfiler profiler = null ; try { profiler = constructor . newInstance ( jobManagerAddress , instanceConnectionInfo ) ; } catch ( IllegalArgumentException e ) { LOG . error ( e ) ; } catch ( InstantiationException e ) { LOG . error ( e ) ; } catch ( IllegalAccessException e ) { LOG . error ( e ) ; } catch ( InvocationTargetException e ) { LOG . error ( e ) ; } return profiler ; }
Creates an instance of the task manager's profiling component.

@param profilerClassName
the class name of the profiling component to load
@return an instance of the task manager profiling component or <code>null</code> if an error occurs