/** * Defines abstract methods, metrics etc. for analyzer results of the Value * Distribution analyzer. */ @Distributed(reducer = ValueDistributionAnalyzerResultReducer.class) public abstract class ValueDistributionAnalyzerResult extends AbstractValueCountingAnalyzerResult { private static final long serialVersionUID = 1L; @Metric("Total count") @Override public abstract int getTotalCount(); @Metric("Null count") @Override public abstract int getNullCount(); @Metric("Unique count") @Override public abstract Integer getUniqueCount(); @Metric("Distinct count") @Override public abstract Integer getDistinctCount(); }
@Override public Class<? extends AnalyzerResultReducer<?>> getResultReducerClass() { final Distributed distributedResult = ReflectionUtils.getAnnotation(getResultClass(), Distributed.class); if (distributedResult != null) { if (!distributedResult.value()) { return null; } final Class<? extends AnalyzerResultReducer<?>> reducer = distributedResult.reducer(); if (reducer != null && reducer != NoAnalyzerResultReducer.class) { return reducer; } } return null; }
@Override public final boolean isDistributable() { final Distributed distributed = getAnnotation(Distributed.class); if (distributed != null) { return distributed.value(); } final boolean hasDistributionAdvice = ReflectionUtils.is(getComponentClass(), HasDistributionAdvice.class); if (hasDistributionAdvice) { return true; } return isDistributableByDefault(); }
@Distributed(reducer = CharacterSetDistributionResultReducer.class) public class CharacterSetDistributionResult extends CrosstabResult {
@Override public Class<? extends AnalyzerResultReducer<?>> getResultReducerClass() { final Distributed distributedAnalyzer = getAnnotation(Distributed.class); if (distributedAnalyzer != null) { // the analyzer-level annotation always comes first (can override // the result-level annotation). if (!distributedAnalyzer.value()) { return super.getResultReducerClass(); } final Class<? extends AnalyzerResultReducer<?>> reducer = distributedAnalyzer.reducer(); if (reducer != null && reducer != NoAnalyzerResultReducer.class) { return reducer; } } return super.getResultReducerClass(); }
@Distributed(reducer = WriteDataResultReducer.class) public interface WriteDataResult extends AnalyzerResult {
@Distributed(reducer = CategorizationResultReducer.class) public class CategorizationResult implements AnalyzerResult {
@Distributed(reducer = NumberAnalyzerResultReducer.class) public class NumberAnalyzerResult extends CrosstabResult {
@Distributed(true) abstract class AbstractQueryOptimizedRangeFilter<E> implements QueryOptimizedFilter<RangeFilterCategory>, Comparator<E>, HasLabelAdvice {
@Distributed(reducer = ValueMatchAnalyzerResultReducer.class) public class ValueMatchAnalyzerResult extends AbstractValueCountingAnalyzerResult {
@Description("Marked rows") @Distributed(reducer = MarkRowsAnalyzerResultReducer.class) public class MarkRowsAnalyzerResult extends AnnotatedRowsResult { private static final long serialVersionUID = 1L; public MarkRowsAnalyzerResult(RowAnnotation annotation, RowAnnotationFactory annotationFactory, InputColumn<?>[] highlightedColumns) { super(annotation, annotationFactory, highlightedColumns); } @Metric(order = 1, value = "Row count") public int getTotalRowCount() { return getAnnotatedRowCount(); } }
@Description("Records with unresolved foreign key values") @Distributed(reducer = ReferentialIntegrityAnalyzerReducer.class) public class ReferentialIntegrityAnalyzerResult extends AnnotatedRowsResult { private static final long serialVersionUID = 1L; public ReferentialIntegrityAnalyzerResult(final RowAnnotation annotation, final RowAnnotationFactory annotationFactory, final InputColumn<?>[] highlightedColumns) { super(annotation, annotationFactory, highlightedColumns); } }
@Distributed(reducer = PatternFinderResultReducer.class) public class PatternFinderResult implements AnalyzerResult {
@Distributed(reducer = StringAnalyzerResultReducer.class) public class StringAnalyzerResult extends CrosstabResult {
@Description("Marked rows") @Distributed(reducer = MarkRowsAnalyzerResultReducer.class) public class MarkRowsAnalyzerResult extends AnnotatedRowsResult { private static final long serialVersionUID = 1L; public MarkRowsAnalyzerResult(RowAnnotation annotation, RowAnnotationFactory annotationFactory, InputColumn<?>[] highlightedColumns) { super(annotation, annotationFactory, highlightedColumns); } @Metric(order = 1, value = "Row count") public int getTotalRowCount() { return getAnnotatedRowCount(); } }
@Distributed(reducer = CompletenessAnalyzerResultReducer.class) public class CompletenessAnalyzerResult extends AnnotatedRowsResult implements AnalyzerResult {
@Concurrent(true) @Categorized(DateAndTimeCategory.class) @Distributed(reducer = WeekdayDistributionResultReducer.class) public class WeekdayDistributionAnalyzer implements Analyzer<CrosstabResult> {
@Concurrent(true) @Categorized(DateAndTimeCategory.class) @Distributed(reducer = DatePartDistributionResultReducer.class) public class YearDistributionAnalyzer implements Analyzer<CrosstabResult> {
@Concurrent(true) @Categorized(DateAndTimeCategory.class) @Distributed(reducer = MonthDistributionResultReducer.class) public class MonthDistributionAnalyzer implements Analyzer<CrosstabResult> {
+ "location for staging data or simply storing data temporarily for further analysis.") @Categorized(superCategory = WriteSuperCategory.class) @Distributed(false) public class CreateStagingTableAnalyzer extends AbstractOutputWriterAnalyzer implements HasLabelAdvice {