Java Code Examples for com.twitter.ostrich.stats.Stats#incr()

The following examples show how to use com.twitter.ostrich.stats.Stats#incr() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OperationStats.java    From soundwave with Apache License 2.0 6 votes vote down vote up
public void failed(Map<String, String> additionalTags) {

    this.watch.stop();

    if (tags == null) {
      this.tags = additionalTags;
    } else {
      this.tags.putAll(additionalTags);
    }

    Stats
        .incr(StatsUtil
            .getStatsName(this.methodName, this.statsName, StatsUtil.StatsType.FAILURE, tags));
    Stats.addMetric(
        StatsUtil.getStatsName(this.methodName, this.statsName, StatsUtil.StatsType.TIME, tags),
        (int) watch.getTime());
  }
 
Example 2
Source File: KubeService.java    From singer with Apache License 2.0 6 votes vote down vote up
/**
 * Clear the set of Pod Names and update it with the latest fetch from kubelet
 * 
 * Following a listener design, currently we only have 1 listener but in future
 * if we want to do something else as well when these events happen then this
 * might come in handy.
 * 
 * @throws IOException
 */
public void updatePodNames() throws IOException {
    LOG.debug("Active podset:" + activePodSet);
    Set<String> updatedPodNames = fetchPodNamesFromMetadata();
    SetView<String> deletedNames = Sets.difference(activePodSet, updatedPodNames);

    // ignore new pods, pod discovery is done by watching directories

    for (String podName : deletedNames) {
        updatePodWatchers(podName, true);
        // update metrics since pods have been deleted
        Stats.incr(SingerMetrics.PODS_DELETED);
        Stats.incr(SingerMetrics.NUMBER_OF_PODS, -1);
    }
    LOG.debug("Fired events for registered watchers");

    activePodSet.clear();
    activePodSet.addAll(updatedPodNames);
    LOG.debug("Cleared and updated pod names:" + activePodSet);
}
 
Example 3
Source File: StatTrackingEventListener.java    From pinlater with Apache License 2.0 6 votes vote down vote up
@Override
public void onFailure(Throwable throwable) {
  boolean isExceptionIgnored = ignoreExceptionPredicate.apply(throwable);
  if (logError && !isExceptionIgnored) {
    int duration = (int) (TimeUtils.millisTime() - startTime);
    String message = String.format("%s; Duration: %s; %s", statPrefix, duration, info);
    LOG.error(message, throwable);
  }

  String exceptionStatsString = isExceptionIgnored ? "ignoredexception" : "exception";
  Stats.incr(String.format("%s.%s%s", statPrefix, exceptionStatsString, getTagsString()));
  Stats.incr(
      String.format(
          "%s.%s.%s%s",
          statPrefix,
          exceptionStatsString,
          throwable.getClass().getSimpleName(),
          getTagsString()));
}
 
Example 4
Source File: HFileReader.java    From terrapin with Apache License 2.0 6 votes vote down vote up
/**
 * Issues an HFile lookup on the underlying HFile.Reader. This is protected
 * for testing.
 */
protected Pair<ByteBuffer, Pair<ByteBuffer, Throwable>> getValueFromHFile(ByteBuffer key) {
  try {
    HFileScanner scanner = reader.getScanner(true, true, false);
    KeyValue kv = buildKeyValueForLookup(
        BytesUtil.readBytesFromByteBufferWithoutConsume(key));
    int code = scanner.seekTo(kv.getKey());
    ByteBuffer value = null;
    if (code == 0) {
      value = ByteBuffer.wrap(scanner.getKeyValue().getValue());
      if (this.sizeStatsKey != null) {
        Stats.addMetric(this.sizeStatsKey, value.remaining());
      }
      Stats.addMetric("value-size", value.remaining());
    } else {
      Stats.incr("not-found");
      if (this.notFoundStatsKey != null) {
        Stats.incr(this.notFoundStatsKey);
      }
    }
    return new ImmutablePair(key, new ImmutablePair(value, null));
  } catch (Throwable t) {
    return new ImmutablePair(key, new ImmutablePair(null, t));
  }
}
 
Example 5
Source File: OstrichMetricCollectorTest.java    From secor with Apache License 2.0 5 votes vote down vote up
@Test
public void incrementByOne() throws Exception {
    metricCollector.increment("expectedLabel", "ignored");

    PowerMockito.verifyStatic(Stats.class);
    Stats.incr("expectedLabel");
}
 
