Package com.netflix.priam

Examples of com.netflix.priam.FakeConfiguration


        instances.add("fakeinstance7");
        instances.add("fakeinstance8");
        instances.add("fakeinstance9");

        membership = new FakeMembership(instances);
        config = new FakeConfiguration("fake", "fake-app", "az1", "fakeinstance1");
        factory = new FakePriamInstanceFactory(config);
        sleeper = new FakeSleeper();
    }
View Full Code Here


{
 
    @Override
    protected void configure()
    {
        bind(IConfiguration.class).toInstance(new FakeConfiguration(FakeConfiguration.FAKE_REGION, "fake-app", "az1", "fakeInstance1"));
        bind(IPriamInstanceFactory.class).to(FakePriamInstanceFactory.class);
        bind(SchedulerFactory.class).to(StdSchedulerFactory.class).in(Scopes.SINGLETON);
        bind(IMembership.class).toInstance(new FakeMembership(Arrays.asList("fakeInstance1")));
        bind(ICredential.class).to(FakeNullCredential.class).in(Scopes.SINGLETON);
//        bind(IBackupFileSystem.class).to(FakeBackupFileSystem.class).in(Scopes.SINGLETON);
View Full Code Here

public class StreamingTest
{
    public void teststream() throws IOException, InterruptedException
    {
        IConfiguration config = new FakeConfiguration("test", "cass_upg107_ccs", "test", "ins_id");
        SSTableLoaderWrapper loader = new SSTableLoaderWrapper(config, new StandardTuner(config));
        Collection<PendingFile> ssts = loader.stream(new File("/tmp/Keyspace2/"));
        loader.deleteCompleted(ssts);
    }
View Full Code Here

   
    @Test
    public void testRestoreFromDiffCluster() throws Exception
    {
        populateBackupFileSystem("test_backup_new");
        FakeConfiguration conf = (FakeConfiguration)injector.getInstance(IConfiguration.class);
        conf.setRestorePrefix("RESTOREBUCKET/test_backup_new/"+FakeConfiguration.FAKE_REGION+"/fakecluster");
        Restore restore = injector.getInstance(Restore.class);
        cal.set(2011, Calendar.AUGUST, 11, 0, 30, 0);
        cal.set(Calendar.MILLISECOND, 0);
        Date startTime = cal.getTime();
        cal.add(Calendar.HOUR, 5);
        restore.restore(startTime, cal.getTime());
        Assert.assertTrue(filesystem.downloadedFiles.contains(fileList.get(0)));
        Assert.assertTrue(filesystem.downloadedFiles.contains(fileList.get(1)));
        Assert.assertTrue(filesystem.downloadedFiles.contains(fileList.get(2)));
        Assert.assertTrue(filesystem.downloadedFiles.contains(fileList.get(3)));
        Assert.assertFalse(filesystem.downloadedFiles.contains(fileList.get(4)));
        Assert.assertFalse(filesystem.downloadedFiles.contains(fileList.get(5)));
        conf.setRestorePrefix("");
    }
View Full Code Here

    @Before
    public void setup()
    {

        config = new FakeConfiguration();
        tuner = new StandardTuner(config);
    }
View Full Code Here

    CassandraProcessManager cpm;

    @Before
    public void setup()
    {
        IConfiguration config = new FakeConfiguration("us-east-1", "test_cluster", "us-east-1a", "i-2378afd3");
        cpm = new CassandraProcessManager(config, new FakeSleeper());
    }
View Full Code Here

    File targetFile;

    @Before
    public void setup() throws IOException
    {
        config = new FakeConfiguration();
        dseConfig = new DseConfigStub();
        dseTuner = new DseTuner(config, dseConfig);

        File targetDir = new File(config.getCassHome() + "/conf");
        if(!targetDir.exists())
View Full Code Here

TOP

Related Classes of com.netflix.priam.FakeConfiguration

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.