Package voldemort.utils

Examples of voldemort.utils.Ec2Connection


                                                                                  "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


        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");
        File instancesFile = getInputFile(options, "instances");

        if(hostNamesFile == null && instancesFile == null)
            printUsage();

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

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

            ec2Connection.deleteInstancesByHostName(hostNames);
        }

        if(instancesFile != null) {
            List<String> instanceIds = FileUtils.readLines(instancesFile);
            ec2Connection.deleteInstancesByInstanceId(instanceIds);
        }
    }
View Full Code Here

TOP

Related Classes of voldemort.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.