public final class JobIDUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
convertToK8sFormat(java.lang.String name,
int maxLength)
we perform the following actions:
shorten the length of the job name if needed
replace underscore and dot characters with dashes
convert all letters to lower case characters
delete non-alphanumeric characters excluding dots and dashes
replace the first char with "a", if it is not a letter in between a-z
replace the last char with "z", if it is dash
|
static java.lang.String |
generateJobID(java.lang.String jobName,
java.lang.String userName) |
static boolean |
nameConformsToK8sNamingRules(java.lang.String jName,
int maxLength)
whether given jobName conforms to k8s naming rules and max length
|
static java.lang.String |
timestamp()
create an alpha numeric string from time stamp value
current time - 01/01/2019
|
public static java.lang.String generateJobID(java.lang.String jobName, java.lang.String userName)
public static boolean nameConformsToK8sNamingRules(java.lang.String jName, int maxLength)
jName
- public static java.lang.String convertToK8sFormat(java.lang.String name, int maxLength)
name
- public static java.lang.String timestamp()