Skip to content
Closed
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
10 changes: 9 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ on:
description: "The branch to use to build a SNAPSHOT from."
required: true
default: "main"
skip-tests:
type: choice
description: Whether to skip tests?
required: false
options:
- "true"
- "false"
default: "false"
jobs:
deploy:
name: Build SNAPSHOT to Sonatype
Expand Down Expand Up @@ -33,7 +41,7 @@ jobs:
settings-path: ${{ github.workspace }}

- name: Run Maven Targets
run: mvn deploy jacoco:report checkstyle:checkstyle spotbugs:spotbugs --settings $GITHUB_WORKSPACE/settings.xml --batch-mode --show-version --no-transfer-progress --activate-profiles sonatype-oss-release-github-actions
run: mvn deploy -DskipTests=${{ github.event.inputs.skip-tests }} jacoco:report checkstyle:checkstyle spotbugs:spotbugs --settings $GITHUB_WORKSPACE/settings.xml --batch-mode --show-version --no-transfer-progress --activate-profiles sonatype-oss-release-github-actions
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ public ExpiredHousekeepingMetadataGenerator(String cleanupDelay) {
@Override
public List<HousekeepingEntity> generate(ListenerEvent listenerEvent, String clientId) {
List<HousekeepingEntity> housekeepingEntities = new ArrayList<>();
log
.info("Processing '{}' event for table: {}.{}", listenerEvent.getEventType(), listenerEvent.getDbName(),
listenerEvent.getTableName());

switch (listenerEvent.getEventType()) {
case CREATE_TABLE:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ public UnreferencedHousekeepingPathGenerator(String cleanupDelay) {
@Override
public List<HousekeepingEntity> generate(ListenerEvent listenerEvent, String clientId) {
List<HousekeepingEntity> housekeepingEntities = new ArrayList<>();
log
.info("Processing '{}' event for table: {}.{}", listenerEvent.getEventType(), listenerEvent.getDbName(),
listenerEvent.getTableName());

switch (listenerEvent.getEventType()) {
case ALTER_PARTITION:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) 2019-2023 Expedia, Inc.
* Copyright (C) 2019-2024 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 @@ -45,9 +45,12 @@ public MessageEventHandler(HousekeepingEntityGenerator generator, List<ListenerE

public List<HousekeepingEntity> handleMessage(MessageEvent event) {
ListenerEvent listenerEvent = event.getEvent();
log.info("Filtering message {}, generator {}", filters, generator.getClass().getSimpleName());
if (shouldFilterMessage(listenerEvent)) {
log.info("Filtered message {}", event);
return Collections.emptyList();
}
log.info("Filtered message");
return generateHousekeepingEntities(listenerEvent);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public Optional<BeekeeperEvent> read() {
}

MessageEvent message = messageEvent.get();

log.info("Received message: {}", message);
List<HousekeepingEntity> housekeepingEntities = handlers.parallelStream()
.map(eventHandler -> eventHandler.handleMessage(message))
.flatMap(Collection::stream)
Expand Down