Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Get HDFS quotas via API call

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
Highlighted

Re: Get HDFS quotas via API call

New Contributor

Hi,

 

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

Highlighted

Re: Get HDFS quotas via API call

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).

Highlighted

Re: Get HDFS quotas via API call

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

 

Don't have an account?
Coming from Hortonworks? Activate your account here