[ 
https://issues.apache.org/jira/browse/HADOOP-3935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12622401#action_12622401
 ] 

Konstantin Shvachko commented on HADOOP-3935:
---------------------------------------------

Johan, thanks for doing this. Patch looks much better now. A few more things.
- Throttler is still public and we should make it package private. 
I just removed public from everywhere in the Throttler class, and moved 
TestBlockReplacement into package
org.apache.hadoop.hdfs.server.datanode and everything compiled alright. I think 
this test belongs to the datanode package anyway.
- Why I want to rename Throttler to something less generic? Because if you read 
it together with the package name it says
"hadoop datanode throttler". Which by intention it is not. It throttles block 
transfers for the block scanner and for the balancer
but not the data-node. Another consideration is that we have many other 
throttling mechanisms in different places and may have
more in the future so we will have to distinguish them.
My first proposition was not good.  How about BlockTransferThrottler or please 
feel free to use your own variant.
- I also noticed that DataBlockScanner can be made package private if we move 
TestInterDatanodeProtocol into the same package as above. 
This is optional for this patch because it is not directly related to splitting 
data-node, we can do it separately.

> Extract classes from DataNode.java
> ----------------------------------
>
>                 Key: HADOOP-3935
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3935
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>            Reporter: Johan Oskarsson
>            Assignee: Johan Oskarsson
>            Priority: Trivial
>         Attachments: HADOOP-3935.patch, HADOOP-3935.patch
>
>
> DataNode.java is becoming hard to navigate with over 3000 lines of code. I 
> suggest moving some of the classes out into their own files in the same 
> package. This will also make it easier to see how the classes depend on each 
> other and to see what code belongs where.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to