Skip to content
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
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
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ shadowJar {
exclude {
it.moduleGroup.startsWith('com.fasterxml.jackson') && !it.moduleName.equals('jackson-datatype-joda')
}
exclude "org/slf4j/**"
exclude "org/slf4j/**"
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/kestra/plugin/azure/batch/job/Create.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import jakarta.validation.constraints.NotNull;
import lombok.*;
import lombok.experimental.SuperBuilder;
import org.slf4j.Logger;


import java.io.File;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

package io.kestra.plugin.azure.batch.models;

import io.kestra.core.exceptions.IllegalVariableEvaluationException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@
import jakarta.validation.constraints.NotNull;
import lombok.*;
import lombok.experimental.SuperBuilder;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;

import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

Expand All @@ -50,7 +49,7 @@
import java.util.concurrent.atomic.AtomicReference;


@Slf4j

@SuperBuilder
@ToString
@EqualsAndHashCode
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/io/kestra/plugin/azure/eventhubs/Consume.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;


import java.io.BufferedOutputStream;
import java.io.File;
Expand Down Expand Up @@ -79,7 +78,7 @@
@Schema(
title = "Consume events from Azure Event Hubs."
)
@Slf4j

@SuperBuilder
@NoArgsConstructor
@Getter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@
import java.time.Duration;
import java.util.Map;


/**
* Base class for implementing tasks that consume events into EventHubs.
* This class provides all required and optional parameters.
*/
public interface EventHubConsumerInterface extends EventHubClientInterface {

// TASK'S PARAMETERS
@Schema(
title = "The Deserializer to be used for serializing the event value."
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/io/kestra/plugin/azure/eventhubs/Produce.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import jakarta.validation.constraints.NotNull;
import lombok.*;
import lombok.experimental.SuperBuilder;
import lombok.extern.slf4j.Slf4j;


import java.io.*;
import java.util.HashMap;
Expand Down Expand Up @@ -86,7 +86,7 @@
@Schema(
title = "Publish events to Azure Event Hubs."
)
@Slf4j

@SuperBuilder
@Getter
@NoArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
title = "Trigger a flow on message consumption in real-time from Azure Event Hubs.",
description = "If you would like to consume multiple messages processed within a given time frame and process them in batch, you can use the [io.kestra.plugin.azure.eventhubs.Trigger](https://kestra.io/plugins/plugin-azure/triggers/io.kestra.plugin.azure.eventhubs.trigger) instead."
)
@Slf4j

@NoArgsConstructor
@SuperBuilder
@ToString
Expand Down
11 changes: 9 additions & 2 deletions src/main/java/io/kestra/plugin/azure/eventhubs/Trigger.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.*;
import lombok.experimental.SupperBuilder;
import lombok.experimental.SuperBuilder;
import lombok.extern.slf4j.Slf4j;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


import java.time.Duration;
import java.util.Collections;
Expand Down Expand Up @@ -56,14 +61,16 @@
title = "Trigger a flow on message consumption periodically from Azure Event Hubs.",
description = "If you would like to consume each message from Azure Event Hubs in real-time and create one execution per message, you can use the [io.kestra.plugin.azure.eventhubs.RealtimeTrigger](https://kestra.io/plugins/plugin-azure/triggers/io.kestra.plugin.azure.eventhubs.realtimetrigger) instead."
)
@Slf4j

@NoArgsConstructor
@SuperBuilder
@ToString
@EqualsAndHashCode
@Getter
public class Trigger extends AbstractTrigger implements EventHubConsumerInterface, EventHubBatchConsumerInterface, PollingTriggerInterface, TriggerOutput<Consume.Output> {

private static final Logger log = LoggerFactory.getLogger(Trigger.class);

// TRIGGER'S PROPERTIES
@Builder.Default
private Duration interval = Duration.ofSeconds(60);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,19 @@
import io.kestra.plugin.azure.eventhubs.config.BlobContainerClientConfig;
import io.kestra.plugin.azure.eventhubs.config.EventHubClientConfig;
import io.kestra.plugin.azure.eventhubs.config.EventHubConsumerConfig;
import lombok.extern.slf4j.Slf4j;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.time.Duration;
import java.util.Objects;
import java.util.Optional;

@Slf4j
public class EventHubClientFactory {

private static final Logger log = LoggerFactory.getLogger(EventHubClientFactory.class);


/**
* Factory method for constructing a new {@link EventHubClientBuilder} for the given config.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package io.kestra.plugin.azure.eventhubs.service.consumer;
import org.slf4j.Logger;

import io.kestra.plugin.azure.eventhubs.service.EventDataObjectConverter;
import org.slf4j.Logger;


import java.time.Duration;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
package io.kestra.plugin.azure.eventhubs.service.consumer;
import org.slf4j.Logger;

import com.azure.messaging.eventhubs.CheckpointStore;
import com.azure.messaging.eventhubs.EventData;
Expand All @@ -12,8 +13,7 @@
import io.kestra.plugin.azure.eventhubs.client.EventHubClientFactory;
import io.kestra.plugin.azure.eventhubs.config.EventHubConsumerConfig;
import io.kestra.plugin.azure.eventhubs.model.EventDataObject;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;


import java.util.Collection;
import java.util.Collections;
Expand All @@ -31,7 +31,6 @@

import static io.kestra.core.utils.Rethrow.throwFunction;

@Slf4j
public final class EventHubConsumerService {

private final EventHubClientFactory clientFactory;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
package io.kestra.plugin.azure.eventhubs.service.producer;
import org.slf4j.Logger;

import com.azure.messaging.eventhubs.EventData;
import com.azure.messaging.eventhubs.EventDataBatch;
Expand All @@ -10,7 +11,7 @@
import io.kestra.plugin.azure.eventhubs.config.EventHubConsumerConfig;
import io.kestra.plugin.azure.eventhubs.model.EventDataObject;
import io.kestra.plugin.azure.eventhubs.service.EventDataObjectConverter;
import org.slf4j.Logger;

import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.kestra.plugin.azure.eventhubs.service.producer;

import org.slf4j.Logger;

import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
package io.kestra.plugin.azure.storage.adls;
import org.slf4j.Logger;

import com.azure.storage.file.datalake.DataLakeFileClient;
import io.kestra.core.models.annotations.Example;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
package io.kestra.plugin.azure.storage.adls;
import org.slf4j.Logger;

import com.azure.storage.file.datalake.DataLakeFileClient;
import com.azure.storage.file.datalake.DataLakeFileSystemClient;
Expand All @@ -21,7 +22,7 @@
import lombok.*;
import lombok.experimental.SuperBuilder;
import org.apache.commons.lang3.tuple.Pair;
import org.slf4j.Logger;

import reactor.core.publisher.Flux;
import reactor.core.publisher.FluxSink;
import reactor.core.scheduler.Schedulers;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
package io.kestra.plugin.azure.storage.adls;
import org.slf4j.Logger;

import com.azure.storage.file.datalake.DataLakeFileClient;
import com.azure.storage.file.datalake.DataLakeServiceClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import lombok.*;
import lombok.experimental.SuperBuilder;
import org.apache.commons.lang3.tuple.Pair;
import org.slf4j.Logger;


import java.util.NoSuchElementException;
import java.util.function.Function;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import jakarta.inject.Named;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.slf4j.event.Level;
//import org.slf4j.event.Level;
import reactor.core.publisher.Flux;

import java.io.InputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
import org.mockito.Mockito;
import org.mockito.junit.jupiter.MockitoExtension;
import org.mockito.stubbing.Answer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import reactor.core.publisher.Mono;

import java.io.BufferedReader;
Expand Down
Loading