[GitHub] spark pull request #19045: [WIP][SPARK-20628][CORE][K8S] Keep track of nodes...
Github user holdenk commented on a diff in the pull request: https://github.com/apache/spark/pull/19045#discussion_r229788821 --- Diff: resource-managers/kubernetes/integration-tests/src/test/scala/org/apache/spark/deploy/k8s/integrationtest/KubernetesSuite.scala --- @@ -242,12 +243,19 @@ private[spark] class KubernetesSuite extends SparkFunSuite action match { case Action.ADDED | Action.MODIFIED => execPods(name) = resource + // If testing decomissioning delete the node 10 seconds after + if (decomissioningTest) { +Thread.sleep(1000) --- End diff -- We probably want to wait some fudge factor above running to ensure it has a chance to properly register and everything but yeah we can decrease the fudge factor and check the pod status to be more reliable. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #19045: [WIP][SPARK-20628][CORE][K8S] Keep track of nodes...
Github user ifilonenko commented on a diff in the pull request: https://github.com/apache/spark/pull/19045#discussion_r229012644 --- Diff: resource-managers/kubernetes/integration-tests/tests/decomissioning_water.py --- @@ -0,0 +1,38 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +#http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +from __future__ import print_function + +import sys +import time + +from pyspark.sql import SparkSession + + +if __name__ == "__main__": +""" +Usage: decomissioning_water +""" +spark = SparkSession \ +.builder \ +.appName("PyMemoryTest") \ +.getOrCreate() +sc = spark.SparkContext +rdd = sc.parallelize(range(10)) +rdd.collect() +time.sleep(15) --- End diff -- Personally, might be better to have the `15` be an `args` so that the tester can tune this based on how long they want to sleep. But I am indifferent to this small NIT --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #19045: [WIP][SPARK-20628][CORE][K8S] Keep track of nodes...
Github user ifilonenko commented on a diff in the pull request: https://github.com/apache/spark/pull/19045#discussion_r229011769 --- Diff: resource-managers/kubernetes/integration-tests/src/test/scala/org/apache/spark/deploy/k8s/integrationtest/KubernetesSuite.scala --- @@ -242,12 +243,19 @@ private[spark] class KubernetesSuite extends SparkFunSuite action match { case Action.ADDED | Action.MODIFIED => execPods(name) = resource + // If testing decomissioning delete the node 10 seconds after + if (decomissioningTest) { +Thread.sleep(1000) --- End diff -- Why the thread sleep? Why not just check if the `getStatus` is running and then kill? --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #19045: [WIP][SPARK-20628][CORE][K8S] Keep track of nodes...
Github user ifilonenko commented on a diff in the pull request: https://github.com/apache/spark/pull/19045#discussion_r229011136 --- Diff: resource-managers/kubernetes/integration-tests/src/test/scala/org/apache/spark/deploy/k8s/integrationtest/DecommissionSuite.scala --- @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + *http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.spark.deploy.k8s.integrationtest + +import org.apache.spark.deploy.k8s.integrationtest.KubernetesSuite._ +import org.apache.spark.deploy.k8s.integrationtest.TestConfig.{getTestImageRepo, getTestImageTag} + +private[spark] trait DecommissionSuite { k8sSuite: KubernetesSuite => --- End diff -- You need to extend `with DecommissionSuite` in `KubernetesSuite.scala` to launch the tests --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org