case class DockerRunScript(name: String = "docker-run", description: Option[String] = None, image: String, winDockerCmd: String = "docker", linuxDockerCmd: String = "docker", localDataDirToMount: Option[String] = None) extends CmdScriptBase with Product with Serializable
Run a docker image and get its std output.
If return value is not zero an exception is thrown.
Note about internal implementation: on execution value of parameter map entries where key starts with - 'runParam' will be added as parameter after the docker run command, sorted by their key. - 'dockerParam' will be added as parameter for the docker command, e.g. before the image name in the docker run command, sorted by their key. This allows to customize execution behaviour through Actions or DataObjects using CmdScript.
- name
name of the transformer
- description
Optional description of the transformer
- image
Docker image to run
- winDockerCmd
Cmd to execute docker on windows operating systems. Default is 'docker'.
- linuxDockerCmd
Cmd to execute docker on linux operating systems. Default is 'docker'.
- localDataDirToMount
Optional directory that will be mounted as /mnt/data in the container. This is needed if your container wants to access files available in your local filesystem.
- Annotations
- @Scaladoc()
- Alphabetic
- By Inheritance
- DockerRunScript
- Serializable
- Serializable
- Product
- Equals
- CmdScriptBase
- SmartDataLakeLogger
- ParsableScriptDef
- ParsableFromConfig
- ScriptDef
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
DockerRunScript(name: String = "docker-run", description: Option[String] = None, image: String, winDockerCmd: String = "docker", linuxDockerCmd: String = "docker", localDataDirToMount: Option[String] = None)
- name
name of the transformer
- description
Optional description of the transformer
- image
Docker image to run
- winDockerCmd
Cmd to execute docker on windows operating systems. Default is 'docker'.
- linuxDockerCmd
Cmd to execute docker on linux operating systems. Default is 'docker'.
- localDataDirToMount
Optional directory that will be mounted as /mnt/data in the container. This is needed if your container wants to access files available in your local filesystem.
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
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
- final val containerDataDir: String("/mnt/data")
-
val
description: Option[String]
- Definition Classes
- DockerRunScript → ScriptDef
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
execStdOutStream(configObjectId: ConfigObjectId, partitionValues: Seq[PartitionValues], parameters: Map[String, String], errors: Buffer[String] = mutable.Buffer())(implicit context: ActionPipelineContext): Stream[String]
Function to be implemented to execute command and return stdout as Stream of lines.
Function to be implemented to execute command and return stdout as Stream of lines.
- configObjectId
id of the action which executes this transformation. This is mainly used to prefix error messages.
- partitionValues
partition values to transform
- parameters
key-value parameters
- errors
an optional Buffer to collect stdErr messages
- returns
standard output of script as Stream of lines
- Definition Classes
- CmdScriptBase → ScriptDef
-
def
execStdOutString(configObjectId: ConfigObjectId, partitionValues: Seq[PartitionValues], parameters: Map[String, String], errors: Buffer[String] = mutable.Buffer())(implicit context: ActionPipelineContext): String
Function to be implemented to execute command and return stdout as String.
Function to be implemented to execute command and return stdout as String.
- configObjectId
id of the action or dataobject which executes this transformation. This is mainly used to prefix error messages.
- partitionValues
partition values to transform
- parameters
key-value parameters
- errors
an optional Buffer to collect stdErr messages
- returns
standard output of script as String
- Definition Classes
- CmdScriptBase → ScriptDef
-
def
factory: FromConfigFactory[ParsableScriptDef]
Returns the factory that can parse this type (that is, type
CO).Returns the factory that can parse this type (that is, type
CO).Typically, implementations of this method should return the companion object of the implementing class. The companion object in turn should implement FromConfigFactory.
- returns
the factory (object) for this class.
- Definition Classes
- DockerRunScript → ParsableFromConfig
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val image: String
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val linuxDockerCmd: String
- val localDataDirToMount: Option[String]
-
lazy val
logger: Logger
- Attributes
- protected
- Definition Classes
- SmartDataLakeLogger
- Annotations
- @transient()
-
val
name: String
- Definition Classes
- DockerRunScript → ScriptDef
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- val winDockerCmd: String
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated