Py4JServer¶
Py4JServer
is a gateway server between Python and Java Virtual Machine (JVM) using Py4J.
Py4JServer
is a wrapper for a py4j Server.
Creating Instance¶
Py4JServer
takes the following to be created:
-
SparkConf
(Spark Core)
Py4JServer
is created when:
- PythonGatewayServer command-line application is started
- PythonRunner command-line application is started
py4j Server¶
Py4JServer
creates a ClientServer
(py4j) or GatewayServer
(py4j) based on PYSPARK_PIN_THREAD environment variable.
Connection Secret¶
secret: String
Py4JServer
creates a connection secret for a secure communication.
start¶
start(): Unit
start
requests the py4j Server to start.
getListeningPort¶
getListeningPort: Int
getListeningPort
requests the py4j Server for the listening port.