@Test public void verifyHiveClient() { Supplier<CloseableMetaStoreClient> metaStoreClientSupplier = Mockito.mock(Supplier.class); CleanerClientFactory clientFactory = commonBeans.clientFactory(metaStoreClientSupplier, false); CleanerClient client = clientFactory.newInstance(); assertThat(client).isInstanceOf(HiveClient.class); }
@Bean(name = "hiveClientFactory") public CleanerClientFactory clientFactory( Supplier<CloseableMetaStoreClient> metaStoreClientSupplier, @Value("${properties.dry-run-enabled}") boolean dryRunEnabled) { return new HiveClientFactory(metaStoreClientSupplier, dryRunEnabled); }
CommonBeans { @Bean(name = "hiveClientFactory") public CleanerClientFactory clientFactory( Supplier<CloseableMetaStoreClient> metaStoreClientSupplier, @Value("${properties.dry-run-enabled}") boolean dryRunEnabled) { return new HiveClientFactory(metaStoreClientSupplier, dryRunEnabled); } }
CommonBeans { @Bean(name = "hiveClientFactory") public CleanerClientFactory clientFactory( Supplier<CloseableMetaStoreClient> metaStoreClientSupplier, @Value("${properties.dry-run-enabled}") boolean dryRunEnabled) { return new HiveClientFactory(metaStoreClientSupplier, dryRunEnabled); }  }
CommonBeans { @Bean(name = "hiveClientFactory") public CleanerClientFactory clientFactory( Supplier<CloseableMetaStoreClient> metaStoreClientSupplier, @Value("${properties.dry-run-enabled}") boolean dryRunEnabled) { return new HiveClientFactory(metaStoreClientSupplier, dryRunEnabled); }  @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(name = "hiveClientFactory") public CleanerClientFactory clientFactory( Supplier<CloseableMetaStoreClient> metaStoreClientSupplier, @Value("${properties.dry-run-enabled}") boolean dryRunEnabled) { return new HiveClientFactory(metaStoreClientSupplier, dryRunEnabled); }  @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);  }