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

Yiqun Lin commented on HDFS-12934:
----------------------------------

Thanks for taking the look of the design doc, [~elgoiri].

bq. I think we should have flags to enable the quota system at the Router level 
Good idea. Agree on this. And quota system should be disabled by default.

{quote}
I guess we also want to implement the setQuotaSpace().
{quote}
The API {{ClientProtocol#setQuota(String path, long namespaceQuota, long 
storagespaceQuota, StorageType type)}} can set space quota. If we don't want to 
set namespaceQuota, we can pass an unset flag  like 
{{HdfsConstants.QUOTA_DONT_SET}}.

bq. I didn't get what you meant about ClientProtocol#getQuota(); will we 
implement it or not?
I am thinking of this again. This should be implemented. We can use this API to 
get quota usage of given path. In my initial design doc, I plan to create new 
RouterRPCClient for making the RPC call. But actually we can implement this in 
RouterRpcServer and reuse this API.

i will attach a new doc for updating the content you pointed out. Now I think 
we almostly reach an agreement for quota supporting in RBF. I will start for 
working on this right now. Thanks for discussions, everyone, :).

> RBF: Federation supports global quota
> -------------------------------------
>
>                 Key: HDFS-12934
>                 URL: https://issues.apache.org/jira/browse/HDFS-12934
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>    Affects Versions: 3.0.0
>            Reporter: Yiqun Lin
>            Assignee: Yiqun Lin
>              Labels: RBF
>         Attachments: RBF support  global quota.pdf
>
>
> Now federation doesn't support set the global quota for each folder. 
> Currently the quota will be applied for each subcluster under the specified 
> folder via RPC call.
> It will be very useful for users that federation can support setting global 
> quota and exposing the command of this.
> In a federated environment, a folder can be spread across multiple 
> subclusters. For this reason, we plan to solve this by following way:
> # Set global quota across each subcluster. We don't allow each subcluster can 
> exceed maximun quota value.
> # We need to construct one <Path, QuotaUsage> cache map for storing the sum  
> quota usage of these subclusters under federation folder. Every time we want 
> to do WRITE operation under specified folder, we will get its quota usage 
> from cache and verify its quota. If quota exceeded, throw exception, 
> otherwise update its quota usage in cache when finishing operations.
> The quota will be set to mount table and as a new field in mount table. The 
> set/unset command will be like:
> {noformat}
>  hdfs dfsrouteradmin -setQuota -ns <nsQuota> -ss <ssQuota> <mount table>
>  hdfs dfsrouteradmin -clrQuota  <mount table>
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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

Reply via email to