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

com.marklogic.spark.writer.CommitMessage Maven / Gradle / Ivy

The newest version!
/*
 * Copyright © 2024 MarkLogic Corporation. All Rights Reserved.
 */
package com.marklogic.spark.writer;

import org.apache.spark.sql.connector.write.WriterCommitMessage;

import java.util.Set;

public class CommitMessage implements WriterCommitMessage {

    private final int successItemCount;
    private final int failedItemCount;
    private final Set graphs;

    /**
     * @param successItemCount
     * @param failedItemCount
     * @param graphs           zero or more MarkLogic Semantics graph names, each of which is associated with a
     *                         graph document in MarkLogic that must be created after all the documents have been
     *                         written.
     */
    public CommitMessage(int successItemCount, int failedItemCount, Set graphs) {
        this.successItemCount = successItemCount;
        this.failedItemCount = failedItemCount;
        this.graphs = graphs;
    }

    int getSuccessItemCount() {
        return successItemCount;
    }

    int getFailedItemCount() {
        return failedItemCount;
    }

    Set getGraphs() {
        return graphs;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy