Examples of parseLocal()


Examples of com.netflix.priam.aws.S3BackupPath.parseLocal()

    {
        MockS3PartUploader.setup();
        S3FileSystem fs = injector.getInstance(S3FileSystem.class);
        // String snapshotfile = "target/data/Keyspace1/Standard1/backups/201108082320/Keyspace1-Standard1-ia-1-Data.db";
        S3BackupPath backupfile = injector.getInstance(S3BackupPath.class);
        backupfile.parseLocal(new File(FILE_PATH), BackupFileType.SNAP);
        fs.upload(backupfile, backupfile.localReader());
        Assert.assertEquals(1, MockS3PartUploader.compattempts);
    }

    @Test
View Full Code Here

Examples of com.netflix.priam.aws.S3BackupPath.parseLocal()

        MockS3PartUploader.setup();
        MockS3PartUploader.partFailure = true;
        S3FileSystem fs = injector.getInstance(S3FileSystem.class);
        String snapshotfile = "target/data/Keyspace1/Standard1/backups/201108082320/Keyspace1-Standard1-ia-1-Data.db";
        S3BackupPath backupfile = injector.getInstance(S3BackupPath.class);
        backupfile.parseLocal(new File(snapshotfile), BackupFileType.SNAP);
        try
        {
            fs.upload(backupfile, backupfile.localReader());
        }
        catch (BackupRestoreException e)
View Full Code Here

Examples of com.netflix.priam.aws.S3BackupPath.parseLocal()

        MockS3PartUploader.setup();
        MockS3PartUploader.completionFailure = true;
        S3FileSystem fs = injector.getInstance(S3FileSystem.class);
        String snapshotfile = "target/data/Keyspace1/Standard1/backups/201108082320/Keyspace1-Standard1-ia-1-Data.db";
        S3BackupPath backupfile = injector.getInstance(S3BackupPath.class);
        backupfile.parseLocal(new File(snapshotfile), BackupFileType.SNAP);
        try
        {
            fs.upload(backupfile, backupfile.localReader());
        }
        catch (BackupRestoreException e)
View Full Code Here

Examples of com.netflix.priam.aws.S3BackupPath.parseLocal()

    public void testBackupFileCreation() throws ParseException
    {
        // Test snapshot file
        String snapshotfile = "target/data/Keyspace1/Standard1/snapshots/201108082320/Keyspace1-Standard1-ia-5-Data.db";
        S3BackupPath backupfile = injector.getInstance(S3BackupPath.class);
        backupfile.parseLocal(new File(snapshotfile), BackupFileType.SNAP);
        Assert.assertEquals(BackupFileType.SNAP, backupfile.type);
        Assert.assertEquals("Keyspace1", backupfile.keyspace);
        Assert.assertEquals("Standard1", backupfile.columnFamily);
        Assert.assertEquals("1234567", backupfile.token);
        Assert.assertEquals("fake-app", backupfile.clusterName);
View Full Code Here

Examples of com.netflix.priam.aws.S3BackupPath.parseLocal()

    public void testIncBackupFileCreation() throws ParseException
    {
        // Test incremental file       
        File bfile = new File("target/data/Keyspace1/Standard1/Keyspace1-Standard1-ia-5-Data.db");
        S3BackupPath backupfile = injector.getInstance(S3BackupPath.class);
        backupfile.parseLocal(bfile, BackupFileType.SST);
        Assert.assertEquals(BackupFileType.SST, backupfile.type);
        Assert.assertEquals("Keyspace1", backupfile.keyspace);
        Assert.assertEquals("Standard1", backupfile.columnFamily);
        Assert.assertEquals("1234567", backupfile.token);
        Assert.assertEquals("fake-app", backupfile.clusterName);
View Full Code Here

Examples of com.netflix.priam.aws.S3BackupPath.parseLocal()

        // Test snapshot file
        String filestr = "cass/data/1234567.meta";
        File bfile = new File(filestr);
        S3BackupPath backupfile = injector.getInstance(S3BackupPath.class);
        backupfile.time = backupfile.parseDate("201108082320");
        backupfile.parseLocal(bfile, BackupFileType.META);
        Assert.assertEquals(BackupFileType.META, backupfile.type);
        Assert.assertEquals("1234567", backupfile.token);
        Assert.assertEquals("fake-app", backupfile.clusterName);
        Assert.assertEquals(FakeConfiguration.FAKE_REGION, backupfile.region);
        Assert.assertEquals("casstestbackup", backupfile.baseDir);
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.