public DatanodeRegistration getDNRegistrationForNS ( int namespaceId ) throws IOException { NamespaceService nsos = namespaceManager . get ( namespaceId ) ; if ( nsos == null || nsos . getNsRegistration ( ) == null ) { throw new IOException ( "cannot find NSOfferService for namespaceId=" + namespaceId ) ; } return nsos . getNsRegistration ( ) ; }
get datanode registration by namespace id