* @throws IOException
*/
public boolean userRequestLimit(final User user, int want)
throws IOException {
if (multiuser) {
UserData ud = SoftUserData.get(user);
HTableTokenBucket tb = (HTableTokenBucket) ud.get(UserData.TOKENBUCKET);
if (tb == null) {
tb = new HTableTokenBucket(conf, Bytes.toBytes(user.getToken()));
ud.put(UserData.TOKENBUCKET, tb);
}
if (tb.available() < want) {
return false;
}
tb.remove(want);