Package org.apache.commons.configuration

Examples of org.apache.commons.configuration.FileConfiguration.load()


            this.shell.getInterp().getContext().setProperty("g", this.giraphGraph);
        }
        if (args.size() == 1) {
            try {
                final FileConfiguration configuration = new PropertiesConfiguration();
                configuration.load(new File(args.get(0)));
                this.giraphGraph = GiraphGraph.open(configuration);
                this.shell.getInterp().getContext().setProperty("g", this.giraphGraph);
            } catch (final Exception e) {
                throw new RuntimeException(e.getMessage(), e);
            }
View Full Code Here


                throw new RuntimeException(e.getMessage(), e);
            }
        } else if (args.size() == 2) {
            try {
                final FileConfiguration configuration = new PropertiesConfiguration();
                configuration.load(new File(args.get(0)));
                this.giraphGraph = GiraphGraph.open(configuration);
                this.graphVariable = args.get(1);
                this.shell.getInterp().getContext().setProperty(args.get(1), this.giraphGraph);
            } catch (final Exception e) {
                throw new RuntimeException(e.getMessage(), e);
View Full Code Here

    }

    public static void main(final String[] args) throws Exception {
        try {
            final FileConfiguration configuration = new PropertiesConfiguration();
            configuration.load(new File(args[0]));
            final GiraphGraphComputer computer = new GiraphGraphComputer(GiraphGraph.open(configuration));
            computer.program(VertexProgram.createVertexProgram(configuration)).submit().get();
        } catch (Exception e) {
            e.printStackTrace();
            throw e;
View Full Code Here

        fc.setURL(getSourceURL());

        // deregister event listener before load because load will cause
        // other events being generated
        config.removeConfigurationListener(l);
        fc.load();
        config.addConfigurationListener(l);
    }

    /**
     * Returns the URL of the file to be loaded. Must be implemented in concrete
View Full Code Here

        fc.setURL(getSourceURL());

        // deregister event listener before load because load will cause
        // other events being generated
        config.removeConfigurationListener(l);
        fc.load();
        config.addConfigurationListener(l);
    }

    /**
     * Returns the URL of the file to be loaded. Must be implemented in concrete
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.