class ScioContext extends TransformNameable
Main entry point for Scio functionality. A ScioContext represents a pipeline and can be used to create SCollections and distributed caches on that cluster.
- Source
- ScioContext.scala
- Alphabetic
- By Inheritance
- ScioContext
- TransformNameable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def binaryFile(path: String, reader: BinaryFileReader, compression: Compression = BinaryIO.ReadParam.DefaultCompression, emptyMatchTreatment: EmptyMatchTreatment = TextIO.ReadParam.DefaultEmptyMatchTreatment, suffix: String = BinaryIO.ReadParam.DefaultSuffix): SCollection[Array[Byte]]
Get an SCollection of
Array[Byte]
from a binary file.Get an SCollection of
Array[Byte]
from a binary file.- reader
An instance of
BinaryFileReader
for the specific binary format used by the input file.
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def customInput[T, I >: PBegin <: PInput](name: String, transform: PTransform[I, PCollection[T]]): SCollection[T]
Get an SCollection with a custom input transform.
Get an SCollection with a custom input transform. The transform should have a unique name.
- def empty[T]()(implicit arg0: Coder[T]): SCollection[T]
Form an empty SCollection.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def initCounter(counters: Counter*): Seq[Counter]
Initialize a given Counter metric.
- def initCounter(namespace: String, name: String): Counter
Initialize a new Counter metric from namespace and name.
- def initCounter[T](name: String)(implicit arg0: ClassTag[T]): Counter
Initialize a new Counter metric using
T
as namespace.Initialize a new Counter metric using
T
as namespace. Default is "com.spotify.scio.ScioMetrics" ifT
is not specified. - def isClosed: Boolean
Whether the context is closed.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isTest: Boolean
Whether this is a test context.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val options: PipelineOptions
- def optionsAs[T <: PipelineOptions](implicit arg0: ClassTag[T]): T
Get PipelineOptions as a more specific sub-type.
- def parallelize[K, V](elems: Map[K, V])(implicit koder: Coder[K], voder: Coder[V]): SCollection[(K, V)]
Distribute a local Scala
Map
to form an SCollection. - def parallelize[T](elems: Iterable[T])(implicit arg0: Coder[T]): SCollection[T]
Distribute a local Scala
Iterable
to form an SCollection. - def parallelizeTimestamped[T](elems: Iterable[T], timestamps: Iterable[Instant])(implicit arg0: Coder[T]): SCollection[T]
Distribute a local Scala
Iterable
with timestamps to form an SCollection. - def parallelizeTimestamped[T](elems: Iterable[(T, Instant)])(implicit arg0: Coder[T]): SCollection[T]
Distribute a local Scala
Iterable
with timestamps to form an SCollection. - def pipeline: Pipeline
Underlying pipeline.
- def read[T](io: ScioIO[T] { type ReadP = Unit }): SCollection[T]
- def read[T](io: ScioIO[T])(params: ReadP): SCollection[T]
Generic read method for all
ScioIO[T]
implementations, which will invoke the provided IO's com.spotify.scio.io.ScioIO[T]#readWithContext method along with read configurations passed in.Generic read method for all
ScioIO[T]
implementations, which will invoke the provided IO's com.spotify.scio.io.ScioIO[T]#readWithContext method along with read configurations passed in. The IO class can delegate test-specific behavior if necessary.- io
an implementation of
ScioIO[T]
trait- params
configurations need to pass to perform underline read implementation
- def run(): ScioExecutionContext
Runs the underlying pipeline.
Runs the underlying pipeline.
Running closes the context and no further transformations can be applied to the pipeline once the context is closed.
- returns
the ScioExecutionContext for the underlying job execution.
- def setAppName(name: String): Unit
Set application name for the context.
- def setJobName(name: String): Unit
Set job name for the context.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def tempLocation: String
- def textFile(path: String, compression: Compression = TextIO.ReadParam.DefaultCompression, emptyMatchTreatment: EmptyMatchTreatment = TextIO.ReadParam.DefaultEmptyMatchTreatment, suffix: String = TextIO.ReadParam.DefaultSuffix): SCollection[String]
Get an SCollection for a text file.
- def toString(): String
- Definition Classes
- AnyRef → Any
- def transform[U](name: String)(f: (ScioContext) => SCollection[U]): SCollection[U]
- def transform[U](f: (ScioContext) => SCollection[U]): SCollection[U]
- def unionAll[T](scs: => Iterable[SCollection[T]])(implicit arg0: Coder[T]): SCollection[T]
Create a union of multiple SCollections.
Create a union of multiple SCollections. Supports empty lists.
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def withName(name: String): ScioContext.this.type
Set a custom name for the next transform to be applied.
Set a custom name for the next transform to be applied.
- Definition Classes
- TransformNameable
- def wrap[T](p: PCollection[T]): SCollection[T]
Wrap a PCollection.