Example 6
Source File: PinLaterServiceImpl.java    From pinlater with Apache License 2.0 5 votes vote down vote up
@Override
public Future<Response> apply(Throwable throwable) {
  LOG.error("Context: {} Method: {} Request: {} Exception:",
      context, methodName, requestDesc, throwable);
  PinLaterException exception;
  if (throwable instanceof PinLaterException) {
    exception = (PinLaterException) throwable;
  } else {
    exception = new PinLaterException(ErrorCode.UNKNOWN, throwable.toString());
  }
  String errorStats = "PinLater." + methodName + ".errors."
      + errorCodeToStr(exception.getErrorCode());
  Stats.incr(errorStats);
  return Future.exception(exception);
}
 
Example 7
Source File: LoggingAuditHeadersInjector.java    From singer with Apache License 2.0 5 votes vote down vote up
@Override
public Headers addHeaders(Headers headers, LogMessage logMessage) {
  try {
    headers.add(HEADER_KEY, SER.serialize(logMessage.getLoggingAuditHeaders()));
  } catch (TException e) {
    Stats.incr(SingerMetrics.NUMBER_OF_SERIALIZING_HEADERS_ERRORS);
    LOG.warn("Exception thrown while serializing loggingAuditHeaders", e);
  }
  return headers;
}
 
Example 8
Source File: OstrichMetricCollectorTest.java    From secor with Apache License 2.0 5 votes vote down vote up
@Test
public void increment() throws Exception {
    metricCollector.increment("expectedLabel", 42, "ignored");

    PowerMockito.verifyStatic(Stats.class);
    Stats.incr("expectedLabel", 42);
}
 
Example 9
Source File: MappedThriftLogFileReader.java    From singer with Apache License 2.0 5 votes vote down vote up
@Override
public void setByteOffset(long byteOffset) throws LogFileReaderException {
  if (closed) {
    throw new LogFileReaderException("Reader closed.");
  }
  // TODO check overflow
  try {
    thriftReader.setByteOffset((int) byteOffset);
  } catch (Exception e) {
    LOG.error(String.format("Caught exception when set reader byte offset of log file: %s to: %d",
        logFile, byteOffset), e);
    Stats.incr("singer.reader.exception.unexpected");
    throw new LogFileReaderException("Can not set byte offset on the thrift reader", e);
  }
}
 
Example 10
Source File: DefaultLogMonitor.java    From singer with Apache License 2.0 5 votes vote down vote up
/**
 * Monitor all SingerLogs configured.
 * <p>
 * This method is NOT thread-safe. It should be called from one thread at any time.
 *
 * @throws LogMonitorException when fail to monitor one of the SingerLogs.
 */
public void monitorLogs() throws LogMonitorException {
  LOG.info("Start monitoring cycle.");
  long monitorCycleStartTime = System.currentTimeMillis();
  Collection<LogStream> logStreams = LogStreamManager.getLogStreams();
  for (LogStream logStream : logStreams) {
    String logStreamName = logStream.getLogStreamName();
    boolean success = false;
    try {
      LogStreamProcessor logStreamProcessor = processedLogStreams.get(logStream);
      if (logStreamProcessor == null) {
        LogStreamProcessor processor = createLogStreamProcessor(
            logStream.getSingerLog().getSingerLogConfig(), logStream);
        processor.start();
        processedLogStreams.put(logStream, processor);
        LOG.info("Start processing log stream: {} in log: {}", logStream, logStreamName);
      } else {
        // refresh the latest modification time.
        LOG.info("Log stream: {} in log: {} is being processed.", logStream, logStreamName);
        // set last completed latency in LogStream object so we don't have to look-up 
        // processor for logstream
        logStream.setLastCompletedCycleTime(logStreamProcessor.getLastCompleteCycleTime());
      }
      success = true;
    } catch (Exception e) {
      LOG.error("Exception in monitorLogs for " + logStream, e);
      Stats.incr("singer.monitor.unexpected_exception");
    }
    if (!success) {
      Stats.incr("singer.monitor.processor_creation_failure");
      LOG.error("Failed to create log monitor for {}", logStream);
    }
  }
  Stats.addMetric("singer.monitor.monitor_cycle_time",
      (int) (System.currentTimeMillis() - monitorCycleStartTime));
  Stats.setGauge(SingerMetrics.NUM_LOGSTREAMS, processedLogStreams.size());
}
 
