Package kafka.deploy.utils

Examples of kafka.deploy.utils.Ec2Connection


        OptionSet options = parse(args);
        String accessId = getAccessId(options);
        String secretKey = getSecretKey(options);
        String regionUrl = getRegionUrl(options);

        Ec2Connection ec2Connection = new TypicaEc2Connection(accessId, secretKey, null, regionUrl);

        List<String> hostNames = new ArrayList<String>();
        File hostNamesFile = getInputFile(options, "hostnames");

        if(hostNamesFile == null)
            printUsage();

        if(hostNamesFile != null) {
            List<HostNamePair> hostNamePairs = getHostNamesPairsFromFile(hostNamesFile);

            for(HostNamePair hostNamePair: hostNamePairs)
                hostNames.add(hostNamePair.getExternalHostName());

            ec2Connection.deleteInstancesByHostName(hostNames);
        }
    }
View Full Code Here


                                                                                  "DEFAULT"));
        } catch(Exception e) {
            printUsage();
        }

        Ec2Connection ec2Connection = new TypicaEc2Connection(accessId, secretKey, null, regionUrl);
        List<HostNamePair> hostNamePairs = ec2Connection.createInstances(ami,
                                                                         keypairId,
                                                                         instanceType,
                                                                         instanceCount,
                                                                         securityGroupsList);
View Full Code Here

TOP

Related Classes of kafka.deploy.utils.Ec2Connection

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.