flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-2536) Add a retry for SocketClientSink
Date Thu, 20 Aug 2015 18:27:45 GMT

    [ https://issues.apache.org/jira/browse/FLINK-2536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14705504#comment-14705504
] 

ASF GitHub Bot commented on FLINK-2536:
---------------------------------------

Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1030#discussion_r37564115
  
    --- Diff: flink-staging/flink-streaming/flink-streaming-core/src/test/java/org/apache/flink/streaming/api/functions/sink/SocketClientSinkTest.java
---
    @@ -125,4 +121,102 @@ public void testSocketSink() throws Exception{
     		assertEquals("Connected", this.access);
     		assertEquals("testSocketSinkInvoke", value);
     	}
    +
    +	public Thread t;
    +
    +	@Test
    +	public void testSocketSinkNoRetry() throws Exception{
    +		ServerSocket server = new ServerSocket(0);
    +		port = server.getLocalPort();
    +
    +		new Thread(new Runnable() {
    +
    +			@Override
    +			public void run() {
    +				t = Thread.currentThread();
    +				SerializationSchema<String, byte[]> simpleSchema = new SerializationSchema<String,
byte[]>() {
    +					@Override
    +					public byte[] serialize(String element) {
    +						return element.getBytes();
    +					}
    +				};
    +
    +				try {
    +					SocketClientSink<String> simpleSink = new SocketClientSink<String>(host,
port, simpleSchema, 0);
    +					simpleSink.open(new Configuration());
    +					Thread.sleep(10000);
    --- End diff --
    
    Why do we have to sleep here?


> Add a retry for SocketClientSink
> --------------------------------
>
>                 Key: FLINK-2536
>                 URL: https://issues.apache.org/jira/browse/FLINK-2536
>             Project: Flink
>          Issue Type: Improvement
>          Components: Streaming
>    Affects Versions: 0.10
>            Reporter: Huang Wei
>             Fix For: 0.10
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> I found the SocketClientSink doesn`t use a re-connect when disconnect from the socket
server or get exception.
> I`d like to add a re-connect like socket source for socket sink.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message