com.marklogic.spark.reader.file.FileScanBuilder 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.Scan;
import org.apache.spark.sql.connector.read.ScanBuilder;
import org.apache.spark.sql.execution.datasources.PartitioningAwareFileIndex;
import java.util.Map;
public class FileScanBuilder implements ScanBuilder {
private final Map properties;
private final PartitioningAwareFileIndex fileIndex;
public FileScanBuilder(Map properties, PartitioningAwareFileIndex fileIndex) {
this.properties = properties;
this.fileIndex = fileIndex;
}
@Override
public Scan build() {
return new FileScan(properties, fileIndex);
}
}