Scala/JVM SDK reference¶
All Scala artifacts use binary version 2.12 and Java 17. This guide uses SDK
version 0.1.5.
| Maven artifact | Responsibility |
|---|---|
com.k3rnl:linha-protocol_2.12 |
Wire contracts, codecs, credentials and result paths |
com.k3rnl:linha-client_2.12 |
Client, contexts, job handles and OAuth acquisition |
com.k3rnl:linha-worker_2.12 |
Handler runtime, leases, progress and publication |
com.k3rnl:linha-hadoop_2.12 |
Scoped application filesystem with range reads |
com.k3rnl:linha-spark_2.12 |
SparkContext sessions and distributed result helpers |
Dependency declarations¶
For an SBT application that includes both client and worker examples:
scalaVersion := "2.12.20"
val linhaVersion = "0.1.5"
libraryDependencies ++= Seq(
"com.k3rnl" %% "linha-client" % linhaVersion,
"com.k3rnl" %% "linha-spark" % linhaVersion,
"org.apache.spark" %% "spark-sql" % "3.5.6" % Provided
)
The Spark module brings the worker/protocol SDKs transitively. A client-only
application needs only linha-client; a shared entrypoint module also needs the
Spark types used by its code. Spark is provided at runtime by the worker image.
For Maven, use the explicit artifact names in the table, with group com.k3rnl.
Client and context¶
Complete constructors, arguments, defaults, return types and lifecycle behavior: Scala client, contexts and handles. Backend declarations are Json values described by BackendSpec.
Job handles¶
RawJobHandle and JobHandle cover restored IDs, status, attempts, cancellation and retained results. Submission futures acknowledge durable acceptance; result() retrieves available output without polling.
OAuth credentials¶
See CredentialProvider, OAuth factory arguments, IdentityHttpOptions, and transport/errors.
Entrypoints and worker context¶
See entrypoints/codecs, LinhaJobContext, LinhaWorker, and Spark runtime and syntax.
Result types and paths¶
ResultWriter and produced types, result paths/storage helpers, and PodTemplate/SparkPodTemplates list their public APIs. StorageSession and LinhaFileSystem cover application files. Use the type index for exact names.