void setQuota ( String src , long namespaceQuota , long diskspaceQuota ) throws IOException { // sanity check if ( ( namespaceQuota <= 0 && namespaceQuota != FSConstants . QUOTA_DONT_SET && namespaceQuota != FSConstants . QUOTA_RESET ) || ( diskspaceQuota <= 0 && diskspaceQuota != FSConstants . QUOTA_DONT_SET && diskspaceQuota != FSConstants . QUOTA_RESET ) ) { throw new IllegalArgumentException ( "Invalid values for quota : " + namespaceQuota + " and " + diskspaceQuota ) ; } try { namenode . setQuota ( src , namespaceQuota , diskspaceQuota ) ; } catch ( RemoteException re ) { throw re . unwrapRemoteException ( AccessControlException . class , FileNotFoundException . class , NSQuotaExceededException . class , DSQuotaExceededException . class ) ; } }
Sets or resets quotas for a directory .