@SuppressWarnings("unchecked")
	public static JobManagerProfiler loadJobManagerProfiler(String profilerClassName, InetAddress jobManagerBindAddress) {

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

		JobManagerProfiler profiler = null;
		
		try {
			
			final Constructor<JobManagerProfiler> constr = (Constructor<JobManagerProfiler>) profilerClass.getConstructor(InetAddress.class);
			profiler = constr.newInstance(jobManagerBindAddress);
		
		} catch(InvocationTargetException e) {
			LOG.error("Cannot create profiler: " + StringUtils.stringifyException(e));
			return null;
		} catch (NoSuchMethodException e) {
			LOG.error("Cannot create profiler: " + StringUtils.stringifyException(e));
			return null;
		} catch (InstantiationException e) {
			LOG.error("Cannot create profiler: " + StringUtils.stringifyException(e));
			return null;
		} catch (IllegalAccessException e) {
			LOG.error("Cannot create profiler: " + StringUtils.stringifyException(e));
			return null;
		} catch (IllegalArgumentException e) {
			LOG.error("Cannot create profiler: " + StringUtils.stringifyException(e));
			return null;
		}

		return profiler;
	}
@ SuppressWarnings ( "unchecked" ) public static JobManagerProfiler loadJobManagerProfiler ( String profilerClassName , InetAddress jobManagerBindAddress ) { final Class < ? extends JobManagerProfiler > profilerClass ; try { profilerClass = ( Class < ? extends JobManagerProfiler > ) Class . forName ( profilerClassName ) ; } catch ( ClassNotFoundException e ) { LOG . error ( "Cannot find class " + profilerClassName + ": " + StringUtils . stringifyException ( e ) ) ; return null ; } JobManagerProfiler profiler = null ; try { final Constructor < JobManagerProfiler > constr = ( Constructor < JobManagerProfiler > ) profilerClass . getConstructor ( InetAddress . class ) ; profiler = constr . newInstance ( jobManagerBindAddress ) ; } catch ( InvocationTargetException e ) { LOG . error ( "Cannot create profiler: " + StringUtils . stringifyException ( e ) ) ; return null ; } catch ( NoSuchMethodException e ) { LOG . error ( "Cannot create profiler: " + StringUtils . stringifyException ( e ) ) ; return null ; } catch ( InstantiationException e ) { LOG . error ( "Cannot create profiler: " + StringUtils . stringifyException ( e ) ) ; return null ; } catch ( IllegalAccessException e ) { LOG . error ( "Cannot create profiler: " + StringUtils . stringifyException ( e ) ) ; return null ; } catch ( IllegalArgumentException e ) { LOG . error ( "Cannot create profiler: " + StringUtils . stringifyException ( e ) ) ; return null ; } return profiler ; }
Creates an instance of the job manager's profiling component.

@param profilerClassName
the class name of the profiling component to load
@param jobManagerBindAddress
the address the job manager's RPC server is bound to
@return an instance of the job manager profiling component or <code>null</code> if an error occurs