Class

net.sansa_stack.rdf.flink.io

RDFWriter

Related Doc: package io

Permalink

implicit class RDFWriter[T] extends AnyRef

Adds methods, ntriples and turtle, to org.apache.flink.api.scala.ExecutionEnvironment that allows to write N-Triples and N-Quads files.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RDFWriter
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RDFWriter(ds: DataSet[Triple])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  14. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. def saveAsNQuadsFile(graph: String, path: String, writeMode: WriteMode = FileSystem.WriteMode.NO_OVERWRITE): DataSink[String]

    Permalink

    Writes the triples as N-Quads file(s) to the specified location using the given graph.

    Writes the triples as N-Quads file(s) to the specified location using the given graph.

    - A directory is created and multiple files are written underneath. (Default behavior)
    This sink creates a directory called "path1", and files "1", "2" ... are writen underneath depending on parallelism


    .
    └── path1/
        ├── 1
        ├── 2
        └── ...

    Code Example

    dataset.saveAsNQuadsFile("file:///path1")

    - A single file called "path1" is created when parallelism is set to 1

    .
    └── path1

    Code Example

    // Parallelism is set to only this particular operation
    dataset.saveAsNQuadsFile("file:///path1").setParallelism(1)
    
    // This will have the same effect but note all operators' parallelism are set to one
    env.setParallelism(1);
    ...
    dataset.saveAsNQuadsFile("file:///path1")

    - A directory is always created when fs.output.always-create-directory is set to true in flink-conf.yaml file, even when parallelism is set to 1.

    .
    └── path1/
        └── 1

    Code Example

    // fs.output.always-create-directory = true
    dataset.saveAsNQuadsFile("file:///path1").setParallelism(1)
    graph

    The graph used for the N-Quads

    path

    The path pointing to the location the text file or files under the directory is written to.

    writeMode

    Control the behavior for existing files. Options are NO_OVERWRITE and OVERWRITE.

    returns

    The DataSink that writes the DataSet.

  16. def saveAsNTriplesFile(path: String, writeMode: WriteMode = FileSystem.WriteMode.NO_OVERWRITE): DataSink[String]

    Permalink

    Writes the triples as N-Triples file(s) to the specified location.

    Writes the triples as N-Triples file(s) to the specified location.

    - A directory is created and multiple files are written underneath. (Default behavior)
    This sink creates a directory called "path1", and files "1", "2" ... are writen underneath depending on parallelism


    .
    └── path1/
        ├── 1
        ├── 2
        └── ...

    Code Example

    dataset.saveAsNTriplesFile("file:///path1")

    - A single file called "path1" is created when parallelism is set to 1

    .
    └── path1

    Code Example

    // Parallelism is set to only this particular operation
    dataset.saveAsNTriplesFile("file:///path1").setParallelism(1)
    
    // This will have the same effect but note all operators' parallelism are set to one
    env.setParallelism(1);
    ...
    dataset.saveAsNTriplesFile("file:///path1")

    - A directory is always created when fs.output.always-create-directory is set to true in flink-conf.yaml file, even when parallelism is set to 1.

    .
    └── path1/
        └── 1

    Code Example

    // fs.output.always-create-directory = true
    dataset.saveAsNTriplesFile("file:///path1").setParallelism(1)
    path

    The path pointing to the location the text file or files under the directory is written to.

    writeMode

    Control the behavior for existing files. Options are NO_OVERWRITE and OVERWRITE.

    returns

    The DataSink that writes the DataSet.

  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  18. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped