Packages

case class FileSink(filePath: String, format: Format = CsvFormat()) extends FormatAgnosticSink with Product with Serializable

A Sink that writes a Table into files using the given format.

This sink creates a directory named after the jobID inside the provided filepath. Each partition on the server then writes into its own file within this directory.

filePath

the filepath to write the table into

format

the format to be used by this sink (CsvFormat by default)

Example:
  1. import com.raphtory.algorithms.generic.EdgeList
    import com.raphtory.sinks.FileSink
    import com.raphtory.spouts.FileSpout
    
    val graphBuilder = new YourGraphBuilder()
    val graph = Raphtory.stream(FileSpout("/path/to/your/file"), graphBuilder)
    val testDir = "/tmp/raphtoryTest"
    val sink = FileSink(testDir)
    
    graph.execute(EdgeList()).writeTo(sink)
See also

Sink Format CsvFormat Table

Linear Supertypes
Serializable, Product, Equals, FormatAgnosticSink, Sink, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. FileSink
  2. Serializable
  3. Product
  4. Equals
  5. FormatAgnosticSink
  6. Sink
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected
  3. Private

Instance Constructors

  1. new FileSink(filePath: String, format: Format = CsvFormat())

    filePath

    the filepath to write the table into

    format

    the format to be used by this sink (CsvFormat by default)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def buildConnector(jobID: String, partitionID: Int, config: Config, itemDelimiter: String, fileExtension: String): SinkConnector

    Builds a SinkConnector to be used by Raphtory for writing a table using the provided Format.

    Builds a SinkConnector to be used by Raphtory for writing a table using the provided Format.

    jobID

    The ID of the job that generated the table

    partitionID

    The ID of the partition of the table

    config

    The configuration provided by the user

    itemDelimiter

    The String to be used as a delimiter between items when necessary

    returns

    The SinkConnector implementing the execution of this FormatAgnosticSink

    Definition Classes
    FileSinkFormatAgnosticSink
    See also

    SinkConnector

  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. final def executor(jobID: String, partitionID: Int, config: Config): SinkExecutor

    jobID

    the ID of the job that generated the table

    partitionID

    the ID of the partition of the table

    config

    the configuration provided by the user

    returns

    the SinkExecutor to be used for writing out results

    Definition Classes
    FormatAgnosticSinkSink
  9. val filePath: String
  10. val format: Format
  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  16. def productElementNames: Iterator[String]
    Definition Classes
    Product
  17. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  20. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from FormatAgnosticSink

Inherited from Sink

Inherited from AnyRef

Inherited from Any

Ungrouped