Skip to content

Commit 5fd5c6f

Browse files
author
Marcelo Vanzin
committed
Fix my broken rebase.
1 parent 318525a commit 5fd5c6f

File tree

2 files changed

+12
-19
lines changed

2 files changed

+12
-19
lines changed

core/src/main/scala/org/apache/spark/deploy/master/Master.scala

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private[master] class Master(
6262
private val hadoopConf = SparkHadoopUtil.get.newConfiguration(conf)
6363

6464
private def createDateFormat = new SimpleDateFormat("yyyyMMddHHmmss") // For application IDs
65-
65+
6666
private val WORKER_TIMEOUT = conf.getLong("spark.worker.timeout", 60) * 1000
6767
private val RETAINED_APPLICATIONS = conf.getInt("spark.deploy.retainedApplications", 200)
6868
private val RETAINED_DRIVERS = conf.getInt("spark.deploy.retainedDrivers", 200)
@@ -86,7 +86,7 @@ private[master] class Master(
8686
private val drivers = new HashSet[DriverInfo]
8787
private val completedDrivers = new ArrayBuffer[DriverInfo]
8888
// Drivers currently spooled for scheduling
89-
private val waitingDrivers = new ArrayBuffer[DriverInfo]
89+
private val waitingDrivers = new ArrayBuffer[DriverInfo]
9090
private var nextDriverNumber = 0
9191

9292
Utils.checkHost(host, "Expected hostname")
@@ -753,24 +753,24 @@ private[master] class Master(
753753
app.desc.appUiUrl = notFoundBasePath
754754
return false
755755
}
756-
756+
757757
val eventLogFilePrefix = EventLoggingListener.getLogPath(
758-
eventLogDir, app.id, app.desc.eventLogCodec)
758+
eventLogDir, app.id, "", app.desc.eventLogCodec)
759759
val fs = Utils.getHadoopFileSystem(eventLogDir, hadoopConf)
760-
val inProgressExists = fs.exists(new Path(eventLogFilePrefix +
760+
val inProgressExists = fs.exists(new Path(eventLogFilePrefix +
761761
EventLoggingListener.IN_PROGRESS))
762-
762+
763763
if (inProgressExists) {
764764
// Event logging is enabled for this application, but the application is still in progress
765765
logWarning(s"Application $appName is still in progress, it may be terminated abnormally.")
766766
}
767-
767+
768768
val (eventLogFile, status) = if (inProgressExists) {
769769
(eventLogFilePrefix + EventLoggingListener.IN_PROGRESS, " (in progress)")
770770
} else {
771771
(eventLogFilePrefix, " (completed)")
772772
}
773-
773+
774774
val logInput = EventLoggingListener.openEventLog(new Path(eventLogFile), fs)
775775
val replayBus = new ReplayListenerBus()
776776
val ui = SparkUI.createHistoryUI(new SparkConf, replayBus, new SecurityManager(conf),
@@ -854,8 +854,8 @@ private[master] class Master(
854854
}
855855

856856
private def removeDriver(
857-
driverId: String,
858-
finalState: DriverState,
857+
driverId: String,
858+
finalState: DriverState,
859859
exception: Option[Exception]) {
860860
drivers.find(d => d.id == driverId) match {
861861
case Some(driver) =>

core/src/main/scala/org/apache/spark/scheduler/EventLoggingListener.scala

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ private[spark] class EventLoggingListener(
9090
private[scheduler] val loggedEvents = new ArrayBuffer[JValue]
9191

9292
// Visible for tests only.
93-
private[scheduler] val logPath = getLogPath(logBaseDir, appId, compressionCodecName, appAttemptId)
93+
private[scheduler] val logPath = getLogPath(logBaseDir, appId, appAttemptId, compressionCodecName)
9494

9595
/**
9696
* Creates the log file in the configured log directory.
@@ -261,7 +261,7 @@ private[spark] object EventLoggingListener extends Logging {
261261
* @return A path which consists of file-system-safe characters.
262262
*/
263263
def getLogPath(
264-
logBaseDir: String,
264+
logBaseDir: URI,
265265
appId: String,
266266
appAttemptId: String,
267267
compressionCodecName: Option[String] = None): String = {
@@ -273,13 +273,6 @@ private[spark] object EventLoggingListener extends Logging {
273273
}
274274
}
275275

276-
def getLogPath(
277-
logBaseDir: String,
278-
appId: String,
279-
compressionCodecName: Option[String] = None): String = {
280-
getLogPath(logBaseDir, appId, "", compressionCodecName)
281-
}
282-
283276
/**
284277
* Opens an event log file and returns an input stream that contains the event data.
285278
*

0 commit comments

Comments
 (0)