@Test public void endpointConfiguredAmazonClient() { AmazonS3 amazonS3 = commonBeans.amazonS3Test(); URL url = amazonS3.getUrl(BUCKET, KEY); assertThat(url.getHost()).isEqualTo(String.join(".", BUCKET, ENDPOINT)); }
@Bean @Profile("test") AmazonS3 amazonS3Test() { String s3Endpoint = System.getProperty("aws.s3.endpoint"); String region = System.getProperty("aws.region"); return AmazonS3ClientBuilder .standard() .withEndpointConfiguration(new EndpointConfiguration(s3Endpoint, region)) .build(); }
CommonBeans { @Bean @Profile("test") AmazonS3 amazonS3Test() { String s3Endpoint = System.getProperty("aws.s3.endpoint"); String region = System.getProperty("aws.region"); return AmazonS3ClientBuilder .standard() .withEndpointConfiguration(new EndpointConfiguration(s3Endpoint, region)) .build(); } }
CommonBeans { @Bean @Profile("test") AmazonS3 amazonS3Test() { String s3Endpoint = System.getProperty("aws.s3.endpoint"); String region = System.getProperty("aws.region"); return AmazonS3ClientBuilder .standard() .withEndpointConfiguration(new EndpointConfiguration(s3Endpoint, region)) .build(); }  }
CommonBeans { @Bean @Profile("test") AmazonS3 amazonS3Test() { String s3Endpoint = System.getProperty("aws.s3.endpoint"); String region = System.getProperty("aws.region"); return AmazonS3ClientBuilder .standard() .withEndpointConfiguration(new EndpointConfiguration(s3Endpoint, region)) .build(); }  @Bean HiveConf hiveConf(@Value("${properties.metastore-uri}") String metastoreUri); @Bean CloseableMetaStoreClientFactory metaStoreClientFactory(); @Bean(name = "hiveClientFactory") CleanerClientFactory clientFactory(
      Supplier<CloseableMetaStoreClient> metaStoreClientSupplier,
      @Value("${properties.dry-run-enabled}") boolean dryRunEnabled); @Bean DeletedMetadataReporter deletedMetadataReporter(
      MeterRegistry meterRegistry,
      @Value("${properties.dry-run-enabled}") boolean dryRunEnabled); @Bean @Profile("default") AmazonS3 amazonS3(); @Bean S3Client s3Client(AmazonS3 amazonS3, @Value("${properties.dry-run-enabled}") boolean dryRunEnabled); @Bean(name = "expiredMetadataHandler") ExpiredMetadataHandler expiredMetadataHandler(
      @Qualifier("hiveClientFactory") CleanerClientFactory cleanerClientFactory,
      HousekeepingMetadataRepository housekeepingMetadataRepository,
      @Qualifier("hiveTableCleaner") MetadataCleaner metadataCleaner,
      @Qualifier("s3PathCleaner") PathCleaner pathCleaner); }
CommonBeans { @Bean @Profile("test") AmazonS3 amazonS3Test() { String s3Endpoint = System.getProperty("aws.s3.endpoint"); String region = System.getProperty("aws.region"); return AmazonS3ClientBuilder .standard() .withEndpointConfiguration(new EndpointConfiguration(s3Endpoint, region)) .build(); }  @Bean HiveConf hiveConf(@Value("${properties.metastore-uri}") String metastoreUri); @Bean CloseableMetaStoreClientFactory metaStoreClientFactory(); @Bean(name = "hiveClientFactory") CleanerClientFactory clientFactory(
      Supplier<CloseableMetaStoreClient> metaStoreClientSupplier,
      @Value("${properties.dry-run-enabled}") boolean dryRunEnabled); @Bean DeletedMetadataReporter deletedMetadataReporter(
      MeterRegistry meterRegistry,
      @Value("${properties.dry-run-enabled}") boolean dryRunEnabled); @Bean @Profile("default") AmazonS3 amazonS3(); @Bean S3Client s3Client(AmazonS3 amazonS3, @Value("${properties.dry-run-enabled}") boolean dryRunEnabled); @Bean(name = "expiredMetadataHandler") ExpiredMetadataHandler expiredMetadataHandler(
      @Qualifier("hiveClientFactory") CleanerClientFactory cleanerClientFactory,
      HousekeepingMetadataRepository housekeepingMetadataRepository,
      @Qualifier("hiveTableCleaner") MetadataCleaner metadataCleaner,
      @Qualifier("s3PathCleaner") PathCleaner pathCleaner);  }