Package com.metamx.common

Examples of com.metamx.common.ISE


    log.info("Coordinator asking Worker[%s] to add task[%s]", theWorker.getHost(), task.getId());

    byte[] rawBytes = jsonMapper.writeValueAsBytes(task);
    if (rawBytes.length > config.getMaxZnodeBytes()) {
      throw new ISE("Length of raw bytes for task too large[%,d > %,d]", rawBytes.length, config.getMaxZnodeBytes());
    }

    String taskPath = JOINER.join(zkPaths.getIndexerTaskPath(), theWorker.getHost(), task.getId());

    if (cf.checkExists().forPath(taskPath) == null) {
View Full Code Here


  {
    log.info("[%s]: Starting [%s]", progressName, section);

    Stopwatch sectionWatch = sections.get(section);
    if (sectionWatch != null) {
      throw new ISE("[%s]: Cannot start progress tracker for [%s]. It is already started.", progressName, section);
    }
    sectionWatch = Stopwatch.createStarted();
    sections.put(section, sectionWatch);
  }
View Full Code Here

  @Override
  public void progressSection(String section, String message)
  {
    Stopwatch sectionWatch = sections.get(section);
    if (sectionWatch == null) {
      throw new ISE("[%s]: Cannot progress tracker for [%s]. Nothing started.", progressName, section);
    }
    long time = sectionWatch.elapsed(TimeUnit.MILLISECONDS);
    log.info("[%s]: [%s] : %s. Elapsed time: [%,d] millis", progressName, section, message, time);
  }
View Full Code Here

  @Override
  public void stopSection(String section)
  {
    Stopwatch sectionWatch = sections.remove(section);
    if (sectionWatch == null) {
      throw new ISE("[%s]: Cannot stop progress tracker for [%s]. Nothing started.", progressName, section);
    }
    long time = sectionWatch.elapsed(TimeUnit.MILLISECONDS);
    sectionWatch.stop();

    log.info("[%s]: [%s] has completed. Elapsed time: [%,d] millis", progressName, section, time);
View Full Code Here

        Query<Result<TopNResultValue>> input,
        Map<String, Object> context
    )
    {
      if (!(input instanceof TopNQuery)) {
        throw new ISE("Can only handle [%s], got [%s]", TopNQuery.class, input.getClass());
      }

      final TopNQuery query = (TopNQuery) input;
      if (query.getThreshold() > minTopNThreshold) {
        return runner.run(query, context);
View Full Code Here

      @Override
      public boolean apply(ZkWorker zkWorker)
      {
        final String minVersion = config.getWorkerVersion();
        if (minVersion == null) {
          throw new ISE("No minVersion found! It should be set in your runtime properties or configuration database.");
        }
        return zkWorker.isValidVersion(minVersion);
      }
    };
  }
View Full Code Here

          final Annotation annotation = binding.getKey().getAnnotation();
          if (annotation != null) {
            knownTypes.add(((Named) annotation).value());
          }
        }
        throw new ISE("Unknown emitter type[%s]=[%s], known types[%s]", EMITTER_PROPERTY, emitterType, knownTypes);
      }
    }
View Full Code Here

    @Override
    public Emitter get()
    {
      if (emitter == null) {
        throw new ISE("Emitter was null, that's bad!");
      }
      return emitter;
    }
View Full Code Here

                newDims[i] = new int[dims[i].length];

                for (int j = 0; j < dims[i].length; ++j) {
                  if (!converter.hasRemaining()) {
                    throw new ISE("Converter mismatch! wtfbbq!");
                  }
                  newDims[i][j] = converter.get(dims[i][j]);
                }
              }
View Full Code Here

          Query<Result<TopNResultValue>> input,
          Map<String, Object> context
      )
      {
        if (!(input instanceof TopNQuery)) {
          throw new ISE("Got a [%s] which isn't a %s", input.getClass(), TopNQuery.class);
        }

        return queryEngine.query((TopNQuery) input, segment.asStorageAdapter());
      }
    };
View Full Code Here

TOP

Related Classes of com.metamx.common.ISE

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.