Class RddRdfWriterSettings<SELF extends RddRdfWriterSettings>
java.lang.Object
net.sansa_stack.spark.io.rdf.output.RddWriterSettings<SELF>
net.sansa_stack.spark.io.rdf.output.RddRdfWriterSettings<SELF>
- Direct Known Subclasses:
RddRdfWriter
,RddRdfWriterFactory
public class RddRdfWriterSettings<SELF extends RddRdfWriterSettings>
extends RddWriterSettings<SELF>
-
Field Summary
Modifier and TypeFieldDescriptionprotected long
Only for console output: Instead of writing tuples out immediatly, collect up to this number of tuples in order to derive the used prefixes.protected org.apache.jena.shared.PrefixMapping
protected boolean
Whether to convert quads to triples if a triple-based output format is requestedprotected org.apache.jena.riot.RDFFormat
Fields inherited from class net.sansa_stack.spark.io.rdf.output.RddWriterSettings
allowOverwriteFiles, consoleOutSupplier, deletePartitionFolderAfterMerge, hadoopConfiguration, partitionFolder, partitionFolderFs, partitionsAsIndependentFiles, postProcessingSettings, targetFile, targetFileFs, useCoalesceOne
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionconfigureFrom
(RddRdfWriterSettings<?> other) org.apache.jena.riot.RDFFormat
org.apache.jena.shared.PrefixMapping
org.apache.jena.riot.RDFFormat
boolean
boolean
Pass this object to a consumer.protected SELF
self()
setDeferOutputForUsedPrefixes
(long deferOutputForUsedPrefixes) setGlobalPrefixMapping
(Map<String, String> globalPrefixMap) setGlobalPrefixMapping
(org.apache.jena.shared.PrefixMapping globalPrefixMapping) Set a prefix mapping to be used "globally" across all partitions.setMapQuadsToTriplesForTripleLangs
(boolean mapQuadsToTriplesForTripleLangs) Whether to convert quads to triples if a triple-based output format is requested Jena by default discards any quad outside of the default graph when writing to a triple format.setOutputFormat
(String formatName) Raises an exception if the format is not foundsetOutputFormat
(org.apache.jena.riot.RDFFormat format) setPartitionsAsIndependentFiles
(boolean partitionsAsIndependentFiles) Methods inherited from class net.sansa_stack.spark.io.rdf.output.RddWriterSettings
configureFrom, getConsoleOutSupplier, getHadoopConfiguration, getPartitionFolder, getPartitionFolderFs, getPostProcessingSettings, getTargetFile, getTargetFileFs, isAllowOverwriteFiles, isConsoleOutput, isDeletePartitionFolderAfterMerge, isUseCoalesceOne, setAllowOverwriteFiles, setConsoleOutput, setConsoleOutSupplier, setDeletePartitionFolderAfterMerge, setHadoopConfiguration, setPartitionFolder, setPartitionFolder, setPartitionFolderFs, setPostProcessingSettings, setTargetFile, setTargetFile, setTargetFileFs, setUseCoalesceOne
-
Field Details
-
globalPrefixMapping
protected org.apache.jena.shared.PrefixMapping globalPrefixMapping -
outputFormat
protected org.apache.jena.riot.RDFFormat outputFormat -
mapQuadsToTriplesForTripleLangs
protected boolean mapQuadsToTriplesForTripleLangsWhether to convert quads to triples if a triple-based output format is requested -
deferOutputForUsedPrefixes
protected long deferOutputForUsedPrefixesOnly for console output: Instead of writing tuples out immediatly, collect up to this number of tuples in order to derive the used prefixes. Upon reaching this threshold, print out all seen prefixes and emit the held-back data as well as any further data immediately
-
-
Constructor Details
-
RddRdfWriterSettings
public RddRdfWriterSettings()
-
-
Method Details
-
isMapQuadsToTriplesForTripleLangs
public boolean isMapQuadsToTriplesForTripleLangs() -
self
- Overrides:
self
in classRddWriterSettings<SELF extends RddRdfWriterSettings>
-
mutate
Pass this object to a consumer. Useful to conditionally configure this object without breaking the fluent chain:rdd.configureSave().mutate(self -> { if (condition) { self.setX(); }}).run();
- Parameters:
action
-- Returns:
-
configureFrom
-
setMapQuadsToTriplesForTripleLangs
Whether to convert quads to triples if a triple-based output format is requested Jena by default discards any quad outside of the default graph when writing to a triple format. Setting this flag to true will map each quad in a named graph to the default graph. -
getGlobalPrefixMapping
public org.apache.jena.shared.PrefixMapping getGlobalPrefixMapping() -
setGlobalPrefixMapping
-
getOutputFormat
public org.apache.jena.riot.RDFFormat getOutputFormat() -
setOutputFormat
-
setOutputFormat
Raises an exception if the format is not found -
getFallbackOutputFormat
public org.apache.jena.riot.RDFFormat getFallbackOutputFormat() -
isPartitionsAsIndependentFiles
public boolean isPartitionsAsIndependentFiles()- Overrides:
isPartitionsAsIndependentFiles
in classRddWriterSettings<SELF extends RddRdfWriterSettings>
-
setPartitionsAsIndependentFiles
- Overrides:
setPartitionsAsIndependentFiles
in classRddWriterSettings<SELF extends RddRdfWriterSettings>
-
setDeferOutputForUsedPrefixes
-