All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.marklogic.flux.api.GenericFilesImporter Maven / Gradle / Ivy

There is a newer version: 1.1.3
Show newest version
/*
 * Copyright © 2024 MarkLogic Corporation. All Rights Reserved.
 */
package com.marklogic.flux.api;

import java.util.function.Consumer;

/**
 * Read local, HDFS, and S3 files and write the contents of each file as a document in MarkLogic.
 */
public interface GenericFilesImporter extends Executor {

    enum DocumentType {
        JSON, TEXT, XML
    }

    interface ReadGenericFilesOptions extends ReadFilesOptions {
        ReadGenericFilesOptions compressionType(CompressionType compressionType);

        ReadGenericFilesOptions partitions(int partitions);

        ReadGenericFilesOptions encoding(String encoding);
    }

    interface WriteGenericDocumentsOptions extends WriteDocumentsOptions {
        WriteGenericDocumentsOptions documentType(DocumentType documentType);
    }

    GenericFilesImporter from(Consumer consumer);

    GenericFilesImporter from(String... paths);

    /**
     * @since 1.1.0
     */
    GenericFilesImporter streaming();

    GenericFilesImporter to(Consumer consumer);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy