Package org.apache.airavata.gfac.handler

Examples of org.apache.airavata.gfac.handler.GFacHandlerException


            isWhirrBasedDeployment = true;
        } else {
            String hadoopConfigDirPath = (String)inMessageContext.getParameter("HADOOP_CONFIG_DIR");
            File hadoopConfigDir = new File(hadoopConfigDirPath);
            if (!hadoopConfigDir.exists()){
                throw new GFacHandlerException("Specified hadoop configuration directory doesn't exist.");
            } else if (FileUtils.listFiles(hadoopConfigDir, null, null).size() <= 0){
                throw new GFacHandlerException("Cannot find any hadoop configuration files inside specified directory.");
            }

            this.hadoopConfigDir = hadoopConfigDir;
        }

        if(jobExecutionContext.isInPath()){
            try {
                handleInPath(jobExecutionContext);
            } catch (IOException e) {
                throw new GFacHandlerException("Error while copying input data from local file system to HDFS.",e);
            }
        } else {
            handleOutPath(jobExecutionContext);
        }
    }
View Full Code Here


    private static String regexPattern = "\\s*=\\s*([^\\[\\s'\"][^\\s]*|\"[^\"]*\"|'[^']*'|\\[[^\\[]*\\])";

    public static Map<String, ActualParameter> fillOutputFromStdout(Map<String, Object> output, String stdout, String stderr) throws Exception {

        if (stdout == null || stdout.equals("")){
            throw new GFacHandlerException("Standard output is empty.");
        }

        Map<String, ActualParameter> result = new HashMap<String, ActualParameter>();
        Set<String> keys = output.keySet();
        for (String paramName : keys) {
View Full Code Here

    private static String regexPattern = "\\s*=\\s*(.*)\\r?\\n";

    public static Map<String, ActualParameter> fillOutputFromStdout(Map<String, Object> output, String stdout, String stderr) throws Exception {

        if (stdout == null || stdout.equals("")){
            throw new GFacHandlerException("Standard output is empty.");
        }

        Map<String, ActualParameter> result = new HashMap<String, ActualParameter>();
        Set<String> keys = output.keySet();
        for (String paramName : keys) {
View Full Code Here

            isWhirrBasedDeployment = true;
        } else {
            String hadoopConfigDirPath = (String)inMessageContext.getParameter("HADOOP_CONFIG_DIR");
            File hadoopConfigDir = new File(hadoopConfigDirPath);
            if (!hadoopConfigDir.exists()){
                throw new GFacHandlerException("Specified hadoop configuration directory doesn't exist.");
            } else if (FileUtils.listFiles(hadoopConfigDir, null, null).size() <= 0){
                throw new GFacHandlerException("Cannot find any hadoop configuration files inside specified directory.");
            }

            this.hadoopConfigDir = hadoopConfigDir;
        }

        if(jobExecutionContext.isInPath()){
            try {
                handleInPath(jobExecutionContext);
            } catch (IOException e) {
                throw new GFacHandlerException("Error while copying input data from local file system to HDFS.",e);
            }
        } else {
            handleOutPath(jobExecutionContext);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.airavata.gfac.handler.GFacHandlerException

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.