Yuanbo Liu commented on HDFS-11492:

[~anu] Thanks for your patch. Nice pattern to use dispatcher to handler 
Minor comments:
  Would it be better to init command handler thread in start method, after 
   Runnable processCommandQueue = () -> {}
  Suggest to add Thread.sleep here.
   private long commandshandled;
  Currently I don't foresee the purpose of counting command number here, would 
you please elaborate a bit.

Would you mind renaming it to CommandHandler.java or something else. There is 
already another Handler.java in ozone world.

List<ContainerData> closedContainerList = container.getContainerReports();
      for (ContainerData cd : closedContainerList) {
        Preconditions.checkArgument(!cd.isOpen(), "Closed containers " +
We have filtered the opened container data in 
{{container.getContainerReports();}}, so I think there is no need to check 
whether it's opened in the loop, right? But I'm ok if you wanna keep it.
      LOG.error("Unable to process the Container Report command.", ex);
'return' is unnecessary here.

    for (Handler h : handlers) {
should be handlerMap.containsKey(h.getCommandType())
return new CommandDispatcher(this.container, this.connectionManager,
          this.context, handlerList.toArray(new Handler[0]));
Please use new Handler\[handlerList.size()\] instead.

> Ozone: Add the ability to handle sendContainerReport Command
> ------------------------------------------------------------
>                 Key: HDFS-11492
>                 URL: https://issues.apache.org/jira/browse/HDFS-11492
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ozone
>    Affects Versions: HDFS-7240
>            Reporter: Anu Engineer
>            Assignee: Anu Engineer
>         Attachments: HDFS-11492-HDFS-7240.001.patch
> Once a container report is ready datanodes sends that information to SCM. SCM 
> returns a command asking the data node to send container report. Add the 
> ability to handle this command on datanode side and send the actual container 
> Report.

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