shaded-guava:21.0

Relocates com.google.* from the guava libaries to cz.seznam.euphoria.shaded.guava.com.google.* to avoid clashes with other versions of the guava library.

License

License

Categories

Categories

Guava General Purpose Libraries Utility
GroupId

GroupId

cz.seznam.euphoria
ArtifactId

ArtifactId

shaded-guava
Last Version

Last Version

21.0
Release Date

Release Date

Type

Type

jar
Description

Description

shaded-guava:21.0
Relocates com.google.* from the guava libaries to cz.seznam.euphoria.shaded.guava.com.google.* to avoid clashes with other versions of the guava library.
Project URL

Project URL

https://github.com/seznam/euphoria

Download shaded-guava

How to add to project

<!-- https://jarcasting.com/artifacts/cz.seznam.euphoria/shaded-guava/ -->
<dependency>
    <groupId>cz.seznam.euphoria</groupId>
    <artifactId>shaded-guava</artifactId>
    <version>21.0</version>
</dependency>
// https://jarcasting.com/artifacts/cz.seznam.euphoria/shaded-guava/
implementation 'cz.seznam.euphoria:shaded-guava:21.0'
// https://jarcasting.com/artifacts/cz.seznam.euphoria/shaded-guava/
implementation ("cz.seznam.euphoria:shaded-guava:21.0")
'cz.seznam.euphoria:shaded-guava:jar:21.0'
<dependency org="cz.seznam.euphoria" name="shaded-guava" rev="21.0">
  <artifact name="shaded-guava" type="jar" />
</dependency>
@Grapes(
@Grab(group='cz.seznam.euphoria', module='shaded-guava', version='21.0')
)
libraryDependencies += "cz.seznam.euphoria" % "shaded-guava" % "21.0"
[cz.seznam.euphoria/shaded-guava "21.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

Euphoria

Build Status

Euphoria is an open source Java API for creating unified big-data processing flows. It provides an engine independent programming model that can express both batch and stream transformations.

The main goal of the API is to ease the creation of programs with business logic independent of a specific runtime framework/engine and independent of the source or destination of the processed data. Such programs are then transferable with little effort to new environments and new data sources or destinations - idealy just by configuration.

Key features

  • Unified API that supports both batch and stream processing using the same code
  • Avoids vendor lock-in - migrating between different engines is matter of configuration
  • Declarative Java API using Java 8 Lambda expressions
  • Support for different notions of time (event time, ingestion time)
  • Flexible windowing (Time, TimeSliding, Session, Count)

Download

The best way to use Euphoria is by adding the following Maven dependency to your pom.xml:

<dependency>
  <groupId>cz.seznam.euphoria</groupId>
  <artifactId>euphoria-core</artifactId>
  <version>0.7.0</version>
</dependency>

You may want to add additional modules, such as support of various engines or I/O data sources/sinks. For more details read the Maven Dependencies wiki page.

WordCount example

// Define data source and data sinks
DataSource<String> dataSource = new SimpleHadoopTextFileSource(inputPath);
DataSink<String> dataSink = new SimpleHadoopTextFileSink<>(outputPath);

// Define a flow, i.e. a chain of transformations
Flow flow = Flow.create("WordCount");

Dataset<String> lines = flow.createInput(dataSource);

Dataset<String> words = FlatMap.named("TOKENIZER")
    .of(lines)
    .using((String line, Collector<String> context) -> {
      for (String word : line.split("\\s+")) {
        context.collect(word);
      }
    })
    .output();

Dataset<Pair<String, Long>> counted = ReduceByKey.named("COUNT")
    .of(words)
    .keyBy(w -> w)
    .valueBy(w -> 1L)
    .combineBy(Sums.ofLongs())
    .output();

MapElements.named("FORMAT")
    .of(counted)
    .using(p -> p.getFirst() + "\n" + p.getSecond())
    .output()
    .persist(dataSink);

// Initialize an executor and run the flow (using Apache Flink)
try {
  Executor executor = new FlinkExecutor();
  executor.submit(flow).get();
} catch (InterruptedException ex) {
  LOG.warn("Interrupted while waiting for the flow to finish.", ex);
} catch (IOException | ExecutionException ex) {
  throw new RuntimeException(ex);
}

Supported Engines

Euphoria translates flows, also known as data transformation pipelines, into the specific API of a chosen, supported big-data processing engine. Currently, the following are supported:

  • Apache Flink
  • Apache Spark
  • An independent, standalone, in-memory engine which is part of the Euphoria project suitable for running flows in unit tests.

In the WordCount example from above, to switch the execution engine from Apache Flink to Apache Spark, we'd merely need to replace FlinkExecutor with SparkExecutor.

Bugs / Features / Contributing

There's still a lot of room for improvements and extensions. Have a look into the issue tracker and feel free to contribute by reporting new problems, contributing to existing ones, or even open issues in case of questions. Any constructive feedback is warmly welcome!

As usually with open source, don't hesitate to fork the repo and submit a pull requests if you see something to be changed. We'll be happy see euphoria improving over time.

Building

To build the Euphoria artifacts, the following is required:

  • Git
  • Java 8

Building the project itself is a matter of:

git clone https://github.com/seznam/euphoria
cd euphoria
./gradlew publishToMavenLocal -xtest

Documentation

Contact us

License

Euphoria is licensed under the terms of the Apache License 2.0.

cz.seznam.euphoria

Seznam.cz a.s.

Versions

Version
21.0