Class DataClientHdfsContext
java.lang.Object
com.here.platform.data.client.hdfs.DataClientHdfsContext
- All Implemented Interfaces:
DataClientContext
Context holder with shared resources used by DataClient.
The context is not serializable (contains threads and sockets) and should never be shared between master and workers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.pekko.actor.ActorSystemstatic DataClientHdfsContextcontext(com.typesafe.config.Config customConfig) Context holder with shared resources used by DataClient.org.apache.pekko.stream.Materializerorg.apache.pekko.DoneMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.here.platform.data.client.utils.DataClientContext
dispatcher
-
Constructor Details
-
DataClientHdfsContext
public DataClientHdfsContext(org.apache.pekko.actor.ActorSystem actorSystem)
-
-
Method Details
-
context
Context holder with shared resources used by DataClient.This context must be always stored in local variable inside the node closure, otherwise, spark will try to serialize the object:
Calling
is not required but recommended. It will allow pekko to finish jobs and release resources before JVM hard kill the daemon threads.Await.ready(CoordinatedShutdown(actorSystem).run(UnknownReason), 15.seconds) -
actorSystem
public org.apache.pekko.actor.ActorSystem actorSystem()- Specified by:
actorSystemin interfaceDataClientContext
-
materializer
public org.apache.pekko.stream.Materializer materializer()- Specified by:
materializerin interfaceDataClientContext
-
terminate
public org.apache.pekko.Done terminate()- Specified by:
terminatein interfaceDataClientContext
-