Package com.ontology2.bakemono.diffFacts

Examples of com.ontology2.bakemono.diffFacts.DiffFactsTool


        OptionParser parser=new OptionParser(DiffFactsOptions.class);
        applicationContext.getAutowireCapableBeanFactory().autowireBean(parser);

        DiffFactsOptions o= (DiffFactsOptions) parser.parse(Lists.newArrayList(strings));
        if (o.left.isEmpty())
            throw new UsageException("you did not specify a value for -left");

        if (o.right.isEmpty())
            throw new UsageException("you did not specify a value for -right");

        if (o.output.isEmpty())
            throw new UsageException("you did not specify a value for -output");

        conf.set("mapred.compress.map.output", "true");
        conf.set("mapred.output.compression.type", "BLOCK");
        conf.set("mapred.map.output.compression.codec", "org.apache.hadoop.io.compress.GzipCodec");
        conf.set(SetJoinMapper.INPUTS+".1", Joiner.on(",").join(o.left));
View Full Code Here


    protected void _run(String[] arguments) throws Exception {
        NewPersistentClusterOptions options=extractOptions(arguments);

        Cluster cluster=options.clusterId.isEmpty() ? defaultCluster : applicationContext.getBean(options.clusterId,Cluster.class);
        if (!(cluster instanceof AmazonEMRCluster)) {
            throw new UsageException("the -clusterId must specify an Amazon EMR Cluster");
        }

        String name=((AmazonEMRCluster) cluster).createPersistentCluster("Persistent Cluster");
        System.out.println(name);
    }
View Full Code Here

    private String keyPairName;

    @Override
    protected void _run(String[] strings) throws Exception {
        if(strings.length<1)
            throw new UsageException("must specify AWS instance number");

        String targetId=strings[0];
        String instanceId="";

        if(targetId.startsWith("j-")) {
View Full Code Here

        fetchLogs.run(new String[] {result.getJobFlowId()});
    }

    boolean validateJarArgs(List<String> jarArgs) throws IllegalAccessException, URISyntaxException {
        HasOptions options=extractOptions(jarArgs);
        if(options instanceof CommonOptions) {
            return validateCommonOptions((CommonOptions) options);
        }
        return true// don't know how to validate anything else
    }
View Full Code Here

    private KillPersistentClusterOptions extractOptions(String[] strings) throws IllegalAccessException {
        return extractOptions(Lists.newArrayList(strings));
    }
    private KillPersistentClusterOptions extractOptions(ArrayList<String> strings) throws IllegalAccessException {
        OptionParser parser=new OptionParser(KillPersistentClusterOptions.class);
        applicationContext.getAutowireCapableBeanFactory().autowireBean(parser);

        return (KillPersistentClusterOptions) parser.parse(strings);
    }
View Full Code Here

    @Autowired
    ApplicationContext applicationContext;

    @Before
    public void setup() {
        parser=new OptionParser(DiffFactsOptions.class);
        applicationContext.getAutowireCapableBeanFactory().autowireBean(parser);
    }
View Full Code Here

        return job.waitForCompletion(true) ? 0 : 1;
    }

    ExtractIsAOptions extractOptions(List<String> strings) throws IllegalAccessException {
        OptionParser parser=new OptionParser(ExtractIsAOptions.class);
        applicationContext.getAutowireCapableBeanFactory().autowireBean(parser);

        ExtractIsAOptions options=(ExtractIsAOptions) parser.parse(Lists.newArrayList(strings));
        if (options.input.isEmpty())
            throw new UsageException("You did not specify a value for -input");

        if (options.output==null || options.output.isEmpty())
            throw new UsageException("You did not specify a value for -output");
View Full Code Here

    private OptionsClass extractOptions(String[] strings) throws IllegalAccessException {
        return extractOptions(Lists.newArrayList(strings));
    }

    private OptionsClass extractOptions(ArrayList<String> strings) throws IllegalAccessException {
        OptionParser parser=new OptionParser(getOptionsClass());
        applicationContext.getAutowireCapableBeanFactory().autowireBean(parser);

        return (OptionsClass) parser.parse(strings);
    }
View Full Code Here

        this.conf=arg0;
    }

    @Override
    public int run(String[] strings) throws Exception {
        OptionParser parser=new OptionParser(DiffFactsOptions.class);
        applicationContext.getAutowireCapableBeanFactory().autowireBean(parser);

        DiffFactsOptions o= (DiffFactsOptions) parser.parse(Lists.newArrayList(strings));
        if (o.left.isEmpty())
            throw new UsageException("you did not specify a value for -left");

        if (o.right.isEmpty())
            throw new UsageException("you did not specify a value for -right");
View Full Code Here

    private NewPersistentClusterOptions extractOptions(String[] strings) throws IllegalAccessException {
        return extractOptions(Lists.newArrayList(strings));
    }
    private NewPersistentClusterOptions extractOptions(ArrayList<String> strings) throws IllegalAccessException {
        OptionParser parser=new OptionParser(NewPersistentClusterOptions.class);
        applicationContext.getAutowireCapableBeanFactory().autowireBean(parser);

        return (NewPersistentClusterOptions) parser.parse(strings);
    }
View Full Code Here

TOP

Related Classes of com.ontology2.bakemono.diffFacts.DiffFactsTool

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.