[GitHub] spark pull request #21884: [SPARK-24960][K8S] explicitly expose ports on dri...

2018-08-01 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/spark/pull/21884


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #21884: [SPARK-24960][K8S] explicitly expose ports on dri...

2018-08-01 Thread adelbertc
Github user adelbertc commented on a diff in the pull request:

https://github.com/apache/spark/pull/21884#discussion_r207026446
  
--- Diff: 
resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/features/BasicDriverFeatureStepSuite.scala
 ---
@@ -203,4 +212,12 @@ class BasicDriverFeatureStepSuite extends 
SparkFunSuite {
   "spark.files" -> 
"https://localhost:9000/file1.txt,/opt/spark/file2.txt;)
 assert(additionalProperties === expectedSparkConf)
   }
+
+  def containerPort(name: String, portNumber: Int): ContainerPort = {
+val port = new ContainerPort()
--- End diff --

Done


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #21884: [SPARK-24960][K8S] explicitly expose ports on dri...

2018-08-01 Thread mccheah
Github user mccheah commented on a diff in the pull request:

https://github.com/apache/spark/pull/21884#discussion_r206999720
  
--- Diff: 
resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/features/BasicDriverFeatureStepSuite.scala
 ---
@@ -203,4 +212,12 @@ class BasicDriverFeatureStepSuite extends 
SparkFunSuite {
   "spark.files" -> 
"https://localhost:9000/file1.txt,/opt/spark/file2.txt;)
 assert(additionalProperties === expectedSparkConf)
   }
+
+  def containerPort(name: String, portNumber: Int): ContainerPort = {
+val port = new ContainerPort()
--- End diff --

Use `ContainerPortBuilder`


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #21884: [SPARK-24960][K8S] explicitly expose ports on dri...

2018-08-01 Thread liyinan926
Github user liyinan926 commented on a diff in the pull request:

https://github.com/apache/spark/pull/21884#discussion_r206986544
  
--- Diff: 
resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/features/BasicDriverFeatureStepSuite.scala
 ---
@@ -203,4 +212,12 @@ class BasicDriverFeatureStepSuite extends 
SparkFunSuite {
   "spark.files" -> 
"https://localhost:9000/file1.txt,/opt/spark/file2.txt;)
 assert(additionalProperties === expectedSparkConf)
   }
+
+  def containerPort(name: String, portNumber: Int): ContainerPort = {
+val port = new ContainerPort()
+port.setName(name)
--- End diff --

Sorry my bad, I misread it as something like:
```
return new ContainerPort()
  .setName(name)
 ...
```


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #21884: [SPARK-24960][K8S] explicitly expose ports on dri...

2018-08-01 Thread adelbertc
Github user adelbertc commented on a diff in the pull request:

https://github.com/apache/spark/pull/21884#discussion_r206984628
  
--- Diff: 
resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/features/BasicDriverFeatureStepSuite.scala
 ---
@@ -203,4 +212,12 @@ class BasicDriverFeatureStepSuite extends 
SparkFunSuite {
   "spark.files" -> 
"https://localhost:9000/file1.txt,/opt/spark/file2.txt;)
 assert(additionalProperties === expectedSparkConf)
   }
+
+  def containerPort(name: String, portNumber: Int): ContainerPort = {
+val port = new ContainerPort()
+port.setName(name)
--- End diff --

@liyinan926 Is it? It looks OK on my end I think unless I'm missing 
something


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #21884: [SPARK-24960][K8S] explicitly expose ports on dri...

2018-08-01 Thread liyinan926
Github user liyinan926 commented on a diff in the pull request:

https://github.com/apache/spark/pull/21884#discussion_r206948155
  
--- Diff: 
resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/features/BasicDriverFeatureStepSuite.scala
 ---
@@ -203,4 +212,12 @@ class BasicDriverFeatureStepSuite extends 
SparkFunSuite {
   "spark.files" -> 
"https://localhost:9000/file1.txt,/opt/spark/file2.txt;)
 assert(additionalProperties === expectedSparkConf)
   }
+
+  def containerPort(name: String, portNumber: Int): ContainerPort = {
+val port = new ContainerPort()
+port.setName(name)
--- End diff --

Looks like the indention here is incorrect.


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #21884: [SPARK-24960][K8S] explicitly expose ports on dri...

2018-07-31 Thread mccheah
Github user mccheah commented on a diff in the pull request:

https://github.com/apache/spark/pull/21884#discussion_r206699070
  
--- Diff: 
resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/features/BasicDriverFeatureStepSuite.scala
 ---
@@ -87,6 +87,10 @@ class BasicDriverFeatureStepSuite extends SparkFunSuite {
 assert(configuredPod.container.getImage === "spark-driver:latest")
 assert(configuredPod.container.getImagePullPolicy === 
CONTAINER_IMAGE_PULL_POLICY)
 
+val expectedPortNames = Set(DRIVER_PORT_NAME, BLOCK_MANAGER_PORT_NAME, 
UI_PORT_NAME)
+val foundPortNames = configuredPod.container.getPorts.asScala.map(port 
=> port.getName).toSet
--- End diff --

Better to be safer here and check the protocol and the target port numbers. 
You can just compare against a list of expected `ContainerPort` objects - 
Kubernetes objects in our Java API have been good about giving us sane `equals` 
implementations.


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org