Skip to content

Commit

Permalink
[dsl-euphoria] apache#29451 deprecate Euphoria DSL
Browse files Browse the repository at this point in the history
  • Loading branch information
je-ik committed Nov 16, 2023
1 parent 729c4de commit f9b9d9a
Show file tree
Hide file tree
Showing 74 changed files with 263 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
* during the flow execution.
*
* <p>Accumulators are inspired by the Hadoop/MapReduce counters.
*
* @deprecated Use Java SDK directly, Euphoria is scheduled for removal in a future release.
*/
@Audience(Audience.Type.INTERNAL)
@Deprecated
public interface Accumulator {}
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@
/**
* Provides access to an accumulator backend service. It is intended to be implemented by third
* party to support different type of services.
*
* @deprecated Use Java SDK directly, Euphoria is scheduled for removal in a future release.
*/
@Audience(Audience.Type.EXECUTOR)
@Deprecated
public interface AccumulatorProvider {

static AccumulatorProvider.Factory of(Pipeline pipeline) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@

import org.apache.beam.sdk.extensions.euphoria.core.annotation.audience.Audience;

/** Counter is a type of accumulator making a sum from integral numbers. */
/**
* Counter is a type of accumulator making a sum from integral numbers.
*
* @deprecated Use Java SDK directly, Euphoria is scheduled for removal in a future release.
*/
@Audience(Audience.Type.CLIENT)
@Deprecated
public interface Counter extends Accumulator {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@

import org.apache.beam.sdk.extensions.euphoria.core.annotation.audience.Audience;

/** Histogram is a type of accumulator recording a distribution of different values. */
/**
* Histogram is a type of accumulator recording a distribution of different values.
*
* @deprecated Use Java SDK directly, Euphoria is scheduled for removal in a future release.
*/
@Audience(Audience.Type.CLIENT)
@Deprecated
public interface Histogram extends Accumulator {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@
/**
* Timer provides convenience API very similar to {@link Histogram} but extended by time unit
* support.
*
* @deprecated Use Java SDK directly, Euphoria is scheduled for removal in a future release.
*/
@Audience(Audience.Type.CLIENT)
@Deprecated
public interface Timer extends Accumulator {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@
/**
* Placeholder implementation of {@link AccumulatorProvider} that may be used in executors as a
* default.
*
* @deprecated Use Java SDK directly, Euphoria is scheduled for removal in a future release.
*/
@Audience(Audience.Type.EXECUTOR)
@Deprecated
public class VoidAccumulatorProvider implements AccumulatorProvider {

private static final Logger LOG = LoggerFactory.getLogger(VoidAccumulatorProvider.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@
* @param <LeftT> the type of the left operand
* @param <RightT> the type of the right operand
* @param <OutputT> the type of the result of the function application
* @deprecated Use Java SDK directly, Euphoria is scheduled for removal in a future release.
*/
@Audience(Audience.Type.CLIENT)
@FunctionalInterface
@Deprecated
public interface BinaryFunction<LeftT, RightT, OutputT> extends Serializable {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,14 @@
import org.apache.beam.sdk.extensions.euphoria.core.annotation.audience.Audience;
import org.apache.beam.sdk.extensions.euphoria.core.client.io.Collector;

/** Functor of two arguments. */
/**
* Functor of two arguments.
*
* @deprecated Use Java SDK directly, Euphoria is scheduled for removal in a future release.
*/
@Audience(Audience.Type.CLIENT)
@FunctionalInterface
@Deprecated
public interface BinaryFunctor<LeftT, RightT, OutputT> extends Serializable {

void apply(LeftT left, RightT right, Collector<OutputT> context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@

import org.apache.beam.sdk.extensions.euphoria.core.annotation.audience.Audience;

/** Function of two arguments of the same type. */
/**
* unction of two arguments of the same type.
*
* @deprecated Use Java SDK directly, Euphoria is scheduled for removal in a future release.
*/
@Audience(Audience.Type.CLIENT)
@FunctionalInterface
@Deprecated
public interface CombinableBinaryFunction<T> extends SameArgsBinaryFunction<T, T> {}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
/**
* Function reducing stream of elements into single one of the same type. The applied function has
* to be commutative associative.
*
* @deprecated Use Java SDK directly, Euphoria is scheduled for removal in a future release.
*/
@Audience(Audience.Type.CLIENT)
@FunctionalInterface
@Deprecated
public interface CombinableReduceFunction<T> extends ReduceFunction<T, T> {}
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@

import org.apache.beam.sdk.extensions.euphoria.core.annotation.audience.Audience;

/** A function that is composition of two unary functions. */
/**
* A function that is composition of two unary functions.
*
* @deprecated Use Java SDK directly, Euphoria is scheduled for removal in a future release.
*/
@Audience(Audience.Type.CLIENT)
@Deprecated
public class CompositeUnaryFunction<InputT, OutputT, X> implements UnaryFunction<InputT, OutputT> {

private final UnaryFunction<InputT, X> first;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,14 @@
import java.io.Serializable;
import org.apache.beam.sdk.extensions.euphoria.core.annotation.audience.Audience;

/** A consumer of given type. */
/**
* A consumer of given type.
*
* @deprecated Use Java SDK directly, Euphoria is scheduled for removal in a future release.
*/
@Audience(Audience.Type.CLIENT)
@FunctionalInterface
@Deprecated
public interface Consumer<T> extends Serializable {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@
import java.io.Serializable;
import org.apache.beam.sdk.extensions.euphoria.core.annotation.audience.Audience;

/** @param <InputT> type of input to extract timestamp from */
/**
* @param <InputT> type of input to extract timestamp from
* @deprecated Use Java SDK directly, Euphoria is scheduled for removal in a future release.
*/
@Audience(Audience.Type.CLIENT)
@FunctionalInterface
@Deprecated
public interface ExtractEventTime<InputT> extends Serializable {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@

/**
* Reduce function reducing iterable of elements into single element (of possibly different type).
*
* @deprecated Use Java SDK directly, Euphoria is scheduled for removal in a future release.
*/
@Audience(Audience.Type.CLIENT)
@FunctionalInterface
@Deprecated
public interface ReduceFunction<InputT, OutputT> extends UnaryFunction<Stream<InputT>, OutputT> {}
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@
/**
* Reduce function reducing iterable of elements into multiple elements (of possibly different
* type).
*
* @deprecated Use Java SDK directly, Euphoria is scheduled for removal in a future release.
*/
@Audience(Audience.Type.CLIENT)
@FunctionalInterface
@Deprecated
public interface ReduceFunctor<InputT, OutputT> extends UnaryFunctor<Stream<InputT>, OutputT> {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@

import org.apache.beam.sdk.extensions.euphoria.core.annotation.audience.Audience;

/** Function of two arguments of the same type. */
/**
* Function of two arguments of the same type.
*
* @deprecated Use Java SDK directly, Euphoria is scheduled for removal in a future release.
*/
@Audience(Audience.Type.INTERNAL)
@FunctionalInterface
@Deprecated
public interface SameArgsBinaryFunction<InputT, OutputT>
extends BinaryFunction<InputT, InputT, OutputT> {}
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@
* {@link #get()}.
*
* @param <T> the type of results supplied by this supplier
* @deprecated Use Java SDK directly, Euphoria is scheduled for removal in a future release.
*/
@FunctionalInterface
@Deprecated
public interface Supplier<T> extends Serializable {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,14 @@
import java.io.Serializable;
import org.apache.beam.sdk.extensions.euphoria.core.annotation.audience.Audience;

/** Function taking three arguments. */
/**
* Function taking three arguments.
*
* @deprecated Use Java SDK directly, Euphoria is scheduled for removal in a future release.
*/
@Audience(Audience.Type.CLIENT)
@FunctionalInterface
@Deprecated
public interface TernaryFunction<FirstT, SecondT, ThirdT, OutputT> extends Serializable {

OutputT apply(FirstT first, SecondT second, ThirdT third);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@
*
* @param <InputT> the type of the element processed
* @param <OutputT> the type of the result applying element to the function
* @deprecated Use Java SDK directly, Euphoria is scheduled for removal in a future release.
*/
@Audience(Audience.Type.CLIENT)
@FunctionalInterface
@Deprecated
public interface UnaryFunction<InputT, OutputT> extends Serializable {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@
*
* @param <InputT> the type of the element processed
* @param <OutputT> the type of the result applying element to the function
* @deprecated Use Java SDK directly, Euphoria is scheduled for removal in a future release.
*/
@Audience(Audience.Type.CLIENT)
@FunctionalInterface
@Deprecated
public interface UnaryFunctionEnv<InputT, OutputT> extends Serializable {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@
/**
* Functor of single argument. Functor can produce zero or more elements in return to a call, for
* which it uses a collector.
*
* @deprecated Use Java SDK directly, Euphoria is scheduled for removal in a future release.
*/
@Audience(Audience.Type.CLIENT)
@FunctionalInterface
@Deprecated
public interface UnaryFunctor<InputT, OutputT> extends Serializable {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@

import org.apache.beam.sdk.extensions.euphoria.core.annotation.audience.Audience;

/** Binary function of X returning boolean. */
/**
* Binary function of X returning boolean.
*
* @deprecated Use Java SDK directly, Euphoria is scheduled for removal in a future release.
*/
@Audience(Audience.Type.CLIENT)
@FunctionalInterface
@Deprecated
public interface UnaryPredicate<T> extends UnaryFunction<T, Boolean> {}
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,14 @@
import java.io.Serializable;
import org.apache.beam.sdk.extensions.euphoria.core.annotation.audience.Audience;

/** Function taking zero arguments. */
/**
* Function taking zero arguments.
*
* @deprecated Use Java SDK directly, Euphoria is scheduled for removal in a future release.
*/
@Audience(Audience.Type.CLIENT)
@FunctionalInterface
@Deprecated
public interface VoidFunction<T> extends Serializable {

T apply();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@
* Extends {@link Environment} with write capability. Used in user defined functors.
*
* @param <T> the type of elements collected through this context
* @deprecated Use Java SDK directly, Euphoria is scheduled for removal in a future release.
*/
@Audience(Audience.Type.CLIENT)
@Deprecated
public interface Collector<T> extends Environment {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@

import org.apache.beam.sdk.extensions.euphoria.core.annotation.audience.Audience;

/** Used in user defined functions to access environment methods. */
/**
* Used in user defined functions to access environment methods.
*
* @deprecated Use Java SDK directly, Euphoria is scheduled for removal in a future release.
*/
@Audience(Audience.Type.CLIENT)
@Deprecated
public interface Context extends Environment {}
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,13 @@
import org.apache.beam.sdk.extensions.euphoria.core.client.accumulators.Histogram;
import org.apache.beam.sdk.extensions.euphoria.core.client.accumulators.Timer;

/** Defines basic methods available in user defined functions. */
/**
* Defines basic methods available in user defined functions.
*
* @deprecated Use Java SDK directly, Euphoria is scheduled for removal in a future release.
*/
@Audience(Audience.Type.CLIENT)
@Deprecated
public interface Environment {

// ---------------- Aggregator related methods ------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@
/**
* Composite operator using two {@link Filter} operators to split a {@link PCollection} into two
* subsets using provided {@link UnaryPredicate}.
*
* @deprecated Use Java SDK directly, Euphoria is scheduled for removal in a future release.
*/
@Audience(Audience.Type.CLIENT)
@Derived(state = StateComplexity.ZERO, repartitions = 0)
@Deprecated
public class Split {

static final String DEFAULT_NAME = "Split";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,16 @@
* .eventTimeBy(evt-time-fn)
* .output();
* }</pre>
*
* @deprecated Use Java SDK directly, Euphoria is scheduled for removal in a future release.
*/
@Audience(Audience.Type.CLIENT)
@Derived(state = StateComplexity.ZERO, repartitions = 0)
@SuppressWarnings({
"rawtypes", // TODO(https://github.com/apache/beam/issues/20447)
"nullness" // TODO(https://github.com/apache/beam/issues/20497)
})
@Deprecated
public class AssignEventTime<InputT> extends Operator<InputT>
implements CompositeOperator<InputT, InputT> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
*
* @param <InputT> type of input
* @param <OutputT> type of output
* @deprecated Use Java SDK directly, Euphoria is scheduled for removal in a future release.
*/
@Deprecated
public interface CompositeOperator<InputT, OutputT> {

/**
Expand Down
Loading

0 comments on commit f9b9d9a

Please sign in to comment.