Package org.apache.hadoop.hbase.stargate.util

Examples of org.apache.hadoop.hbase.stargate.util.UserData


   * @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);
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.stargate.util.UserData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.