Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update scope beans to reuse #190

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,26 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.6.1] - 2024-12-02

## [3.5.13] - 2025-01-24
## Added
- Changed scope of beans to `public` in `beekeeper-metadata-cleanup` and `beekeeper-path-cleanup`.

## [3.5.12] - 2025-01-22
## Added
- add support to schedule partitions that already exist in table metadata.

## [3.5.11] - 2024-12-06
## Fixed
- Remove entity ID to force new entries to history table.

## [3.5.10] - 2024-12-02
## Added
- Added `maven-jar-plugin` in `beekeeper-integration-test`.
## Changed
- Changed scope of attributes to `protected` in `beekeeper-integration-test`

## [3.6.0] - 2024-11-29
## [3.5.9] - 2024-11-29
## Added
- Added a db migration file and implementation of `beekeeper-history` table to track beekeeper activity.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public class BeekeeperMetadataCleanupIntegrationTest extends BeekeeperIntegratio
}

protected static AmazonS3 amazonS3;
private static final String S3_ENDPOINT = ContainerTestUtils.awsServiceEndpoint(S3_CONTAINER, S3);
protected static final String S3_ENDPOINT = ContainerTestUtils.awsServiceEndpoint(S3_CONTAINER, S3);
protected final ExecutorService executorService = Executors.newFixedThreadPool(1);

private static Map<String, String> metastoreProperties = ImmutableMap
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2019-2021 Expedia, Inc.
* Copyright (C) 2019-2025 Expedia, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -82,7 +82,7 @@ public CloseableMetaStoreClientFactory metaStoreClientFactory() {
}

@Bean
Supplier<CloseableMetaStoreClient> metaStoreClientSupplier(
public Supplier<CloseableMetaStoreClient> metaStoreClientSupplier(
CloseableMetaStoreClientFactory metaStoreClientFactory, HiveConf hiveConf) {
String name = "beekeeper-metadata-cleanup";
return new HiveMetaStoreClientSupplier(metaStoreClientFactory, hiveConf, name);
Expand All @@ -108,7 +108,7 @@ public DeletedMetadataReporter deletedMetadataReporter(
}

@Bean(name = "hiveTableCleaner")
MetadataCleaner metadataCleaner(
public MetadataCleaner metadataCleaner(
DeletedMetadataReporter deletedMetadataReporter, IcebergValidator icebergValidator) {
return new HiveMetadataCleaner(deletedMetadataReporter, icebergValidator);
}
Expand All @@ -121,7 +121,7 @@ public AmazonS3 amazonS3() {

@Bean
@Profile("test")
AmazonS3 amazonS3Test() {
public AmazonS3 amazonS3Test() {
String s3Endpoint = System.getProperty("aws.s3.endpoint");
String region = System.getProperty("aws.region");

Expand All @@ -132,7 +132,7 @@ AmazonS3 amazonS3Test() {
}

@Bean
BytesDeletedReporter bytesDeletedReporter(
public BytesDeletedReporter bytesDeletedReporter(
MeterRegistry meterRegistry,
@Value("${properties.dry-run-enabled}") boolean dryRunEnabled) {
return new BytesDeletedReporter(meterRegistry, dryRunEnabled);
Expand All @@ -144,7 +144,7 @@ public S3Client s3Client(AmazonS3 amazonS3, @Value("${properties.dry-run-enabled
}

@Bean(name = "s3PathCleaner")
PathCleaner pathCleaner(
public PathCleaner pathCleaner(
S3Client s3Client,
BytesDeletedReporter bytesDeletedReporter) {
return new S3PathCleaner(s3Client, new S3SentinelFilesCleaner(s3Client), bytesDeletedReporter);
Expand All @@ -162,27 +162,27 @@ public ExpiredMetadataHandler expiredMetadataHandler(
}

@Bean
BeekeeperHistoryService beekeeperHistoryService(BeekeeperHistoryRepository beekeeperHistoryRepository) {
public BeekeeperHistoryService beekeeperHistoryService(BeekeeperHistoryRepository beekeeperHistoryRepository) {
return new BeekeeperHistoryService(beekeeperHistoryRepository);
}

@Bean
CleanupService cleanupService(
public CleanupService cleanupService(
List<MetadataHandler> metadataHandlers,
@Value("${properties.cleanup-page-size}") int pageSize,
@Value("${properties.dry-run-enabled}") boolean dryRunEnabled) {
return new PagingMetadataCleanupService(metadataHandlers, pageSize, dryRunEnabled);
}

@Bean
RepositoryCleanupService repositoryCleanupService(
public RepositoryCleanupService repositoryCleanupService(
HousekeepingMetadataRepository housekeepingMetadataRepository,
@Value("${properties.old-data-retention-period-days}") int retentionPeriodInDays) {
return new MetadataRepositoryCleanupService(housekeepingMetadataRepository, retentionPeriodInDays);
}

@Bean
DisableTablesService disableTablesService(
public DisableTablesService disableTablesService(
HousekeepingMetadataRepository housekeepingMetadataRepository,
CleanerClientFactory cleanerClientFactory,
@Value("${properties.dry-run-enabled}") boolean dryRunEnabled) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public AmazonS3 amazonS3() {

@Bean
@Profile("test")
AmazonS3 amazonS3Test() {
public AmazonS3 amazonS3Test() {
String s3Endpoint = System.getProperty("aws.s3.endpoint");
String region = System.getProperty("aws.region");

Expand All @@ -73,7 +73,7 @@ AmazonS3 amazonS3Test() {
}

@Bean
BytesDeletedReporter bytesDeletedReporter(
public BytesDeletedReporter bytesDeletedReporter(
MeterRegistry meterRegistry,
@Value("${properties.dry-run-enabled}") boolean dryRunEnabled) {
return new BytesDeletedReporter(meterRegistry, dryRunEnabled);
Expand All @@ -85,14 +85,14 @@ public S3Client s3Client(AmazonS3 amazonS3, @Value("${properties.dry-run-enabled
}

@Bean(name = "s3PathCleaner")
PathCleaner pathCleaner(
public PathCleaner pathCleaner(
S3Client s3Client,
BytesDeletedReporter bytesDeletedReporter) {
return new S3PathCleaner(s3Client, new S3SentinelFilesCleaner(s3Client), bytesDeletedReporter);
}

@Bean
CleanupService cleanupService(
public CleanupService cleanupService(
List<GenericPathHandler> pathHandlers,
@Value("${properties.cleanup-page-size}") int pageSize,
@Value("${properties.dry-run-enabled}") boolean dryRunEnabled) {
Expand All @@ -107,12 +107,12 @@ RepositoryCleanupService repositoryCleanupService(
}

@Bean
DisableTablesService disableTablesService() {
public DisableTablesService disableTablesService() {
return () -> {};
}

@Bean
BeekeeperHistoryService beekeeperHistoryService(BeekeeperHistoryRepository beekeeperHistoryRepository) {
public BeekeeperHistoryService beekeeperHistoryService(BeekeeperHistoryRepository beekeeperHistoryRepository) {
return new BeekeeperHistoryService(beekeeperHistoryRepository);
}
}