Skip to content

Commit

Permalink
update eventlog check
Browse files Browse the repository at this point in the history
  • Loading branch information
nartal1 committed Nov 15, 2023
1 parent d49033a commit edef8a9
Showing 1 changed file with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package com.nvidia.spark.rapids.tool.profiling

import com.nvidia.spark.rapids.tool.{DatabricksEventLog, EventLogPathProcessor}
import com.nvidia.spark.rapids.tool.EventLogPathProcessor

import org.apache.spark.internal.Logging
import org.apache.spark.sql.rapids.tool.AppFilterImpl
Expand Down Expand Up @@ -69,15 +69,12 @@ object ProfileMain extends Logging {
return (0, filteredLogs.size)
}

// Check only one eventlog is provided when driver log is passed for non-databricks eventlog
// For databricks eventlog, eventlogs are stored in a directory with rolled multiple
// eventlog files
if(driverLog.nonEmpty && filteredLogs.size > 1 &&
!filteredLogs.forall(_.isInstanceOf[DatabricksEventLog])) {
logWarning("Only a single eventlog should be provided for processing " +
"when a driver log is passed, exiting!")
return (0, filteredLogs.size)
}
// Check that only one eventlog is provided when driver log is passed
if (driverLog.nonEmpty && filteredLogs.size > 1) {
logWarning("Only a single eventlog should be provided for processing " +
"when a driver log is passed, exiting!")
return (0, filteredLogs.size)
}

val profiler = new Profiler(hadoopConf, appArgs, enablePB)
profiler.profile(eventLogFsFiltered)
Expand Down

0 comments on commit edef8a9

Please sign in to comment.