зеркало из https://github.com/microsoft/spark.git
Fix a bug in JAR fetcher that made it always fetch the JAR
This commit is contained in:
Родитель
009b0e37e7
Коммит
4a138403ef
|
@ -161,7 +161,7 @@ trait KryoRegistrator {
|
|||
}
|
||||
|
||||
class KryoSerializer extends Serializer with Logging {
|
||||
val kryo = createKryo()
|
||||
lazy val kryo = createKryo()
|
||||
|
||||
val bufferSize = System.getProperty("spark.kryoserializer.buffer.mb", "32").toInt * 1024 * 1024
|
||||
|
||||
|
|
|
@ -83,16 +83,12 @@ object SizeEstimator extends Logging {
|
|||
hotSpotMBeanName, classOf[HotSpotDiagnosticMXBean]);
|
||||
return bean.getVMOption("UseCompressedOops").getValue.toBoolean
|
||||
} catch {
|
||||
case e: IllegalArgumentException => {
|
||||
logWarning("Exception while trying to check if compressed oops is enabled", e)
|
||||
// Fall back to checking if maxMemory < 32GB
|
||||
return Runtime.getRuntime.maxMemory < (32L*1024*1024*1024)
|
||||
}
|
||||
|
||||
case e: SecurityException => {
|
||||
logWarning("No permission to create MBeanServer", e)
|
||||
// Fall back to checking if maxMemory < 32GB
|
||||
return Runtime.getRuntime.maxMemory < (32L*1024*1024*1024)
|
||||
case e: Exception => {
|
||||
// Guess whether they've enabled UseCompressedOops based on whether maxMemory < 32 GB
|
||||
val guess = Runtime.getRuntime.maxMemory < (32L*1024*1024*1024)
|
||||
val guessInWords = if (guess) "yes" else "not"
|
||||
logWarning("Failed to check whether UseCompressedOops is set; assuming " + guessInWords)
|
||||
return guess
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,14 +24,14 @@ abstract class Task[T](val stageId: Int) extends Serializable {
|
|||
|
||||
// Fetch missing file dependencies
|
||||
fileSet.filter { case(k,v) =>
|
||||
!currentFileSet.contains(k) || currentFileSet(k) <= v
|
||||
!currentFileSet.contains(k) || currentFileSet(k) < v
|
||||
}.foreach { case (k,v) =>
|
||||
Utils.fetchFile(k, new File(System.getProperty("user.dir")))
|
||||
currentFileSet(k) = v
|
||||
}
|
||||
// Fetch missing jar dependencies
|
||||
jarSet.filter { case(k,v) =>
|
||||
!currentJarSet.contains(k) || currentJarSet(k) <= v
|
||||
!currentJarSet.contains(k) || currentJarSet(k) < v
|
||||
}.foreach { case (k,v) =>
|
||||
Utils.fetchFile(k, new File(System.getProperty("user.dir")))
|
||||
currentJarSet(k) = v
|
||||
|
|
Загрузка…
Ссылка в новой задаче