@Test public void getFileBucketFromContainerNameWithExplicitFileBucketConf() throws Exception { BucketTopologyHelper bucketTopologyHelper = loadTopology("topology-test-explicit-file-buckets.conf"); assertThat(bucketTopologyHelper.getFileBucketFromContainerName("0_unit")).isEqualTo("test-metadata"); assertThat(bucketTopologyHelper.getFileBucketFromContainerName("1_object")).isEqualTo("admin-objects"); assertThat(bucketTopologyHelper.getFileBucketFromContainerName("2_report")).isEqualTo("prod-default"); }
public String getFileBucketFromContainerName(String containerName) { int tenant = parseTenantFromContainerName(containerName); DataCategory dataCategory = parseDataCategoryFromContainerName(containerName); return this.containerToFileBucketMap.get(ImmutablePair.of(tenant, dataCategory)); }
BucketTopologyHelper { public String getFileBucketFromContainerName(String containerName) { int tenant = parseTenantFromContainerName(containerName); DataCategory dataCategory = parseDataCategoryFromContainerName(containerName); return this.containerToFileBucketMap.get(ImmutablePair.of(tenant, dataCategory)); } }
BucketTopologyHelper { public String getFileBucketFromContainerName(String containerName) { int tenant = parseTenantFromContainerName(containerName); DataCategory dataCategory = parseDataCategoryFromContainerName(containerName); return this.containerToFileBucketMap.get(ImmutablePair.of(tenant, dataCategory)); } BucketTopologyHelper(TapeLibraryTopologyConfiguration configuration); }
BucketTopologyHelper { public String getFileBucketFromContainerName(String containerName) { int tenant = parseTenantFromContainerName(containerName); DataCategory dataCategory = parseDataCategoryFromContainerName(containerName); return this.containerToFileBucketMap.get(ImmutablePair.of(tenant, dataCategory)); } BucketTopologyHelper(TapeLibraryTopologyConfiguration configuration); static String getFileBucketId(String bucket, String fileBucket); String getFileBucketFromContainerName(String containerName); String getBucketFromFileBucket(String fileBucket); Set<String> listFileBuckets(); Set<String> listContainerNames(String fileBucketId); Integer getTarBufferingTimeoutInMinutes(String bucketId); }
BucketTopologyHelper { public String getFileBucketFromContainerName(String containerName) { int tenant = parseTenantFromContainerName(containerName); DataCategory dataCategory = parseDataCategoryFromContainerName(containerName); return this.containerToFileBucketMap.get(ImmutablePair.of(tenant, dataCategory)); } BucketTopologyHelper(TapeLibraryTopologyConfiguration configuration); static String getFileBucketId(String bucket, String fileBucket); String getFileBucketFromContainerName(String containerName); String getBucketFromFileBucket(String fileBucket); Set<String> listFileBuckets(); Set<String> listContainerNames(String fileBucketId); Integer getTarBufferingTimeoutInMinutes(String bucketId); static final String DEFAULT; static final String BACKUP_BUCKET; static final String BACKUP_FILE_BUCKET; }