Package com.metamx.common

Examples of com.metamx.common.ISE


              retVal.add(row.getEvent());

              return retVal;
            }

            throw new ISE("Don't know how to cache input rows of type[%s]", input.getClass());
          }
        };
      }

      @Override
View Full Code Here


  }

  public static void registerSerde(String type, ComplexMetricSerde serde)
  {
    if (complexSerializers.containsKey(type)) {
      throw new ISE("Serializer for type[%s] already exists.", type);
    }
    complexSerializers.put(type, serde);
  }
View Full Code Here

        public T apply(T input)
        {
          Result<BySegmentResultValueClass<T>> result = (Result<BySegmentResultValueClass<T>>) input;

          if (input == null) {
            throw new ISE("Cannot have a null result!");
          }

          BySegmentResultValue<T> resultsClass = result.getValue();

          return (T) new Result<BySegmentResultValueClass>(
View Full Code Here

    if (type == null) {
      type = other.getType();
    }

    if (!type.equals(other.getType())) {
      throw new ISE("Cannot merge columns of type[%s] and [%s]", type, other.getType());
    }

    this.dictionaryEncoded |= other.isDictionaryEncoded();
    this.runLengthEncoded |= other.isRunLengthEncoded();
    this.hasInvertedIndexes |= other.hasBitmapIndexes();
View Full Code Here

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

      final SearchQuery query = (SearchQuery) input;
      if (query.getLimit() < config.getMaxSearchLimit()) {
        return runner.run(query, context);
View Full Code Here

    if (!outDir.exists()) {
      outDir.mkdirs();
    }
    if (!outDir.isDirectory()) {
      throw new ISE("Can only persist to directories, [%s] wasn't a directory", outDir);
    }

    log.info("Starting persist for interval[%s], rows[%,d]", dataInterval, index.size());
    return merge(
        Arrays.<IndexableAdapter>asList(new IncrementalIndexAdapter(dataInterval, index, bitmapSerdeFactory.getBitmapFactory())),
View Full Code Here

      ProgressIndicator progress
  ) throws IOException
  {
    FileUtils.deleteDirectory(outDir);
    if (!outDir.mkdirs()) {
      throw new ISE("Couldn't make outdir[%s].", outDir);
    }

    final AggregatorFactory[] lowerCaseMetricAggs = new AggregatorFactory[metricAggs.length];
    for (int i = 0; i < metricAggs.length; i++) {
      lowerCaseMetricAggs[i] = new ToLowerCaseAggregatorFactory(metricAggs[i]);
View Full Code Here

      final ProgressIndicator progress
  ) throws IOException
  {
    FileUtils.deleteDirectory(outDir);
    if (!outDir.mkdirs()) {
      throw new ISE("Couldn't make outdir[%s].", outDir);
    }

    final List<String> mergedDimensions = mergeIndexed(
        Lists.transform(
            adapters,
View Full Code Here

        String complexType = metricTypeNames.get(metric);

        ComplexMetricSerde serde = ComplexMetrics.getSerdeForType(complexType);

        if (serde == null) {
          throw new ISE("Unknown type[%s]", complexType);
        }

        final GenericIndexed metricColumn = GenericIndexed.fromIterable(
            Iterables.transform(
                theRows,
                new Function<Rowboat, Object>()
                {
                  @Override
                  public Object apply(Rowboat input)
                  {
                    return input.getMetrics()[metricIndex];
                  }
                }
            ),
            serde.getObjectStrategy()
        );

        metBuilder.setValueType(ValueType.COMPLEX);
        writeColumn(
            v9Smoosher,
            new ComplexColumnPartSerde(metricColumn, complexType),
            metBuilder,
            metric
        );
        break;
      default:
        throw new ISE("Unknown type[%s]", type);
    }

    progress.stopSection(section);
  }
View Full Code Here

      // we only support NotDimFilter with Selector filter
      selector = (SelectorDimFilter) ((NotDimFilter) dimFilter).getField();
    } else if (dimFilter instanceof SelectorDimFilter) {
      selector = (SelectorDimFilter) dimFilter;
    } else {
      throw new ISE("Unsupported DimFilter type [%d]", dimFilter.getClass());
    }

    final DimensionSelector dimSelector = metricFactory.makeDimensionSelector(selector.getDimension());
    final int lookupId = dimSelector.lookupId(selector.getValue());
    final IntPredicate predicate;
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.