Tao Jie commented on HDFS-13418:

Thank you [~linyiqun] for your patient explanation.
I attached a patch in which I add new option {{dfs.net.topology.impl}} to 
config NetworkTopology implementation class when 
{{dfs.use.dfs.network.topology}} is true.
Now if we need to add a new NetworkTopology impl, we can
1, Define {{NewNetworkTopology}} extends {{DFSNetworkTopology}} and config 
{{dfs.net.topology.impl=NewNetworkTopology}} in hdfs-site.xml when it is used 
in HDFS case.
2, Define {{NewNetworkTopology}} extends {{NetworkTopology}} and config 
{{net.topology.impl=NewNetworkTopology}} in core-site.xml and set 
{{dfs.use.dfs.network.topology}} to false when not used in HDFS case
Dose it make sense? [~linyiqun] like to hear your comments:)

>  NetworkTopology should be configurable when enable DFSNetworkTopology
> ----------------------------------------------------------------------
>                 Key: HDFS-13418
>                 URL: https://issues.apache.org/jira/browse/HDFS-13418
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>    Affects Versions: 3.0.1
>            Reporter: Tao Jie
>            Assignee: Tao Jie
>            Priority: Major
>         Attachments: HDFS-13418.001.patch
> In HDFS-11530 we introduce DFSNetworkTopology and in HDFS-11998 we set 
> DFSNetworkTopology as the default implementation.
> We still have {{net.topology.impl=org.apache.hadoop.net.NetworkTopology}} in 
> core-site.default. Actually this property does not effect once 
> {{dfs.use.dfs.network.topology}} is true. 
> in {{DatanodeManager}},networkTopology is initialized as 
> {code}
>     if (useDfsNetworkTopology) {
>       networktopology = DFSNetworkTopology.getInstance(conf);
>     } else {
>       networktopology = NetworkTopology.getInstance(conf);
>     }
> {code}
> I think we should still make the NetworkTopology  configurable rather than 
> hard code the implementation since we may need another NetworkTopology impl.
> I am not sure if there is other consideration. Any thought? [~vagarychen] 
> [~linyiqun]

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