Package org.apache.oozie

Examples of org.apache.oozie.XException


            s = s.trim();
            // This block checks for errors in the format of specifying date range
            if (s.contains("::")) {
                String[] dateRange = s.split("::");
                if (dateRange.length != 2) {
                    throw new XException(ErrorCode.E0308, "'" + s + "'. Date value expected on both sides of the scope resolution operator '::' to signify start and end of range");
                }
                Date start;
                Date end;
                try {
                start = DateUtils.parseDateUTC(dateRange[0].trim());
                end = DateUtils.parseDateUTC(dateRange[1].trim());
                }
                catch (Exception dx) {
                    throw new XException(ErrorCode.E0308, "Error in parsing start or end date");
                }
                if (start.after(end)) {
                    throw new XException(ErrorCode.E0308, "'" + s + "'. Start date '" + start + "' is older than end date: '" + end + "'");
                }
                List<CoordinatorActionBean> listOfActions = getActionIdsFromDateRange(jobId, start, end);
                actionSet.addAll(listOfActions);
            }
            else {
                throw new XException(ErrorCode.E0308, "'" + s + "'. Separator '::' is missing for start and end dates of range");
            }
        }
        List<CoordinatorActionBean> coordActions = new ArrayList<CoordinatorActionBean>();
        for (CoordinatorActionBean coordAction : actionSet) {
            coordActions.add(coordAction);
View Full Code Here


            started.set(idx, false);
        }

        @Override
        public void reRun(String jobId, Configuration conf) throws BaseEngineException {
            throw new BaseEngineException(new XException(ErrorCode.E0301));
        }
View Full Code Here

TOP

Related Classes of org.apache.oozie.XException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.