Skip to content

Commit

Permalink
[FLINK-8175] remove flink-streaming-contrib and migrate its classes t…
Browse files Browse the repository at this point in the history
…o flink-streaming-java/scala

update doc

move classes to /experimental

update license header

reorg scala class level

enforce stylecheck and change API annotation

This closes apache#5112.
  • Loading branch information
bowenli86 authored and tillrohrmann committed Jan 16, 2018
1 parent 1440e4f commit 907361d
Show file tree
Hide file tree
Showing 11 changed files with 84 additions and 249 deletions.
7 changes: 5 additions & 2 deletions docs/dev/datastream_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ Flink also provides a sink to collect DataStream results for testing and debuggi
<div class="codetabs" markdown="1">
<div data-lang="java" markdown="1">
{% highlight java %}
import org.apache.flink.contrib.streaming.DataStreamUtils
import org.apache.flink.streaming.experimental.DataStreamUtils

DataStream<Tuple2<String, Integer>> myResult = ...
Iterator<Tuple2<String, Integer>> myOutput = DataStreamUtils.collect(myResult)
Expand All @@ -608,7 +608,7 @@ Iterator<Tuple2<String, Integer>> myOutput = DataStreamUtils.collect(myResult)
<div data-lang="scala" markdown="1">

{% highlight scala %}
import org.apache.flink.contrib.streaming.DataStreamUtils
import org.apache.flink.streaming.experimental.DataStreamUtils
import scala.collection.JavaConverters.asScalaIteratorConverter

val myResult: DataStream[(String, Int)] = ...
Expand All @@ -619,6 +619,9 @@ val myOutput: Iterator[(String, Int)] = DataStreamUtils.collect(myResult.javaStr

{% top %}

**Note:** `flink-streaming-contrib` module is removed from Flink 1.5.0.
Its classes have been moved into `flink-streaming-java` and `flink-streaming-scala`.

Where to go next?
-----------------

Expand Down
187 changes: 0 additions & 187 deletions flink-contrib/flink-streaming-contrib/pom.xml

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion flink-contrib/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ under the License.
<modules>
<module>flink-storm</module>
<module>flink-storm-examples</module>
<module>flink-streaming-contrib</module>
<module>flink-connector-wikiedits</module>
<module>flink-statebackend-rocksdb</module>
</modules>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http:https://www.apache.org/licenses/LICENSE-2.0
* http:https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -15,8 +15,9 @@
* limitations under the License.
*/

package org.apache.flink.contrib.streaming;
package org.apache.flink.streaming.experimental;

import org.apache.flink.annotation.Internal;
import org.apache.flink.api.common.typeutils.TypeSerializer;
import org.apache.flink.configuration.Configuration;
import org.apache.flink.core.memory.DataOutputViewStreamWrapper;
Expand All @@ -28,8 +29,12 @@
import java.net.Socket;

/**
* A specialized data sink to be used by DataStreamUtils.collect.
* A specialized data sink to be used by DataStreamUtils.collect().
*
* <p>This experimental class is relocated from flink-streaming-contrib. Please see package-info.java
* for more information.
*/
@Internal
class CollectSink<IN> extends RichSinkFunction<IN> {

private static final long serialVersionUID = 1L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http:https://www.apache.org/licenses/LICENSE-2.0
* http:https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -15,8 +15,9 @@
* limitations under the License.
*/

package org.apache.flink.contrib.streaming;
package org.apache.flink.streaming.experimental;

import org.apache.flink.annotation.PublicEvolving;
import org.apache.flink.api.common.typeutils.TypeSerializer;
import org.apache.flink.runtime.net.ConnectionUtils;
import org.apache.flink.streaming.api.datastream.DataStream;
Expand All @@ -33,7 +34,11 @@

/**
* A collection of utilities for {@link DataStream DataStreams}.
*
* <p>This experimental class is relocated from flink-streaming-contrib. Please see package-info.java
* for more information.
*/
@PublicEvolving
public final class DataStreamUtils {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http:https://www.apache.org/licenses/LICENSE-2.0
* http:https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -15,8 +15,9 @@
* limitations under the License.
*/

package org.apache.flink.contrib.streaming;
package org.apache.flink.streaming.experimental;

import org.apache.flink.annotation.PublicEvolving;
import org.apache.flink.api.common.typeutils.TypeSerializer;
import org.apache.flink.core.memory.DataInputViewStreamWrapper;

Expand All @@ -35,8 +36,12 @@
* or {@link #hasNext()}, the iterator waits for a socket to connect, and starts receiving,
* deserializing, and returning the data from that socket.
*
* <p>This experimental class is relocated from flink-streaming-contrib. Please see package-info.java
* for more information.
*
* @param <T> The type of elements returned from the iterator.
*/
@PublicEvolving
class SocketStreamIterator<T> implements Iterator<T> {

/** Server socket to listen at. */
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http:https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
* This package holds classes that are experimental.
*
* <p>They are NOT battle-tested code and may be changed or removed in future versions.
*
* <p>None of the classes should be @Public.
*/
package org.apache.flink.streaming.experimental;
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

package org.apache.flink.contrib.streaming;
package org.apache.flink.streaming.experimental;

import org.apache.flink.api.common.typeutils.TypeSerializer;
import org.apache.flink.api.common.typeutils.base.LongSerializer;
Expand All @@ -34,6 +34,9 @@

/**
* Tests for the SocketStreamIterator.
*
* <p>This experimental class is relocated from flink-streaming-contrib. Please see package-info.java
* for more information.
*/
public class SocketStreamIteratorTest {

Expand Down
Loading

0 comments on commit 907361d

Please sign in to comment.