Example 11
Source File: LogStreamManager.java    From singer with Apache License 2.0 5 votes vote down vote up
private void addLogStreamInternal(LogStream logStream) {
  Path logDir = SingerUtils.getPath(logStream.getLogDir());
  try {
    if (!dirStreams.containsKey(logDir.normalize().toString())) {
      dirStreams.put(logDir.normalize().toString(), Collections.newSetFromMap(new ConcurrentHashMap<>()));
    }
    dirStreams.get(logDir.normalize().toString()).add(logStream);
    LOG.info("Added LogStream " + logStream.getLogStreamDescriptor());
  } catch (Exception e) {
    Stats.incr(SingerMetrics.IO_EXCEPTION_METRIC_NAME);
    LOG.error("Error registering " + logDir.getFileName() + " from LogStream " +
        logStream.getLogStreamName(), e);
  }
}
 
Example 12
Source File: Decider.java    From singer with Apache License 2.0 5 votes vote down vote up
@VisibleForTesting
Decider(ConfigFileWatcher watcher, String filePath) {
  try {
    watcher.addWatch(filePath,
        new Function<byte[], Void>() {
          public Void apply(byte[] deciderJson) {
            Map<String, Integer> newDeciderMap =
                GSON.fromJson(new String(deciderJson),
                    new TypeToken<HashMap<String, Integer>>() {}
                        .getType());
            if (newDeciderMap != null) {
              if (newDeciderMap.isEmpty()) {
                LOG.warn("Got empty decider set.");
              }
              mDeciderMap = newDeciderMap;
            } else {
              LOG.warn("Got a null object from decider json.");
            }
            return null;
          }
        });
  } catch (IOException e) {
    // Initialize with an empty map.
    mDeciderMap = Maps.newHashMap();
    LOG.warn("Exception while initializing decider.", e);
    Stats.incr("decider_config_file_ioexception");
  }
  this.rand.setSeed(0);
}
 
Example 13
Source File: PinLaterMySQLBackend.java    From pinlater with Apache License 2.0 4 votes vote down vote up
@Override
protected void checkpointSingleJob(final String source,
                                   final String queueName,
                                   PinLaterCheckpointJobRequest request,
                                   int numAutoRetries)
    throws SQLException, PinLaterException {
  PinLaterJobDescriptor jobDesc = new PinLaterJobDescriptor(request.getJobDescriptor());
  String jobsTableName = MySQLBackendUtils.constructJobsTableName(
      queueName,
      jobDesc.getShardName(),
      jobDesc.getPriority());
  PinLaterJobState stateToSet =
      request.isMoveToPending() ? PinLaterJobState.PENDING : PinLaterJobState.IN_PROGRESS;
  Timestamp timestampToSet = request.isSetRunAfterTimestampMillis()
                             ? new Timestamp(request.getRunAfterTimestampMillis()) :
                             new Timestamp(System.currentTimeMillis());
  String sourcePatternMatcher = "%" + source + "%";

  StringBuilder queryBuilder = new StringBuilder(MySQLQueries.CHECKPOINT_JOB_HEADER);
  List<Object> args = new ArrayList<Object>();
  args.add(stateToSet.getValue());
  args.add(timestampToSet);

  if (request.isSetNewBody()) {
    queryBuilder.append(MySQLQueries.CHECKPOINT_JOB_SET_BODY);
    args.add(request.getNewBody());
  }
  if (request.isSetNumOfAttemptsAllowed()) {
    queryBuilder.append(MySQLQueries.CHECKPOINT_JOB_RESET_ATTEMPTS);
    args.add(request.getNumOfAttemptsAllowed());
    args.add(request.getNumOfAttemptsAllowed());
  }
  if (request.isSetPrependCustomStatus()) {
    queryBuilder.append(MySQLQueries.CHECKPOINT_JOB_APPEND_CUSTOM_STATUS);
    args.add(request.getPrependCustomStatus());
  }
  if (request.isMoveToPending()) {
    queryBuilder.append(MySQLQueries.CHECKPOINT_JOB_RESET_CLAIM_DESCRIPTOR);
  }

  queryBuilder.append(MySQLQueries.CHECKPOINT_JOB_FOOTER);
  String query = queryBuilder.toString();
  args.add(jobDesc.getLocalId());
  args.add(PinLaterJobState.IN_PROGRESS.getValue());
  args.add(sourcePatternMatcher);

  int numRowsUpdated = 0;
  Connection conn = null;
  try {
    conn = shardMapRef.get().get(jobDesc.getShardName()).getGeneralDataSource().getConnection();
    numRowsUpdated = JdbcUtils.executeUpdate(
        conn,
        String.format(query, jobsTableName),
        args.toArray());
  } catch (SQLException e) {
    boolean shouldRetry = checkExceptionIsRetriable(e, jobDesc.getShardName(), "checkpoint");
    if (shouldRetry && numAutoRetries > 0) {
      // Retry checkpointing the job.
      Stats.incr("checkpoint-failures-retry");
      checkpointSingleJob(source, queueName, request, numAutoRetries - 1);
      return;
    }
    // Out of retries, throw the exception. Wrap it into a PinLaterException if the exception
    // is recognized and return the appropriate error code.
    if (MySQLBackendUtils.isDatabaseDoesNotExistException(e)) {
      throw new PinLaterException(ErrorCode.QUEUE_NOT_FOUND, "Queue not found: " + queueName);
    }
    throw e;
  } finally {
    JdbcUtils.closeConnection(conn);
  }

  // If checkpointing didn't update any rows, log and record the discrepancy.
  if (numRowsUpdated == 0) {
    LOG.info("Checkpoint request was treated as a no-op from source: {}. Request: {}",
        source, request);
    Stats.incr(queueName + "_checkpoint_noop");
  }
}
 
