File tree Expand file tree Collapse file tree 3 files changed +38
-1
lines changed
main/scala/org/apache/spark/deploy/armada
test/scala/org/apache/spark/deploy/armada/e2e Expand file tree Collapse file tree 3 files changed +38
-1
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,15 @@ export ARMADA_MASTER="armada://localhost:30002"
6868export ARMADA_QUEUE=" default"
6969export ARMADA_LOOKOUT_URL=" http://localhost:30000"
7070export INCLUDE_PYTHON=true
71+ export USE_KIND=true
72+ ```
73+
74+ ** Note:** For client mode, you need to set additional configuration:
75+
76+ ``` bash
77+ export ARMADA_MASTER=" local://armada://localhost:30002" # Add "local://" prefix
78+ export SPARK_DRIVER_HOST=" 172.18.0.1" # Required for client mode
79+ export SPARK_DRIVER_PORT=" 7078" # Required for client mode
7180```
7281
7382### Deployment
@@ -126,7 +135,17 @@ Make sure that the [SparkPi](#sparkpi-example) job successfully runs on your Arm
126135The project includes a ready-to-use Spark job to test your setup:
127136
128137``` bash
129- ./scripts/submitArmadaSpark.sh
138+ # Cluster mode + Dynamic allocation
139+ ./scripts/submitArmadaSpark.sh -M cluster -A dynamic 100
140+
141+ # Cluster mode + Static allocation
142+ ./scripts/submitArmadaSpark.sh -M cluster -A static 100
143+
144+ # Client mode + Dynamic allocation
145+ ./scripts/submitArmadaSpark.sh -M client -A dynamic 100
146+
147+ # Client mode + Static allocation
148+ ./scripts/submitArmadaSpark.sh -M client -A static 100
130149```
131150
132151This job leverages the same configuration parameters (` ARMADA_MASTER ` , ` ARMADA_QUEUE ` , ` ARMADA_LOOKOUT_URL ` ) as the ` scripts/config.sh ` script.
Original file line number Diff line number Diff line change @@ -122,6 +122,8 @@ class StaticCluster(val conf: SparkConf) extends DeploymentModeHelper {
122122 // In cluster mode, driver runs in a pod, so use service name from job ID
123123 ArmadaUtils .buildServiceNameFromJobId(driverJobId)
124124 }
125+
126+ override def toString : String = " StaticCluster"
125127}
126128
127129/** Static allocation in client mode.
@@ -160,6 +162,8 @@ class StaticClient(val conf: SparkConf) extends DeploymentModeHelper {
160162 )
161163 )
162164 }
165+
166+ override def toString : String = " StaticClient"
163167}
164168
165169/** Dynamic allocation in cluster mode.
@@ -196,6 +200,8 @@ class DynamicCluster(val conf: SparkConf) extends DeploymentModeHelper {
196200 // In cluster mode, driver runs in a pod, so use service name from job ID
197201 ArmadaUtils .buildServiceNameFromJobId(driverJobId)
198202 }
203+
204+ override def toString : String = " DynamicCluster"
199205}
200206
201207/** Dynamic allocation in client mode.
@@ -239,6 +245,8 @@ class DynamicClient(val conf: SparkConf) extends DeploymentModeHelper {
239245 )
240246 )
241247 }
248+
249+ override def toString : String = " DynamicClient"
242250}
243251
244252/** Factory for creating ModeHelper instances based on Spark configuration.
Original file line number Diff line number Diff line change @@ -24,6 +24,9 @@ import scala.concurrent.{ExecutionContext, Future}
2424import scala .concurrent .duration ._
2525import TestConstants ._
2626
27+ import org .apache .spark .SparkConf
28+ import org .apache .spark .deploy .armada .DeploymentModeHelper
29+
2730import scala .annotation .tailrec
2831
2932case class TestConfig (
@@ -187,10 +190,17 @@ class TestOrchestrator(
187190 s " e2e- ${name.toLowerCase.replaceAll(" [^a-z0-9]" , " -" )}- ${System .currentTimeMillis()}"
188191 val queueName = s " ${config.baseQueueName}- ${context.queueSuffix}"
189192
193+ // Determine deployment mode type
194+ val sparkConf = new SparkConf (false )
195+ config.sparkConfs.foreach { case (key, value) => sparkConf.set(key, value) }
196+ val modeHelper = DeploymentModeHelper (sparkConf)
197+ val modeType = modeHelper.toString
198+
190199 println(s " \n ========== Starting E2E Test: $name ========== " )
191200 println(s " Test ID: ${context.testId}" )
192201 println(s " Namespace: ${context.namespace}" )
193202 println(s " Queue: $queueName" )
203+ println(s " Deployment Mode: $modeType" )
194204
195205 val resultFuture = for {
196206 _ <- k8sClient.createNamespace(context.namespace)
You can’t perform that action at this time.
0 commit comments