Support Questions

Find answers, ask questions, and share your expertise

Get HDFS quotas via API call

Explorer

Hi,

 

Does anyone know if it's possible to get HDFS quota info via a Cloudera API call? I can get the usernames, size and raw sizes etc from https://host.domain:7183/api/v19/clusters/my_cluster/services/hdfs/reports/hdfsUsageReport  but I can't find any reference to the quotas set in HDFS in the API documentation (unless I'm completely missing it).

 

EDIT: Trying to get this data in a JSON format.

 

EDIT: Also looking at the timeseries/tsquery statements, but really just randomly trying things...

 

E

3 REPLIES 3

New Contributor

Hi,

 

Did you find solution for the HDFS quota using CM API?

Explorer

Hi,

 

I have not found a solution. I don't think that you can get that quota info out of CDH (even though it displays it).

Expert Contributor

@getschwifty  Till what i know is Quotas are managed by a set of commands available only to the administrator[like dfsadmin]. Quotas are not exposed via rest api call.

 

But you can achieve it by other way via "lsr |count -q".

Please check below link for details -

https://issues.apache.org/jira/browse/HDFS-2711

https://issues.apache.org/jira/browse/HDFS-253