@@ -52,8 +52,6 @@ private[spark] class EventLoggingListener(
5252 private val logBaseDir = conf.get(" spark.eventLog.dir" , " /tmp/spark-events" ).stripSuffix(" /" )
5353 private val name = appName.replaceAll(" [ :/]" , " -" ).toLowerCase + " -" + System .currentTimeMillis
5454 val logDir = logBaseDir + " /" + name
55- val LOG_FILE_PERMISSIONS : FsPermission =
56- FsPermission .createImmutable(Integer .parseInt(" 770" , 8 ).toShort: Short )
5755
5856 private val logger =
5957 new FileLogger (logDir, conf, hadoopConfiguration, outputBufferSize, shouldCompress,
@@ -67,11 +65,10 @@ private[spark] class EventLoggingListener(
6765 logInfo(" Logging events to %s" .format(logDir))
6866 if (shouldCompress) {
6967 val codec = conf.get(" spark.io.compression.codec" , CompressionCodec .DEFAULT_COMPRESSION_CODEC )
70- logger.newFile(COMPRESSION_CODEC_PREFIX + codec, Some ( LOG_FILE_PERMISSIONS ) )
68+ logger.newFile(COMPRESSION_CODEC_PREFIX + codec)
7169 }
72- logger.newFile(SPARK_VERSION_PREFIX + SparkContext .SPARK_VERSION ,
73- Some (LOG_FILE_PERMISSIONS ))
74- logger.newFile(LOG_PREFIX + logger.fileIndex, Some (LOG_FILE_PERMISSIONS ))
70+ logger.newFile(SPARK_VERSION_PREFIX + SparkContext .SPARK_VERSION )
71+ logger.newFile(LOG_PREFIX + logger.fileIndex)
7572 }
7673
7774 /** Log the event as JSON. */
@@ -118,7 +115,7 @@ private[spark] class EventLoggingListener(
118115 * In addition, create an empty special file to indicate application completion.
119116 */
120117 def stop () = {
121- logger.newFile(APPLICATION_COMPLETE , Some ( LOG_FILE_PERMISSIONS ) )
118+ logger.newFile(APPLICATION_COMPLETE )
122119 logger.stop()
123120 }
124121}
@@ -128,6 +125,9 @@ private[spark] object EventLoggingListener extends Logging {
128125 val SPARK_VERSION_PREFIX = " SPARK_VERSION_"
129126 val COMPRESSION_CODEC_PREFIX = " COMPRESSION_CODEC_"
130127 val APPLICATION_COMPLETE = " APPLICATION_COMPLETE"
128+ val LOG_FILE_PERMISSIONS : FsPermission =
129+ FsPermission .createImmutable(Integer .parseInt(" 770" , 8 ).toShort)
130+
131131
132132 // A cache for compression codecs to avoid creating the same codec many times
133133 private val codecMap = new mutable.HashMap [String , CompressionCodec ]
0 commit comments