com.marklogic.spark.reader.file.FilePartition Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of marklogic-spark-connector Show documentation
Show all versions of marklogic-spark-connector Show documentation
Spark 3 connector for MarkLogic
/*
* Copyright © 2024 MarkLogic Corporation. All Rights Reserved.
*/
package com.marklogic.spark.reader.file;
import org.apache.spark.sql.connector.read.InputPartition;
import java.util.Arrays;
import java.util.List;
public class FilePartition implements InputPartition {
static final long serialVersionUID = 1;
private final List paths;
public FilePartition(String path) {
this.paths = Arrays.asList(path);
}
public FilePartition(List paths) {
this.paths = paths;
}
public List getPaths() {
return paths;
}
@Override
public String toString() {
return this.paths.toString();
}
}