[ 
https://issues.apache.org/jira/browse/HDFS-15599?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17202523#comment-17202523
 ] 

Fengnan Li commented on HDFS-15599:
-----------------------------------

Thanks for the pointer [~ayushtkn] [~elgoiri] 

Actually I have thought about HDFS-14249 which provides the ability from Router 
admin, but not for the clients. To solve our problem, a programmatically 
accessible API is needed. Think about when Hive wants to rename to promote a 
table from staging to prod, it needs to check the targeted location is in the 
same cluster or not with the cluster holding the staging db.

> RBF: Add API to expose resolved destinations (namespace) in Router
> ------------------------------------------------------------------
>
>                 Key: HDFS-15599
>                 URL: https://issues.apache.org/jira/browse/HDFS-15599
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: Fengnan Li
>            Assignee: Fengnan Li
>            Priority: Major
>
> We have seen quite often requests like where a path in Router is actually 
> pointed. Two main use cases are:
> 1) Calculate the HDFS capacity usage allocation of all Hive tables, whose 
> have onboarded to Router.
> 2) A failure prevention method for cross-cluster rename. First check the 
> source HDFS location and dest HDFS location, and then issue a distcp cmd if 
> possible to avoid the Exception.
> Inside Router, the function getLocationsForPath does the work but it is 
> internal only and not visible to Clients.
> RouterAdmin has getMountTableEntries but this is a cast of Mount table 
> without any resolving.
>  
> We are proposing adding such an API, and there are two ways:
> 1) Adding this API in RouterRpcServer, which requires the change in 
> ClientNameNodeProtocol to include this new API. 
> 2) Adding this API in RouterAdminServer, which requires the a protocol 
> between Client and the admin server.
>  
> There is one existing resolvePath in FileSystem which can be used to 
> implement this call from client side.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to