Example 14
Source File: OpenTsdbMetricConverter.java    From doctorkafka with Apache License 2.0 4 votes vote down vote up
public static void incr(String name) {
  Stats.incr(name);
}
 
Example 15
Source File: PinLaterRedisBackend.java    From pinlater with Apache License 2.0 4 votes vote down vote up
@Override
protected String enqueueSingleJob(final String queueName, final PinLaterJob job,
                                  int numAutoRetries) throws Exception {
  final double currentTimeSeconds = System.currentTimeMillis() / 1000.0;

  // Check whether the queue to enqueue exists.
  if ((queueNames.get() == null) || !queueNames.get().contains(queueName)) {
    reloadQueueNames();
    if (!queueNames.get().contains(queueName)) {
      Stats.incr("redis-queue-not-found-enqueue");
      throw new PinLaterException(ErrorCode.QUEUE_NOT_FOUND, "Queue not found: " + queueName);
    }
  }
  final ImmutableMap.Entry<String, RedisPools> shard = getRandomEnqueueableShard();
  if (shard == null) {
    throw new PinLaterException(ErrorCode.NO_HEALTHY_SHARDS, "Unable to find healthy shard");
  }
  try {
    return RedisUtils.executeWithConnection(
        shard.getValue().getGeneralRedisPool(),
        new Function<Jedis, String>() {
          @Override
          public String apply(Jedis conn) {
            String jobIdRedisKey = RedisBackendUtils.constructJobIdRedisKey(
                queueName, shard.getKey());
            String hashRedisKeyPrefix = RedisBackendUtils.constructHashRedisKeyPrefix(
                queueName, shard.getKey());
            String queueRedisKey = RedisBackendUtils.constructQueueRedisKey(
                queueName, shard.getKey(), job.getPriority(), PinLaterJobState.PENDING);
            List<String> keys = Lists.newArrayList(
                jobIdRedisKey, hashRedisKeyPrefix, queueRedisKey);
            double jobToRunTimestampSeconds;
            if (job.getRunAfterTimestampMillis() != 0) {
              jobToRunTimestampSeconds = job.getRunAfterTimestampMillis() / 1000.0;
            } else {
              jobToRunTimestampSeconds = currentTimeSeconds;
            }
            List<String> argv = Lists.newArrayList(
                BytesUtil.stringFromByteBuffer(ByteBuffer.wrap(job.getBody())),
                String.valueOf(job.getNumAttemptsAllowed()),
                String.valueOf(currentTimeSeconds),
                String.valueOf(jobToRunTimestampSeconds),
                RedisBackendUtils.truncateCustomStatus(job.getCustomStatus())
            );
            Long jobId = (Long) conn.eval(RedisLuaScripts.ENQUEUE_JOB, keys, argv);
            return new PinLaterJobDescriptor(
                queueName, shard.getKey(), job.getPriority(), jobId).toString();
          }
        });
  } catch (JedisConnectionException e) {
    if (numAutoRetries > 0) {
      // Retry the enqueue, potentially on a different shard.
      Stats.incr("enqueue-failures-retry");
      return enqueueSingleJob(queueName, job, numAutoRetries - 1);
    }
    String host = shard.getValue().getHost();
    Stats.incr("shard_connection_failed_" + host);
    LOG.error("Failed to get a redis connection.", e);
    throw new PinLaterException(ErrorCode.SHARD_CONNECTION_FAILED,
        String.format("Redis connection to %s failed", host));
  }
}
 
