stevenzwu edited a comment on issue #8665: [FLINK-12781] [Runtime/REST] include 
the whole stack trace in response payload
URL: https://github.com/apache/flink/pull/8665#issuecomment-508198033
 
 
   @StephanEwen that is a great point. I should have looked into what the test 
failure really means, instead of just increase the max content length in the 
test class. there are already a few test methods verify the max content length.
   
   I can get the maxContentLength config from `FlinkHttpObjectAggregator` 
ChannelHandler. However, I found it tricky to determine the truncation size, 
because there are some other byte overhead in the payload. e.g. for the 
`RestServerEndpointITCase`, the magic number seems to be 81. I will update PR 
with a 1 KB overhead buffer. Let me know if you have any other suggestion.
   ```
   FlinkHttpObjectAggregator flinkHttpObjectAggregator = 
ctx.pipeline().get(FlinkHttpObjectAggregator.class);
                        String stackTrace = 
Ascii.truncate(ExceptionUtils.stringifyException(rhe), 
flinkHttpObjectAggregator.maxContentLength() - 81, "...");
   ```

----------------------------------------------------------------
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

Reply via email to