[
https://issues.apache.org/jira/browse/HDFS-3421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13284370#comment-13284370
]
Uma Maheswara Rao G commented on HDFS-3421:
-------------------------------------------
Looks it is caching the mapping because you might use
CachedDNSToSwitchMapping#resolve internally for resolving .
Here is the relevent code, where it caches the mappings
{code}
@Override
public List<String> resolve(List<String> names) {
// normalize all input names to be in the form of IP addresses
names = NetUtils.normalizeHostNames(names);
List <String> result = new ArrayList<String>(names.size());
if (names.isEmpty()) {
return result;
}
List<String> uncachedHosts = getUncachedHosts(names);
// Resolve the uncached hosts
List<String> resolvedHosts = rawMapping.resolve(uncachedHosts);
//cache them
cacheResolvedHosts(uncachedHosts, resolvedHosts);
//now look up the entire list in the cache
return getCachedHosts(names);
}
{code}
I am not sure, wehtehr we have an option to disable this caching by using other
mappings.
Any one know about that?
> ( Dynamic Rack Addition ) : After adding new Datanode in cluster not possible
> to change the rack of Datanode without restarts the Namenode.
> -------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HDFS-3421
> URL: https://issues.apache.org/jira/browse/HDFS-3421
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: name-node
> Environment: One NameNode and three DataNodes each datanode in
> diffrent rack
> Reporter: surendra singh lilhore
>
> Scenario:
> I am using the script Mapping Technique for Dynamic Addition of rack.
> 1. Namenode is running with three
> datanode(xx.xx.xx.45,xx.xx.xx.91,xx.xx.xx.157)
> xx.xx.xx.45 : /datacenter1/rack1
> xx.xx.xx.91 : /datacenter1/rack2
> xx.xx.xx.157 :/datacenter1/rack3
> 2. Stop datanode xx.xx.xx.157.
> 3. change the rack of xx.xx.xx.157 to rack4 in Script file.
> 'xx.xx.xx.45' : '/datacenter1/rack1'
> 'xx.xx.xx.91' : '/datacenter1/rack2'
> 'xx.xx.xx.157' : '/datacenter1/rack4'
> 4. Start datanode xx.xx.xx.157.
> Expected Result : Datanode Should be add in rack4
> Actual Result : Datanode Added in old rack only (rack3).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira