Package org.apache.commons.lang.mutable

Examples of org.apache.commons.lang.mutable.MutableInt.increment()


                    continue;
                }
                for(ByteArray key: getResult.callable.nodeKeys) {
                    List<Versioned<byte[]>> retrieved = getResult.retrieved.get(key);
                    MutableInt successCount = keyToSuccessCount.get(key);
                    successCount.increment();

                    /*
                     * retrieved can be null if there are no values for the key
                     * provided
                     */
 
View Full Code Here


            } else {
                Map<ByteArray, List<Versioned<byte[]>>> values = (Map<ByteArray, List<Versioned<byte[]>>>) response.getValue();

                for (ByteArray key: response.getKey()) {
                    MutableInt successCount = pipelineData.getSuccessCount(key);
                    successCount.increment();

                    List<Versioned<byte[]>> retrieved = values.get(key);
                    /*
                     * retrieved can be null if there are no values for the key
                     * provided
 
View Full Code Here

                    Response<Iterable<ByteArray>, Map<ByteArray, List<Versioned<byte[]>>>> response = new Response<Iterable<ByteArray>, Map<ByteArray, List<Versioned<byte[]>>>>(node,
                                                                                                                                                                                 Arrays.asList(key),
                                                                                                                                                                                 map,
                                                                                                                                                                                 ((System.nanoTime() - start) / Time.NS_PER_MS));

                    successCount.increment();
                    pipelineData.getResponses().add(response);
                    failureDetector.recordSuccess(response.getNode(), response.getRequestTime());

                    if(logger.isDebugEnabled())
                        logger.debug("GET for key " + ByteUtils.toHexString(key.get())
View Full Code Here

        MutableInt count = filesMap.get(lqi.family);
        if (count == null) {
          count = new MutableInt();
          filesMap.put(lqi.family, count);
        }
        count.increment();
        if (count.intValue() > maxFilesPerRegionPerFamily) {
          LOG.error("Trying to load more than " + maxFilesPerRegionPerFamily
            + " hfiles to family " + Bytes.toStringBinary(lqi.family)
            + " of region with start key "
            + Bytes.toStringBinary(e.getKey()));
View Full Code Here

        MutableInt count = filesMap.get(lqi.family);
        if (count == null) {
          count = new MutableInt();
          filesMap.put(lqi.family, count);
        }
        count.increment();
        if (count.intValue() > maxFilesPerRegionPerFamily) {
          LOG.error("Trying to load more than " + maxFilesPerRegionPerFamily
            + " hfiles to family " + Bytes.toStringBinary(lqi.family)
            + " of region with start key "
            + Bytes.toStringBinary(e.getKey()));
View Full Code Here

        MutableInt count = filesMap.get(lqi.family);
        if (count == null) {
          count = new MutableInt();
          filesMap.put(lqi.family, count);
        }
        count.increment();
        if (count.intValue() > maxFilesPerRegionPerFamily) {
          LOG.error("Trying to load more than " + maxFilesPerRegionPerFamily
            + " hfiles to family " + Bytes.toStringBinary(lqi.family)
            + " of region with start key "
            + Bytes.toStringBinary(e.getKey()));
View Full Code Here

          tableRegionsOnCurrentServer.put(tableName, regionsOnServerCount);
        }

        // Increment the count of how many regions from this table are host on
        // this server
        regionsOnServerCount.increment();

        // Now count the number of regions in this table.
        MutableInt totalCount = tableRegionsTotal.get(tableName);

        // If this is the first region from this table create a new counter for
View Full Code Here

        // this table.
        if (totalCount == null) {
          totalCount = new MutableInt(0);
          tableRegionsTotal.put(tableName, totalCount);
        }
        totalCount.increment();
      }

      // Now go through all of the tables we have seen and keep the max number
      // of regions of this table a single region server is hosting.
      for (Entry<String, MutableInt> currentServerEntry: tableRegionsOnCurrentServer.entrySet()) {
View Full Code Here

        MutableInt count = filesMap.get(lqi.family);
        if (count == null) {
          count = new MutableInt();
          filesMap.put(lqi.family, count);
        }
        count.increment();
        if (count.intValue() > maxFilesPerRegionPerFamily) {
          LOG.error("Trying to load more than " + maxFilesPerRegionPerFamily
            + " hfiles to family " + Bytes.toStringBinary(lqi.family)
            + " of region with start key "
            + Bytes.toStringBinary(e.getKey()));
View Full Code Here

                  worker = jsonMapper.readValue(
                      event.getData().getData(),
                      Worker.class
                  );
                  synchronized (waitingForMonitor) {
                    waitingFor.increment();
                  }
                  Futures.addCallback(
                      addWorker(worker),
                      new FutureCallback<ZkWorker>()
                      {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.