Github user winningsix commented on a diff in the pull request:

    https://github.com/apache/spark/pull/8880#discussion_r76175174
  
    --- Diff: 
yarn/src/test/scala/org/apache/spark/deploy/yarn/YarnIOEncryptionSuite.scala ---
    @@ -0,0 +1,335 @@
    +/*
    + * 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.yarn
    +
    +import java.io._
    +import java.nio.ByteBuffer
    +import java.security.PrivilegedExceptionAction
    +import java.util.{ArrayList => JArrayList, LinkedList => JLinkedList, UUID}
    +
    +import scala.runtime.AbstractFunction1
    +
    +import com.google.common.collect.HashMultiset
    +import com.google.common.io.ByteStreams
    +import org.apache.hadoop.security.{Credentials, UserGroupInformation}
    +import org.junit.Assert.assertEquals
    +import org.mockito.Mock
    +import org.mockito.MockitoAnnotations
    +import org.mockito.invocation.InvocationOnMock
    +import org.mockito.stubbing.Answer
    +import org.mockito.Answers.RETURNS_SMART_NULLS
    +import org.mockito.Matchers.{eq => meq, _}
    +import org.mockito.Mockito._
    +import org.scalatest.{BeforeAndAfterAll, BeforeAndAfterEach, Matchers}
    +
    +import org.apache.spark._
    +import org.apache.spark.deploy.SparkHadoopUtil
    +import org.apache.spark.executor.{ShuffleWriteMetrics, TaskMetrics}
    +import org.apache.spark.internal.config._
    +import org.apache.spark.io.CompressionCodec
    +import org.apache.spark.memory.{TaskMemoryManager, TestMemoryManager}
    +import org.apache.spark.network.buffer.NioManagedBuffer
    +import org.apache.spark.network.util.LimitedInputStream
    +import org.apache.spark.security.CryptoStreamUtils
    +import org.apache.spark.serializer._
    +import org.apache.spark.shuffle._
    +import org.apache.spark.shuffle.sort.{SerializedShuffleHandle, 
UnsafeShuffleWriter}
    +import org.apache.spark.storage._
    +import org.apache.spark.util.Utils
    +
    +private[spark] class YarnIOEncryptionSuite extends SparkFunSuite with 
Matchers with
    --- End diff --
    
    > Could it be moved to core where the rest of the code lives?
    
    Cool, it's a good place to put this test since it's closer to other related 
code.
    
    > If it can be moved to core, you can even relax the check in SparkContext 
to check for "spark.testing", which is set by the root pom file / sbt script,
    
    Yes, this test will benefit if it has some needs to create 
```SparkContext``` in the future.
    
    >  not worry about "SPARK_YARN_MODE".
    
    Do you mean we need not unset this ENV variable in the tear down block?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to