Example 16
Source File: StatsUtil.java    From secor with Apache License 2.0 4 votes vote down vote up
public static void incr(String name) {
  Stats.incr(name);
}
 
Example 17
Source File: OpenTsdbMetricConverter.java    From singer with Apache License 2.0 4 votes vote down vote up
public static void incr(String name) {
  Stats.incr(name);
}
 
Example 18
Source File: MySQLQueueMonitor.java    From pinlater with Apache License 2.0 4 votes vote down vote up
@Override
protected void jobMonitorImpl(long runStartMillis,
                              Map.Entry<String, MySQLDataSources> shard,
                              int numAutoRetries) {
  Connection conn = null;
  ResultSet dbNameRs = null;
  Timestamp succeededGCTimestamp = new Timestamp(
      runStartMillis - getJobSucceededGCTimeoutMillis());
  Timestamp failedGCTimestamp = new Timestamp(runStartMillis - getJobFailedGCTimeoutMillis());
  Timestamp timeoutTimestamp = new Timestamp(runStartMillis - getJobClaimedTimeoutMillis());

  try {
    conn = shard.getValue().getMonitorDataSource().getConnection();
    Set<String> queueNames = MySQLBackendUtils.getQueueNames(conn, shard.getKey());
    for (String queueName : queueNames) {
      for (int priority = 1;
           priority <= numPriorityLevels;
           priority++) {
        String jobsTableName = MySQLBackendUtils.constructJobsTableName(
            queueName, shard.getKey(), priority);

        // Handle timed out jobs with attempts exhausted.
        numTimeoutDone += JdbcUtils.executeUpdate(
            conn,
            String.format(MySQLQueries.MONITOR_TIMEOUT_DONE_UPDATE, jobsTableName),
            PinLaterJobState.FAILED.getValue(),
            PinLaterJobState.IN_PROGRESS.getValue(),
            timeoutTimestamp,
            getUpdateMaxSize());

        // Handle timed out jobs with attempts remaining.
        numTimeoutRetry += JdbcUtils.executeUpdate(
            conn,
            String.format(MySQLQueries.MONITOR_TIMEOUT_RETRY_UPDATE, jobsTableName),
            PinLaterJobState.PENDING.getValue(),
            PinLaterJobState.IN_PROGRESS.getValue(),
            timeoutTimestamp,
            getUpdateMaxSize());

        // Succeeded job GC.
        numSucceededGC += JdbcUtils.executeUpdate(
            conn,
            String.format(MySQLQueries.MONITOR_GC_DONE_JOBS, jobsTableName),
            PinLaterJobState.SUCCEEDED.getValue(),
            succeededGCTimestamp,
            getUpdateMaxSize());

        // Failed job GC.
        numFailedGC += JdbcUtils.executeUpdate(
            conn,
            String.format(MySQLQueries.MONITOR_GC_DONE_JOBS, jobsTableName),
            PinLaterJobState.FAILED.getValue(),
            failedGCTimestamp,
            getUpdateMaxSize());

        logCount++;
        if (logCount % getLogInterval() == 0) {
          LOG.info(String.format(
              "JobQueueMonitor: "
                  + "Shard: %s Queue: %s Priority: %d Timeout Done: %d Timeout Retry: %d "
                  + "Succeeded GC: %d Failed GC: %d",
              shard.getKey(), queueName, priority, numTimeoutDone, numTimeoutRetry,
              numSucceededGC, numFailedGC));
          Stats.incr(queueName + "_timeout_done", numTimeoutDone);
          Stats.incr(queueName + "_timeout_retry", numTimeoutRetry);
          Stats.incr(queueName + "_succeeded_gc", numSucceededGC);
          Stats.incr(queueName + "_failed_gc", numFailedGC);
          logCount = 0;
          numTimeoutDone = 0;
          numTimeoutRetry = 0;
          numSucceededGC = 0;
          numFailedGC = 0;
        }
      }
    }
  } catch (Exception e) {
    // Deadlocks are occasionally expected for our high-contention queries. We
    // retry a few times so as not to abort an entire monitor cycle.
    if (MySQLBackendUtils.isDeadlockException(e) && numAutoRetries > 0) {
      Stats.incr("mysql-deadlock-monitor");
      jobMonitorImpl(runStartMillis, shard, numAutoRetries - 1);
    } else {
      LOG.error("Exception in JobQueueMonitor task", e);
    }
  } finally {
    JdbcUtils.closeResultSet(dbNameRs);
    JdbcUtils.closeConnection(conn);
  }
}
 
