Package org.apache.oozie.util

Examples of org.apache.oozie.util.ELEvaluator


    public static String ph1_dataIn_echo(String dataInName, String part) {
        return "dataIn('" + dataInName + "', '" + part + "')";
    }

    public static String ph3_dataIn(String dataInName, String part) {
        ELEvaluator eval = ELEvaluator.getCurrent();
        String uristr = (String) eval.getVariable(".datain." + dataInName);

        //optional input
        if (uristr == null) {
            Element dsEle = getDSElement(eval, dataInName);
            Configuration conf = new Configuration();
            SyncCoordAction appInst = (SyncCoordAction) eval.getVariable(CoordELFunctions.COORD_ACTION);
            try {
                ELEvaluator instEval = CoordELEvaluator.createInstancesELEvaluator(dsEle, appInst, conf);
                StringBuilder instances = new StringBuilder();
                CoordCommandUtils.resolveInstanceRange(dsEle, instances , appInst, conf, instEval);
                uristr = CoordCommandUtils.createEarlyURIs(dsEle, instances.toString(),
                        new StringBuilder(), new StringBuilder());
                uristr = uristr.replace(CoordELFunctions.INSTANCE_SEPARATOR, ",");
View Full Code Here


        return ele;
    }

    public static String ph1_now_echo(int hr, int min) {
        ELEvaluator eval = ELEvaluator.getCurrent();
        eval.setVariable(".wrap", "true");
        return "now(" + hr + "," + min + ")"; // Unresolved
    }
View Full Code Here

        eval.setVariable(".wrap", "true");
        return "now(" + hr + "," + min + ")"; // Unresolved
    }

    public static String ph1_today_echo(int hr, int min) {
        ELEvaluator eval = ELEvaluator.getCurrent();
        eval.setVariable(".wrap", "true");
        return "today(" + hr + ", " + min + ")"; // Unresolved
    }
View Full Code Here

        eval.setVariable(".wrap", "true");
        return "today(" + hr + ", " + min + ")"; // Unresolved
    }

    public static String ph1_yesterday_echo(int hr, int min) {
        ELEvaluator eval = ELEvaluator.getCurrent();
        eval.setVariable(".wrap", "true");
        return "yesterday(" + hr + ", " + min + ")"; // Unresolved
    }
View Full Code Here

        eval.setVariable(".wrap", "true");
        return "yesterday(" + hr + ", " + min + ")"; // Unresolved
    }

    public static String ph1_currentMonth_echo(int day, int hr, int min) {
        ELEvaluator eval = ELEvaluator.getCurrent();
        eval.setVariable(".wrap", "true");
        return "currentMonth(" + day + ", " + hr + ", " + min + ")"; // Unresolved
    }
View Full Code Here

        eval.setVariable(".wrap", "true");
        return "currentMonth(" + day + ", " + hr + ", " + min + ")"; // Unresolved
    }

    public static String ph1_lastMonth_echo(int day, int hr, int min) {
        ELEvaluator eval = ELEvaluator.getCurrent();
        eval.setVariable(".wrap", "true");
        return "lastMonth(" + day + ", " + hr + ", " + min + ")"; // Unresolved
    }
View Full Code Here

        eval.setVariable(".wrap", "true");
        return "lastMonth(" + day + ", " + hr + ", " + min + ")"; // Unresolved
    }

    public static String ph1_currentYear_echo(int month, int day, int hr, int min) {
        ELEvaluator eval = ELEvaluator.getCurrent();
        eval.setVariable(".wrap", "true");
        return "currentYear(" + month + ", " + day + ", " + hr + ", " + min + ")"; // Unresolved
    }
View Full Code Here

        eval.setVariable(".wrap", "true");
        return "currentYear(" + month + ", " + day + ", " + hr + ", " + min + ")"; // Unresolved
    }

    public static String ph1_lastYear_echo(int month, int day, int hr, int min) {
        ELEvaluator eval = ELEvaluator.getCurrent();
        eval.setVariable(".wrap", "true");
        return "lastYear(" + month + ", " + day + ", " + hr + ", " + min + ")"; // Unresolved
    }
View Full Code Here

    private static boolean isActionContext() {
        return !isDatasetContext();
    }

    private static boolean isDatasetContext() {
        ELEvaluator eval = ELEvaluator.getCurrent();
        SyncCoordDataset ds = (SyncCoordDataset) eval.getVariable(CoordELFunctions.DATASET);
        return ds != null;
    }
View Full Code Here

    @edu.umd.cs.findbugs.annotations.SuppressWarnings({"SF_SWITCH_FALLTHROUGH"})
    private static Calendar getEffectiveTime(TruncateBoundary trunc, int yr, int mon, int day, int hr, int min) {
        Calendar cal;
        if (isActionContext()) {
            ELEvaluator eval = ELEvaluator.getCurrent();
            SyncCoordAction action = ParamChecker.notNull((SyncCoordAction)
                    eval.getVariable(CoordELFunctions.COORD_ACTION),
                    "Coordinator Action");
            cal = Calendar.getInstance(action.getTimeZone());
            cal.setTime(action.getNominalTime());
        } else {
            Calendar tmp = CoordELFunctions.getEffectiveNominalTime();
View Full Code Here

TOP

Related Classes of org.apache.oozie.util.ELEvaluator

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.