[
https://issues.apache.org/jira/browse/HBASE-20942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16594274#comment-16594274
]
Krish Dey commented on HBASE-20942:
-----------------------------------
Hi [~elserj],
Thanks for the advice here.
Will follow it.
On your comment.
{code:java}
RpcServer mockServer = Mockito.mock(RpcServer.class);
Mockito.when(mockServer.truncateTraceLogLength(Mockito.any(String.class))).thenCallRealMethod();
{code}
Well I could have done it. But I want to pass the configuration for example.
conf.setInt("hbase.ipc.trace.log.max.length", 250);
This will test the scenario that the configuration is used correctly for the
variable traceLogMaxLength.
Thanks again.
Krish
> Improve RpcServer TRACE logging
> -------------------------------
>
> Key: HBASE-20942
> URL: https://issues.apache.org/jira/browse/HBASE-20942
> Project: HBase
> Issue Type: Task
> Reporter: Esteban Gutierrez
> Assignee: Krish Dey
> Priority: Major
> Attachments: HBASE-20942.002.patch, HBASE-20942.003.patch,
> HBASE-20942.004.patch
>
>
> Two things:
> * We truncate RpcServer output to 1000 characters for trace logging. Would
> be better if that value was configurable.
> * There is the chance for an ArrayIndexOutOfBounds when truncating the TRACE
> log message.
> Esteban mentioned this to me earlier, so I'm crediting him as the reporter.
> cc: [~elserj]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)