Search in sources :

Example 1 with RowConverter

use of org.apache.carbondata.processing.loading.converter.RowConverter in project carbondata by apache.

the class DataConverterProcessorStepImpl method initialize.

@Override
public void initialize() throws IOException {
    super.initialize();
    child.initialize();
    converters = new ArrayList<>();
    badRecordLogger = BadRecordsLoggerProvider.createBadRecordLogger(configuration);
    RowConverter converter = new RowConverterImpl(child.getOutput(), configuration, badRecordLogger);
    converters.add(converter);
    converter.initialize();
    if (null != configuration.getBucketingInfo()) {
        this.isBucketColumnEnabled = true;
        initializeBucketColumnPartitioner();
    } else if (null != configuration.getSortColumnRangeInfo()) {
        this.isSortColumnRangeEnabled = true;
        initializeSortColumnRangesPartitioner();
    }
}
Also used : RowConverterImpl(org.apache.carbondata.processing.loading.converter.impl.RowConverterImpl) RowConverter(org.apache.carbondata.processing.loading.converter.RowConverter)

Example 2 with RowConverter

use of org.apache.carbondata.processing.loading.converter.RowConverter in project carbondata by apache.

the class DataConverterProcessorStepImpl method close.

@Override
public void close() {
    if (!closed) {
        if (null != badRecordLogger) {
            badRecordLogger.closeStreams();
            CarbonBadRecordUtil.renameBadRecord(configuration);
        }
        super.close();
        if (converters != null) {
            for (RowConverter converter : converters) {
                if (null != converter) {
                    converter.finish();
                }
            }
        }
    }
}
Also used : RowConverter(org.apache.carbondata.processing.loading.converter.RowConverter)

Aggregations

RowConverter (org.apache.carbondata.processing.loading.converter.RowConverter)2 RowConverterImpl (org.apache.carbondata.processing.loading.converter.impl.RowConverterImpl)1