dlogothetis commented on a change in pull request #118: Fix issues with channel
re-connection
URL: https://github.com/apache/giraph/pull/118#discussion_r358403405
##########
File path:
giraph-core/src/main/java/org/apache/giraph/worker/BspServiceWorker.java
##########
@@ -217,7 +217,16 @@ public BspServiceWorker(
getGraphPartitionerFactory().createWorkerGraphPartitioner();
workerInfo = new WorkerInfo();
workerServer = new NettyWorkerServer<I, V, E>(conf, this, context,
- graphTaskManager.createUncaughtExceptionHandler());
+ graphTaskManager.createUncaughtExceptionHandler(
+ (thread, throwable) -> {
+ // If the connection was closed by the client, then we just log
+ // the error, we do not fail the job, since the client will
+ // attempt to reconnect.
+ return throwable.getMessage().startsWith(
+ "Connection reset by peer") ? false : true;
Review comment:
The exception is IOException which is very general, at this point i'd like
to distinguish, and the message was the only way i could find.
As opposed to making this a constant, i'll make the whole logic a function.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services