Search in sources :

Example 1 with SortFullGroup

use of uk.gov.gchq.gaffer.parquetstore.operation.handler.utilities.SortFullGroup in project Gaffer by gchq.

the class AddElementsFromRDD method sort.

/**
 * Sorts the provided data.
 *
 * @param group the group
 * @param reversed whether these are edges that need to be sorted by destination then source
 * @param inputFiles the input files
 * @param outputDir the directory to write the output to
 * @throws OperationException if an {@link IOException} is thrown
 */
private void sort(final String group, final boolean reversed, final List<String> inputFiles, final String outputDir) throws OperationException {
    try {
        final List<String> sortColumns = schemaUtils.columnsToSortBy(group, reversed);
        LOGGER.info("SortFullGroup task for {} group {} is being called ({} files as input, outputting to {})", reversed ? "reversed" : "", group, inputFiles.size(), outputDir);
        new SortFullGroup(group, schemaUtils.getEntityGroups().contains(group), reversed, schemaUtils, sortColumns, inputFiles, outputDir, store.getProperties().getAddElementsOutputFilesPerGroup(), store.getProperties().getCompressionCodecName(), spark, fs).call();
    } catch (final IOException e) {
        throw new OperationException("TODO");
    }
}
Also used : SortFullGroup(uk.gov.gchq.gaffer.parquetstore.operation.handler.utilities.SortFullGroup) IOException(java.io.IOException) OperationException(uk.gov.gchq.gaffer.operation.OperationException)

Aggregations

IOException (java.io.IOException)1 OperationException (uk.gov.gchq.gaffer.operation.OperationException)1 SortFullGroup (uk.gov.gchq.gaffer.parquetstore.operation.handler.utilities.SortFullGroup)1