Examples of BackupMetaData


Examples of com.netflix.exhibitor.core.backup.BackupMetaData

    private byte[] getUploadedBytes(File sourceFile) throws Exception
    {
        MockS3Client        s3Client = new MockS3Client();
        S3BackupProvider    provider = new S3BackupProvider(new MockS3ClientFactory(s3Client), new PropertyBasedS3Credential(new Properties()), new PropertyBasedS3ClientConfig(new Properties()), null);

        provider.uploadBackup(null, new BackupMetaData("test", 10), sourceFile, Maps.<String, String>newHashMap());

        ByteArrayOutputStream   out = new ByteArrayOutputStream();
        for ( byte[] bytes : s3Client.getUploadedBytes() )
        {
            out.write(bytes);
View Full Code Here

Examples of com.netflix.exhibitor.core.backup.BackupMetaData

        String[]        parts = key.split("\\" + SEPARATOR);
        if ( parts.length != 3 )
        {
            return null;
        }
        return new BackupMetaData(parts[1], Long.parseLong(parts[2]));
    }
View Full Code Here

Examples of com.netflix.exhibitor.core.backup.BackupMetaData

                            {
                                for ( File version : subFiles )
                                {
                                    if ( version.isFile() )
                                    {
                                        builder.add(new BackupMetaData(nameDir.getName(), Long.parseLong(version.getName())));
                                    }
                                }
                            }
                        }
                    }
View Full Code Here

Examples of com.netflix.exhibitor.core.backup.BackupMetaData

            MockS3Client        s3Client = new MockS3Client(null, null);
            s3Client.putObject(dummyRequest);

            S3BackupProvider    provider = new S3BackupProvider(new MockS3ClientFactory(s3Client), new PropertyBasedS3Credential(new Properties()), new PropertyBasedS3ClientConfig(new Properties()), null);
            out = new FileOutputStream(tempFile);
            provider.downloadBackup(null, new BackupMetaData("test", 1), out, Maps.<String, String>newHashMap());
           
            Assert.assertEquals(Files.toByteArray(sourceFile), Files.toByteArray(tempFile));
        }
        finally
        {
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.