Set<String> actions = new HashSet<String>();
String[] list = scope.split(",");
for (String s : list) {
s = s.trim();
// An action range is specified with two actions separated by '-'
if (s.contains("-")) {
String[] range = s.split("-");
...............
int start;
int end;
//Get the starting and ending action numbers
try {
start = Integer.parseInt(range[0].trim());
} catch (NumberFormatException ne) {
throw new CommandException(ErrorCode.E0302, "could not parse " + range[0].trim() + "into an integer", ne);
}
try {
end = Integer.parseInt(range[1].trim());
} catch (NumberFormatException ne) {
throw new CommandException(ErrorCode.E0302, "could not parse " + range[1].trim() + "into an integer", ne);
}
...............
// Add the actionIds
for (int i = start; i <= end; i++) {
actions.add(jobId + "@" + i);
}
1条答案
按热度按时间6g8kf2rb1#
我想现在看这段代码是不可能做到的:getactionsids
编辑:这里是apachejiraoozie-2766以及补丁。谢谢。