mirror of https://github.com/apache/kafka.git
				
				
				
			MINOR: a small refactor for LogManage#shutdown (#9680)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
This commit is contained in:
		
							parent
							
								
									4cc6d204ec
								
							
						
					
					
						commit
						df0c52e7fd
					
				|  | @ -479,14 +479,14 @@ class LogManager(logDirs: Seq[File], | |||
| 
 | ||||
|     try { | ||||
|       for ((dir, dirJobs) <- jobs) { | ||||
|         val hasErrors = dirJobs.map { future => | ||||
|         val hasErrors = dirJobs.exists  { future => | ||||
|           Try(future.get) match { | ||||
|             case Success(_) => false | ||||
|             case Failure(e) => | ||||
|               warn(s"There was an error in one of the threads during LogManager shutdown: ${e.getCause}") | ||||
|               true | ||||
|           } | ||||
|         }.contains(true) | ||||
|         } | ||||
| 
 | ||||
|         if (!hasErrors) { | ||||
|           val logs = logsInDir(localLogsByDir, dir) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue