public String containerName ( ) { final String shortId = job . getId ( ) . toShortString ( ) ; final String escaped = CONTAINER_NAME_FORBIDDEN . matcher ( shortId ) . replaceAll ( "_" ) ; final String random = Integer . toHexString ( new SecureRandom ( ) . nextInt ( ) ) ; return namespace + "-" + escaped + "_" + random ; }
Generate a random container name .