class TaskManagerRunner implements FatalErrorHandler, AutoCloseableAsync {

	@VisibleForTesting
	static ResourceID getTaskManagerResourceID(Configuration config, String rpcAddress, int rpcPort) throws Exception {
		return new ResourceID(
			config.getString(TaskManagerOptions.TASK_MANAGER_RESOURCE_ID,
				StringUtils.isNullOrWhitespaceOnly(rpcAddress)
					? InetAddress.getLocalHost().getHostName() + "-" + new AbstractID().toString().substring(0, 6)
					: rpcAddress + ":" + rpcPort + "-" + new AbstractID().toString().substring(0, 6)),
			config.getString(TaskManagerOptionsInternal.TASK_MANAGER_RESOURCE_ID_METADATA, ""));
	}

	public  TaskManagerRunner(Configuration configuration, PluginManager pluginManager);

}