Example 19
Source File: PinLaterMySQLBackend.java    From pinlater with Apache License 2.0 4 votes vote down vote up
@Override
protected void ackSingleJob(final String queueName,
                            boolean succeeded,
                            PinLaterJobAckInfo jobAckInfo,
                            int numAutoRetries)
    throws SQLException, PinLaterException {
  PinLaterJobDescriptor jobDesc = new PinLaterJobDescriptor(jobAckInfo.getJobDescriptor());
  String jobsTableName = MySQLBackendUtils.constructJobsTableName(
      queueName,
      jobDesc.getShardName(),
      jobDesc.getPriority());
  Connection conn = null;
  try {
    ImmutableMap<String, MySQLDataSources> shardMap = shardMapRef.get();
    conn = shardMap.get(jobDesc.getShardName()).getGeneralDataSource().getConnection();

    if (succeeded) {
      // Handle succeeded job: change state to succeeded and append custom status.
      JdbcUtils.executeUpdate(
          conn,
          String.format(MySQLQueries.ACK_SUCCEEDED_UPDATE, jobsTableName),
          PinLaterJobState.SUCCEEDED.getValue(),
          jobAckInfo.getAppendCustomStatus(),
          jobDesc.getLocalId());
    } else {
      // Handle failed job. Depending on whether the job has attempts remaining, we need
      // to either move it to pending or failed, and append custom status either way.
      // We do this by running two queries, first the 'failed done' one and then the
      // 'failed retry', so that the appropriate status change happens.
      JdbcUtils.executeUpdate(
          conn,
          String.format(MySQLQueries.ACK_FAILED_DONE_UPDATE, jobsTableName),
          PinLaterJobState.FAILED.getValue(),
          jobAckInfo.getAppendCustomStatus(),
          jobDesc.getLocalId(),
          PinLaterJobState.IN_PROGRESS.getValue());
      JdbcUtils.executeUpdate(
          conn,
          String.format(MySQLQueries.ACK_FAILED_RETRY_UPDATE, jobsTableName),
          PinLaterJobState.PENDING.getValue(),
          jobAckInfo.getAppendCustomStatus(),
          new Timestamp(System.currentTimeMillis() + jobAckInfo.getRetryDelayMillis()),
          jobDesc.getLocalId(),
          PinLaterJobState.IN_PROGRESS.getValue());
    }
  } catch (SQLException e) {
    boolean shouldRetry = checkExceptionIsRetriable(e, jobDesc.getShardName(), "ack");
    if (shouldRetry && numAutoRetries > 0) {
      // Retry on the same shard.
      Stats.incr("ack-failures-retry");
      ackSingleJob(queueName, succeeded, jobAckInfo, numAutoRetries - 1);
      return;
    }
    // Out of retries, throw the exception. Wrap it into a PinLaterException if the exception
    // is recognized and return the appropriate error code.
    if (MySQLBackendUtils.isDatabaseDoesNotExistException(e)) {
      throw new PinLaterException(ErrorCode.QUEUE_NOT_FOUND, "Queue not found: " + queueName);
    }
    throw e;
  } finally {
    JdbcUtils.closeConnection(conn);
  }
}
 
Example 20
Source File: OpenTsdbMetricConverter.java    From singer with Apache License 2.0 4 votes vote down vote up
public static void incr(String name, String... tags) {
  Stats.incr(nameMetric(name, tags));
}