flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From HuangWHWHW <...@git.apache.org>
Subject [GitHub] flink pull request: [FLINK-2490][FIX]Remove the retryForever check...
Date Wed, 12 Aug 2015 07:50:50 GMT
Github user HuangWHWHW commented on the pull request:

    Hi, I do a test for this today and I got another problem.
    The SocketTextStreamFunction use BufferedReader.read() to get the buffer which is sent
by socket server.
    And whether this function BufferedReader.read() will never return -1 as the end of the
sent message?
    If it was there should be another bug that code following will never be reachable:
    if (data == -1) {
    					long retry = 0;
    					boolean success = false;
    					while ((retry < maxRetry || retryForever) && !success) {
    						if (!retryForever) {
    						LOG.warn("Lost connection to server socket. Retrying in "
    								+ (CONNECTION_RETRY_SLEEP / 1000) + " seconds...");
    						try {
    							socket = new Socket();
    							socket.connect(new InetSocketAddress(hostname, port),
    							success = true;
    						} catch (ConnectException ce) {
    					if (success) {
    						LOG.info("Server socket is reconnected.");
    					} else {
    						LOG.error("Could not reconnect to server socket.");
    					reader = new BufferedReader(new InputStreamReader(socket.getInputStream()));

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message