public static boolean isValidExpression(String cronExpression) { return CronExpression.isValidExpression(cronExpression); }
public static boolean isValidExpression(String cronExpression) { return CronExpression.isValidExpression(cronExpression); }
public void checkField() throws JobSubmitException { if (StringUtils.isEmpty(taskId)) { throw new JobSubmitException("taskId can not be empty! job is " + toString()); } if (taskId.length() > 64) { throw new JobSubmitException("taskId length should not great than 64! job is " + toString()); } if (StringUtils.isEmpty(taskTrackerNodeGroup)) { throw new JobSubmitException("taskTrackerNodeGroup can not be empty! job is " + toString()); } if (taskTrackerNodeGroup.length() > 64) { throw new JobSubmitException("taskTrackerNodeGroup length should not great than 64! job is " + toString()); } if (StringUtils.isNotEmpty(cronExpression)) { if (!CronExpression.isValidExpression(cronExpression)) { throw new JobSubmitException("cronExpression invalid! job is " + toString()); } if (cronExpression.length() > 128) { throw new JobSubmitException("cronExpression length should not great than 128! job is " + toString()); } } if (maxRetryTimes < 0) { throw new JobSubmitException("maxRetryTimes invalid, must be great than zero! job is " + toString()); } if (repeatCount < -1) { throw new JobSubmitException("repeatCount invalid, must be great than -1! job is " + toString()); } } }
public void checkField() throws JobSubmitException { if (StringUtils.isEmpty(taskId)) { throw new JobSubmitException("taskId can not be empty! job is " + toString()); } if (taskId.length() > 64) { throw new JobSubmitException("taskId length should not great than 64! job is " + toString()); } if (StringUtils.isEmpty(taskTrackerNodeGroup)) { throw new JobSubmitException("taskTrackerNodeGroup can not be empty! job is " + toString()); } if (taskTrackerNodeGroup.length() > 64) { throw new JobSubmitException("taskTrackerNodeGroup length should not great than 64! job is " + toString()); } if (StringUtils.isNotEmpty(cronExpression)) { if (!CronExpression.isValidExpression(cronExpression)) { throw new JobSubmitException("cronExpression invalid! job is " + toString()); } if (cronExpression.length() > 128) { throw new JobSubmitException("cronExpression length should not great than 128! job is " + toString()); } } if (maxRetryTimes < 0) { throw new JobSubmitException("maxRetryTimes invalid, must be great than zero! job is " + toString()); } if (repeatCount < -1) { throw new JobSubmitException("repeatCount invalid, must be great than -1! job is " + toString()); } } }
public static boolean isValidExpression(String cronExpression) { return CronExpression.isValidExpression(cronExpression); }
public void checkField() throws JobSubmitException { if (StringUtils.isEmpty(taskId)) { throw new JobSubmitException("taskId can not be empty! job is " + toString()); } if (taskId.length() > 64) { throw new JobSubmitException("taskId length should not great than 64! job is " + toString()); } if (StringUtils.isEmpty(taskTrackerNodeGroup)) { throw new JobSubmitException("taskTrackerNodeGroup can not be empty! job is " + toString()); } if (taskTrackerNodeGroup.length() > 64) { throw new JobSubmitException("taskTrackerNodeGroup length should not great than 64! job is " + toString()); } if (StringUtils.isNotEmpty(cronExpression)) { if (!CronExpression.isValidExpression(cronExpression)) { throw new JobSubmitException("cronExpression invalid! job is " + toString()); } if (cronExpression.length() > 128) { throw new JobSubmitException("cronExpression length should not great than 128! job is " + toString()); } } if (maxRetryTimes < 0) { throw new JobSubmitException("maxRetryTimes invalid, must be great than zero! job is " + toString()); } if (repeatCount < -1) { throw new JobSubmitException("repeatCount invalid, must be great than -1! job is " + toString()); } } }