Examples of increment()


Examples of org.apache.hadoop.hbase.client.Table.increment()

  @Override
  public TResult increment(ByteBuffer table, TIncrement increment) throws TIOError, TException {
    Table htable = getTable(table);
    try {
      return resultFromHBase(htable.increment(incrementFromThrift(increment)));
    } catch (IOException e) {
      throw getTIOError(e);
    } finally {
      closeTable(htable);
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.regionserver.HRegion.increment()

    HRegion region = createHRegion(tableName, "increment", wal, Durability.USE_DEFAULT);

    // col1: amount = 1, 1 write back to WAL
    Increment inc1 = new Increment(row1);
    inc1.addColumn(FAMILY, col1, 1);
    Result res = region.increment(inc1);
    assertEquals(1, res.size());
    assertEquals(1, Bytes.toLong(res.getValue(FAMILY, col1)));
    verifyHLogCount(wal, 1);

    // col1: amount = 0, 0 write back to WAL
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.namenode.startupprogress.StartupProgress.Counter.increment()

      prog.setTotal(Phase.SAVING_CHECKPOINT, step, cachePools.size());
      Counter counter = prog.getCounter(Phase.SAVING_CHECKPOINT, step);
      out.writeInt(cachePools.size());
      for (CachePool pool: cachePools.values()) {
        FSImageSerialization.writeCachePoolInfo(out, pool.getInfo(true));
        counter.increment();
      }
      prog.endStep(Phase.SAVING_CHECKPOINT, step);
    }

    /*
 
View Full Code Here

Examples of org.apache.hadoop.mapred.Counters.Counter.increment()

      counter.setValue(initValue);
      assertEquals("Counter value is not initialized correctly",
                   expectedValue, counter.getValue());
      for (int j = 0; j < NUMBER_INC; j++) {
        int incValue = rand.nextInt();
        counter.increment(incValue);
        expectedValue += incValue;
        assertEquals("Counter value is not incremented correctly",
                     expectedValue, counter.getValue());
      }
      expectedValue = rand.nextInt();
View Full Code Here

Examples of org.apache.hadoop.mapreduce.Counter.increment()

    try {
      for (Map.Entry<String, Long> entry:scanMetrics.getMetricsMap().entrySet()) {
        Counter ct = (Counter)getCounter.invoke(context,
            HBASE_COUNTER_GROUP_NAME, entry.getKey());

        ct.increment(entry.getValue());
      }
      ((Counter) getCounter.invoke(context, HBASE_COUNTER_GROUP_NAME,
          "NUM_SCANNER_RESTARTS")).increment(numScannerRestarts);
    } catch (Exception e) {
      LOG.debug("can't update counter." + StringUtils.stringifyException(e));
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.document.UpdateOp.increment()

        DBObject[] inserts = new DBObject[updateOps.size()];

        for (int i = 0; i < updateOps.size(); i++) {
            inserts[i] = new BasicDBObject();
            UpdateOp update = updateOps.get(i);
            update.increment(Document.MOD_COUNT, 1);
            T target = collection.newDocument(this);
            UpdateUtils.applyChanges(target, update, comparator);
            docs.add(target);
            for (Entry<Key, Operation> entry : update.getChanges().entrySet()) {
                Key k = entry.getKey();
View Full Code Here

Examples of org.apache.oozie.util.TimestampedMessageParser.increment()

                // BufferedReaders to read the messages from the logs of each server and put them in order without having to bring
                // every message into memory at the same time.
                TreeMap<String, TimestampedMessageParser> timestampMap = new TreeMap<String, TimestampedMessageParser>();
                // populate timestampMap with initial values
                for (TimestampedMessageParser parser : parsers) {
                    if (parser.increment()) {
                        timestampMap.put(parser.getLastTimestamp(), parser);
                    }
                }
                int bytesWritten = 0;
                while (timestampMap.size() > 1) {
View Full Code Here

Examples of org.apache.servicemix.nmr.management.stats.CountStatistic.increment()

        CountStatistic stat = new CountStatistic("myCounter", "seconds", "myDescription");
        assertStatistic(stat, "myCounter", "seconds", "myDescription");

        assertEquals(0, stat.getCount());

        stat.increment();
        assertEquals(1, stat.getCount());

        stat.increment();
        assertEquals(2, stat.getCount());
View Full Code Here

Examples of org.apache.tez.common.counters.TezCounter.increment()

    public boolean incrCounter(Enum<?> name, long delta) {
        if (context == null) {
            return false;
        }
        TezCounter counter = context.getCounters().findCounter(name);
        counter.increment(delta);
        return true;
    }

    @Override
    public boolean incrCounter(String group, String name, long delta) {
View Full Code Here

Examples of org.apache.uima.aae.monitor.statistics.LongNumericStatistic.increment()

    }

    LongNumericStatistic statistic;
    if ((statistic = getAnalysisEngineController().getMonitor().getLongNumericStatistic("",
            Monitor.TotalSerializeTime)) != null) {
      statistic.increment(getAnalysisEngineController().getCpuTime() - start);
    }

    return serializedCas;
  }
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.