Examples of IAE


Examples of com.metamx.common.IAE

          ),
          compression
      );
    }

    throw new IAE("Unknown version[%s]", versionFromBuffer);
  }
View Full Code Here

Examples of com.metamx.common.IAE

  }

  public void add(byte[] hashedValue)
  {
    if (hashedValue.length < minBytesRequired) {
      throw new IAE("Insufficient bytes, need[%d] got [%d]", minBytesRequired, hashedValue.length);
    }

    estimatedCardinality = null;

    final ByteBuffer buffer = ByteBuffer.wrap(hashedValue);
View Full Code Here

Examples of com.metamx.common.IAE

    final String dataSource = segmentsIter.next().getDataSource();
    while (segmentsIter.hasNext()) {
      DataSegment next = segmentsIter.next();
      if (!dataSource.equals(next.getDataSource())) {
        throw new IAE("Cannot merge segments of different dataSources[%s] and [%s]", dataSource, next.getDataSource());
      }
    }

    runQuery(new ClientAppendQuery(dataSource, segments));
  }
View Full Code Here

Examples of com.metamx.common.IAE

      buffer.position(bufferToUse.limit());

      return new VSizeIndexed(bufferToUse, numBytes);
    }

    throw new IAE("Unknown version[%s]", versionFromBuffer);
  }
View Full Code Here

Examples of com.metamx.common.IAE

            if (input instanceof Map) {
              return new DimensionAndMetricValueExtractor((Map) input);
            } else if (input instanceof DimensionAndMetricValueExtractor) {
              return (DimensionAndMetricValueExtractor) input;
            } else {
              throw new IAE("Unknown type for input[%s]", input.getClass());
            }
          }
        }
    );
  }
View Full Code Here

Examples of com.metamx.common.IAE

    if (metric instanceof String) {
      retVal = (String) metric;
    } else if (metric instanceof Map) {
      retVal = (String) ((Map) metric).get("metric");
    } else {
      throw new IAE("Unknown type[%s] for metric[%s]", metric.getClass(), metric);
    }

    return retVal;
  }
View Full Code Here

Examples of com.metamx.common.IAE

  @Override
  public T get(int index)
  {
    if (index < 0) {
      throw new IAE("Index[%s] < 0", index);
    }
    if (index >= size) {
      throw new IAE(String.format("Index[%s] >= size[%s]", index, size));
    }

    if(cacheable) {
      final T cached = cachedValues.get().getValue(index);
      if (cached != null) {
View Full Code Here

Examples of com.metamx.common.IAE

          strategy,
          allowReverseLookup
      );
    }

    throw new IAE("Unknown version[%s]", versionFromBuffer);
  }
View Full Code Here

Examples of com.metamx.common.IAE

  public static File persist(
      final IncrementalIndex index, final Interval dataInterval, File outDir, ProgressIndicator progress
  ) throws IOException
  {
    if (index.isEmpty()) {
      throw new IAE("Trying to persist an empty index!");
    }

    final long firstTimestamp = index.getMinTime().getMillis();
    final long lastTimestamp = index.getMaxTime().getMillis();
    if (!(dataInterval.contains(firstTimestamp) && dataInterval.contains(lastTimestamp))) {
      throw new IAE(
          "interval[%s] does not encapsulate the full range of timestamps[%s, %s]",
          dataInterval,
          new DateTime(firstTimestamp),
          new DateTime(lastTimestamp)
      );
View Full Code Here

Examples of com.metamx.common.IAE

            return input.toLowerCase();
          }
        }
    );
    if (mergedMetrics.size() != lowerCaseMetricAggs.length) {
      throw new IAE("Bad number of metrics[%d], expected [%d]", mergedMetrics.size(), lowerCaseMetricAggs.length);
    }

    final AggregatorFactory[] sortedMetricAggs = new AggregatorFactory[mergedMetrics.size()];
    for (int i = 0; i < lowerCaseMetricAggs.length; i++) {
      AggregatorFactory metricAgg = lowerCaseMetricAggs[i];
      sortedMetricAggs[mergedMetrics.indexOf(metricAgg.getName())] = metricAgg;
    }

    for (int i = 0; i < mergedMetrics.size(); i++) {
      if (!sortedMetricAggs[i].getName().equals(mergedMetrics.get(i))) {
        throw new IAE(
            "Metric mismatch, index[%d] [%s] != [%s]",
            i,
            lowerCaseMetricAggs[i].getName(),
            mergedMetrics.get(i)
        );
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.