Chen Liang commented on HDFS-12238:

Actually, I guess it is probably because some places in the code are not even 
setting requestID field...maybe we should either find out all such places and 
make them set request ID, OR in {{sendCommandAsync}}, if it finds out request 
ID is missing, set a random one instead of throwing exception...

> Ozone: Add valid trace ID check in sendCommandAsync
> ---------------------------------------------------
>                 Key: HDFS-12238
>                 URL: https://issues.apache.org/jira/browse/HDFS-12238
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ozone
>    Affects Versions: HDFS-7240
>            Reporter: Anu Engineer
>            Assignee: Ajay Yadav
>              Labels: newbie
>         Attachments: HDFS-12238-HDFS-7240.01.patch
> In the function {{XceiverClientHandler#sendCommandAsync}} we should add a 
> check 
> {code}
>    if(StringUtils.isEmpty(request.getTraceID())) {
>       throw new IllegalArgumentException("Invalid trace ID");
>     }
> {code}
> To ensure that ozone clients always send a valid trace ID. However, when you 
> do that a set of current tests that do add a valid trace ID will fail. So we 
> need to fix these tests too.
> {code}
>   TestContainerMetrics.testContainerMetrics
>   TestOzoneContainer.testBothGetandPutSmallFile
>   TestOzoneContainer.testCloseContainer
>   TestOzoneContainer.testOzoneContainerViaDataNode
>   TestOzoneContainer.testXcieverClientAsync
>   TestOzoneContainer.testCreateOzoneContainer
>   TestOzoneContainer.testDeleteContainer
>   TestContainerServer.testClientServer
>   TestContainerServer.testClientServerWithContainerDispatcher
>   TestKeys.testPutAndGetKeyWithDnRestart
> {code}
> This is based on a comment from [~vagarychen] in HDFS-11580.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to