Package org.apache.pig.validator

Examples of org.apache.pig.validator.BlackAndWhitelistFilter.validate()


     * @param val - string containing command to be executed
     */
    public  void processShellCmd(String key, String val, Boolean overwritethrows ParameterSubstitutionException, FrontendException {
        if (pigContext != null) {
            BlackAndWhitelistFilter filter = new BlackAndWhitelistFilter(pigContext);
            filter.validate(PigCommandFilter.Command.SH);
        }

        if (param_val.containsKey(key)) {
            if (param_source.get(key).equals(val) || !overwrite) {
                return;
View Full Code Here


        final BlackAndWhitelistFilter filter = new BlackAndWhitelistFilter(pigContext);
        final String declareToken = "%declare";
        final String defaultToken = "%default";

        if (preprocessorCmd.equals(declareToken)) {
            filter.validate(PigCommandFilter.Command.DECLARE);
        } else if (preprocessorCmd.equals(defaultToken)) {
            filter.validate(PigCommandFilter.Command.DEFAULT);
        } else {
            throw new IllegalArgumentException("Pig Internal Error. Invalid preprocessor command specified : "
                            + preprocessorCmd);
View Full Code Here

        final String defaultToken = "%default";

        if (preprocessorCmd.equals(declareToken)) {
            filter.validate(PigCommandFilter.Command.DECLARE);
        } else if (preprocessorCmd.equals(defaultToken)) {
            filter.validate(PigCommandFilter.Command.DEFAULT);
        } else {
            throw new IllegalArgumentException("Pig Internal Error. Invalid preprocessor command specified : "
                            + preprocessorCmd);
        }
    }
View Full Code Here

        // Validate if imports are enabled/disabled
        final BlackAndWhitelistFilter filter = new BlackAndWhitelistFilter(
                this.pigContext);
        try {
            filter.validate(PigCommandFilter.Command.IMPORT);
        } catch (FrontendException e) {
            throw new ParserException(e.getMessage());
        }
        for (CommonTree t : nodes) {
            macroImport(t);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.