public static void ensureValidDatasetId(String propertyName, String datasetId) { if (!isValidDatasetId(datasetId)) { throw new IllegalArgumentException(String.format("Invalid %s ID: %s. Should only contain alphanumeric " + "characters, $, ., _, or -.", propertyName, datasetId)); } }
public static void ensureValidDatasetId(String propertyName, String datasetId) { if (!isValidDatasetId(datasetId)) { throw new IllegalArgumentException(String.format("Invalid %s ID: %s. Should only contain alphanumeric " + "characters, $, ., _, or -.", propertyName, datasetId)); } }
/** * Validate that the value for the given key is a valid messaging topic, that is, a valid dataset name. * If it is not, log an error and add the key to the problemKeys. */ private void validateMessagingTopic(String key, Set<String> problemKeys) { String value = cConf.get(key); try { if (!EntityId.isValidDatasetId(value)) { LOG.error(" {} must be a valid entity id but is {}", key, value); problemKeys.add(key); } } catch (Exception e) { logProblem(" {} is set to {} and cannot be verified as a valid entity id", key, value, e); problemKeys.add(key); } }
if (!EntityId.isValidDatasetId(dataSet)) { return VerifyResult.failure(Err.NOT_AN_ID, flowName + ":" + flowletName + ":" + dataSet);