Codota Logo
CountMetric.incrBy
Code IndexAdd Codota to your IDE (free)

How to use
incrBy
method
in
backtype.storm.metric.api.CountMetric

Best Java code snippets using backtype.storm.metric.api.CountMetric.incrBy (Showing top 4 results out of 315)

  • Common ways to obtain CountMetric
private void myMethod () {
CountMetric c =
  • Codota Iconnew CountMetric()
  • Smart code suggestions by Codota
}
origin: apache/eagle

@Override
public void incrBy(String scopeName, int length) {
  countMetric.scope(scopeName).incrBy(length);
}
origin: hmsonline/storm-cassandra-cql

@SuppressWarnings("unchecked")
@Override
public List<T> multiGet(List<List<Object>> keys) {
  try {
    List<T> values = new ArrayList<T>();
    for (List<Object> rowKey : keys) {
      Statement statement = mapper.retrieve(rowKey);
      ResultSet results = session.execute(statement);
      // TODO: Better way to check for empty results besides accessing entire results list
      Iterator<Row> rowIter = results.iterator();
      Row row;
      if (results != null && rowIter.hasNext() && (row = rowIter.next()) != null) {
        if (rowIter.hasNext()) {
          LOG.error("Found non-unique value for key [{}]", rowKey);
        } else {
          values.add((T) mapper.getValue(row));
        }
      } else {
        values.add(null);
      }
    }
    _mreads.incrBy(values.size());
    LOG.debug("Retrieving the following keys: {} with values: {}", keys, values);
    return values;
  } catch (Exception e) {
    checkCassandraException(e);
    throw new IllegalStateException("Impossible to reach this code");
  }
}
origin: hmsonline/storm-cassandra-cql

  _mwrites.incrBy(statements.size());
} catch (Exception e) {
  checkCassandraException(e);
origin: wurstmeister/storm-kafka-0.8-plus

private void fill() {
  long start = System.nanoTime();
  ByteBufferMessageSet msgs = KafkaUtils.fetchMessages(_spoutConfig, _consumer, _partition, _emittedToOffset);
  long end = System.nanoTime();
  long millis = (end - start) / 1000000;
  _fetchAPILatencyMax.update(millis);
  _fetchAPILatencyMean.update(millis);
  _fetchAPICallCount.incr();
  int numMessages = countMessages(msgs);
  _fetchAPIMessageCount.incrBy(numMessages);
  if (numMessages > 0) {
    LOG.info("Fetched " + numMessages + " messages from: " + _partition);
  }
  for (MessageAndOffset msg : msgs) {
    _pending.add(_emittedToOffset);
    _waitingToEmit.add(new MessageAndRealOffset(msg.message(), _emittedToOffset));
    _emittedToOffset = msg.nextOffset();
  }
  if (numMessages > 0) {
    LOG.info("Added " + numMessages + " messages from: " + _partition + " to internal buffers");
  }
}
backtype.storm.metric.apiCountMetricincrBy

Popular methods of CountMetric

  • <init>
  • incr
  • getValueAndReset

Popular in Java

  • Reading from database using SQL prepared statement
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • onRequestPermissionsResult (Fragment)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • BigInteger (java.math)
    Immutable arbitrary-precision integers. All operations behave as if BigIntegers were represented in
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • TimerTask (java.util)
    A task that can be scheduled for one-time or repeated execution by a Timer.
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now