private void respondWithError(ChannelHandlerContext ctx, Throwable error, InputChannelID sourceId) { LOG.debug("Responding with error: {}.", error.getClass()); ctx.writeAndFlush(new NettyMessage.ErrorResponse(error, sourceId)); } }
private void handleException(Channel channel, Throwable cause) throws IOException { LOG.debug("Encountered error while consuming partitions", cause); fatalError = true; releaseAllResources(); if (channel.isActive()) { channel.writeAndFlush(new ErrorResponse(cause)).addListener(ChannelFutureListener.CLOSE); } }
private void respondWithError(ChannelHandlerContext ctx, Throwable error, InputChannelID sourceId) { LOG.debug("Responding with error: {}.", error.getClass()); ctx.writeAndFlush(new NettyMessage.ErrorResponse(error, sourceId)); } }
ErrorResponse msg = new ErrorResponse( new ProducerFailedException(cause), reader.getReceiverId());
ErrorResponse msg = new ErrorResponse( new ProducerFailedException(cause), reader.getReceiverId());
ErrorResponse msg = new ErrorResponse( new ProducerFailedException(cause), reader.getReceiverId());
ErrorResponse msg = new ErrorResponse( new ProducerFailedException(cause), reader.getReceiverId());
decodedMsg = new ErrorResponse();
static ErrorResponse readFrom(ByteBuf buffer) throws Exception { try (ObjectInputStream ois = new ObjectInputStream(new ByteBufInputStream(buffer))) { Object obj = ois.readObject(); if (!(obj instanceof Throwable)) { throw new ClassCastException("Read object expected to be of type Throwable, " + "actual type is " + obj.getClass() + "."); } else { if (buffer.readBoolean()) { InputChannelID receiverId = InputChannelID.fromByteBuf(buffer); return new ErrorResponse((Throwable) obj, receiverId); } else { return new ErrorResponse((Throwable) obj); } } } } }
static ErrorResponse readFrom(ByteBuf buffer) throws Exception { try (ObjectInputStream ois = new ObjectInputStream(new ByteBufInputStream(buffer))) { Object obj = ois.readObject(); if (!(obj instanceof Throwable)) { throw new ClassCastException("Read object expected to be of type Throwable, " + "actual type is " + obj.getClass() + "."); } else { if (buffer.readBoolean()) { InputChannelID receiverId = InputChannelID.fromByteBuf(buffer); return new ErrorResponse((Throwable) obj, receiverId); } else { return new ErrorResponse((Throwable) obj); } } } } }
static ErrorResponse readFrom(ByteBuf buffer) throws Exception { try (ObjectInputStream ois = new ObjectInputStream(new ByteBufInputStream(buffer))) { Object obj = ois.readObject(); if (!(obj instanceof Throwable)) { throw new ClassCastException("Read object expected to be of type Throwable, " + "actual type is " + obj.getClass() + "."); } else { if (buffer.readBoolean()) { InputChannelID receiverId = InputChannelID.fromByteBuf(buffer); return new ErrorResponse((Throwable) obj, receiverId); } else { return new ErrorResponse((Throwable) obj); } } } } }
private void respondWithError(ChannelHandlerContext ctx, Throwable error) { ctx.writeAndFlush(new NettyMessage.ErrorResponse(error)); }
private void respondWithError(ChannelHandlerContext ctx, Throwable error) { ctx.writeAndFlush(new NettyMessage.ErrorResponse(error)); }
private void respondWithError(ChannelHandlerContext ctx, Throwable error) { ctx.writeAndFlush(new NettyMessage.ErrorResponse(error)); }
private void respondWithError(ChannelHandlerContext ctx, Throwable error) { ctx.writeAndFlush(new NettyMessage.ErrorResponse(error)); }
private void handleException(Channel channel, Throwable cause) throws IOException { LOG.error("Encountered error while consuming partitions", cause); fatalError = true; releaseAllResources(); if (channel.isActive()) { channel.writeAndFlush(new ErrorResponse(cause)).addListener(ChannelFutureListener.CLOSE); } }
private void handleException(Channel channel, Throwable cause) throws IOException { LOG.error("Encountered error while consuming partitions", cause); fatalError = true; releaseAllResources(); if (channel.isActive()) { channel.writeAndFlush(new ErrorResponse(cause)).addListener(ChannelFutureListener.CLOSE); } }
private void respondWithError(ChannelHandlerContext ctx, Throwable error, InputChannelID sourceId) { LOG.debug("Responding with error: {}.", error.getClass()); ctx.writeAndFlush(new NettyMessage.ErrorResponse(error, sourceId)); } }
private void respondWithError(ChannelHandlerContext ctx, Throwable error, InputChannelID sourceId) { LOG.debug("Responding with error: {}.", error.getClass()); ctx.writeAndFlush(new NettyMessage.ErrorResponse(error, sourceId)); } }
private void handleException(Channel channel, Throwable cause) throws IOException { LOG.error("Encountered error while consuming partitions", cause); fatalError = true; releaseAllResources(); if (channel.isActive()) { channel.writeAndFlush(new ErrorResponse(cause)).addListener(ChannelFutureListener.CLOSE); } }