public DatanodeProtocol getNSNamenode ( int namespaceId ) throws IOException { NamespaceService nsos = namespaceManager . get ( namespaceId ) ; if ( nsos == null || nsos . getDatanodeProtocol ( ) == null ) { throw new IOException ( "cannot find a namnode proxy for namespaceId=" + namespaceId ) ; } return nsos . getDatanodeProtocol ( ) ; }
Get namenode corresponding to a namespace