public override void OperationComplete(ChannelFuture future) { if (future.IsSuccess()) { partition.TransferSuccessful(); } partition.ReleaseExternalResources(); }
// pattern to identify errors related to the client closing the socket early // idea borrowed from Netty SslHandler //seconds // 0 implies no limit // 0 implies Netty default of 2 * number of available processors /* the maximum number of files a single GET request can open simultaneously during shuffle */ /// <exception cref="System.Exception"/> public override void OperationComplete(ChannelFuture future) { if (future.IsSuccess()) { shuffleOutputsOK.Incr(); } else { shuffleOutputsFailed.Incr(); } shuffleConnections.Decr(); }
public void OperationComplete(ChannelFuture future) { if (future.IsSuccess()) { ctx.Channel().Read(); } else { SimpleHttpProxyHandler.Log.Debug("Proxy failed. Cause: ", future.Cause()); future.Channel().Close(); } }
/// <exception cref="System.Exception"/> public override void OperationComplete(ChannelFuture future) { if (!future.IsSuccess()) { future.GetChannel().Close(); return; } int waitCount = this.reduceContext.GetMapsToWait().DecrementAndGet(); if (waitCount == 0) { this._enclosing.metrics.OperationComplete(future); future.GetChannel().Close(); } else { this._enclosing.pipelineFact.GetSHUFFLE().SendMap(this.reduceContext); } }
/// <exception cref="System.Exception"/> public void OperationComplete(ChannelFuture future) { if (future.IsSuccess()) { ctx.Channel().Pipeline().Remove <HttpResponseEncoder>(); HttpRequest newReq = new DefaultFullHttpRequest(HttpVersion.Http11, req.GetMethod (), req.GetUri()); newReq.Headers().Add(req.Headers()); newReq.Headers().Set(HttpHeaders.Names.Connection, HttpHeaders.Values.Close); future.Channel().WriteAndFlush(newReq); } else { DefaultHttpResponse resp = new DefaultHttpResponse(HttpVersion.Http11, HttpResponseStatus .InternalServerError); resp.Headers().Set(HttpHeaders.Names.Connection, HttpHeaders.Values.Close); SimpleHttpProxyHandler.Log.Info("Proxy " + this._enclosing.uri + " failed. Cause: " , future.Cause()); ctx.WriteAndFlush(resp).AddListener(ChannelFutureListener.Close); client.Close(); } }