public static DataQualityAnalysis analyzeQuality(final Schema schema, final JavaRDD<List<Writable>> data) {
        int nColumns = schema.numColumns();
        List<QualityAnalysisState> states = data.aggregate(null,
                new BiFunctionAdapter<>(new QualityAnalysisAddFunction(schema)),
                new BiFunctionAdapter<>(new QualityAnalysisCombineFunction()));

        List<ColumnQuality> list = new ArrayList<>(nColumns);

        for (QualityAnalysisState qualityState : states) {
            list.add(qualityState.getColumnQuality());
        }
        return new DataQualityAnalysis(schema, list);
    }
public static DataQualityAnalysis analyzeQuality ( final Schema schema , final JavaRDD < List < Writable > > data ) { int nColumns = schema . numColumns ( ) ; List < QualityAnalysisState > states = data . aggregate ( null , new BiFunctionAdapter < > ( new QualityAnalysisAddFunction ( schema ) ) , new BiFunctionAdapter < > ( new QualityAnalysisCombineFunction ( ) ) ) ; List < ColumnQuality > list = new ArrayList < > ( nColumns ) ; for ( QualityAnalysisState qualityState : states ) { list . add ( qualityState . getColumnQuality ( ) ) ; } return new DataQualityAnalysis ( schema , list ) ; }
Analyze the data quality of data - provides a report on missing values, values that don't comply with schema, etc
@param schema Schema for data
@param data   Data to analyze
@return DataQualityAnalysis object