我有一个阶段完成一项任务。 我试图了解为什么taskMetrics。 taskTime (7051/10 ^ 3 = 7.0秒)比taskMetrics。 executorCpuTime (1058675760/10 ^ 9 = 1.05秒)。 还有其他时间字段,例如executorDeserializeTime,executorDeserializeCpuTime,jvmGcTime,resultSerializationTime,fetchWaitTime和writeTime,但它们不累加taskTime。 多余的时间从哪里来?
在所有这些字段中都有记录的地方吗?
"status" : "COMPLETE",
"stageId" : 239,
"attemptId" : 0,
"numTasks" : 1,
"numActiveTasks" : 0,
"numCompleteTasks" : 1,
"numFailedTasks" : 0,
"numKilledTasks" : 0,
"numCompletedIndices" : 1,
"executorRunTime" : 7051,
"executorCpuTime" : 1058675760,
"submissionTime" : "2019-02-17T15:46:36.922GMT",
"firstTaskLaunchedTime" : "2019-02-17T15:46:36.931GMT",
"completionTime" : "2019-02-17T15:46:44.120GMT",
"inputBytes" : 0,
"inputRecords" : 410409,
"outputBytes" : 0,
"outputRecords" : 0,
"shuffleReadBytes" : 0,
"shuffleReadRecords" : 0,
"shuffleWriteBytes" : 3161381,
"shuffleWriteRecords" : 410409,
"memoryBytesSpilled" : 0,
"diskBytesSpilled" : 0,
"name" : "jdbc at <unknown>:0",
"details" : "org.apache.spark.sql.DataFrameWriter.jdbc(DataFrameWriter.scala:501)\nsun.reflect.GeneratedMethodAccessor197.invoke(Unknown Source)\nsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\njava.lang.reflect.Method.invoke(Method.java:498)\npy4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)\npy4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)\npy4j.Gateway.invoke(Gateway.java:282)\npy4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)\npy4j.commands.CallCommand.execute(CallCommand.java:79)\npy4j.GatewayConnection.run(GatewayConnection.java:238)\njava.lang.Thread.run(Thread.java:748)",
"schedulingPool" : "default",
"rddIds" : [ 771, 770, 759 ],
"accumulatorUpdates" : [ ],
"tasks" : {
"665" : {
"taskId" : 665,
"index" : 0,
"attempt" : 0,
"launchTime" : "2019-02-17T15:46:36.931GMT",
"duration" : 7188,
"executorId" : "driver",
"host" : "localhost",
"status" : "SUCCESS",
"taskLocality" : "PROCESS_LOCAL",
"speculative" : false,
"accumulatorUpdates" : [ ],
"taskMetrics" : {
"executorDeserializeTime" : 2,
"executorDeserializeCpuTime" : 1444953,
"executorRunTime" : 7051,
"executorCpuTime" : 1058675760,
"resultSize" : 1396,
"jvmGcTime" : 0,
"resultSerializationTime" : 0,
"memoryBytesSpilled" : 0,
"diskBytesSpilled" : 0,
"peakExecutionMemory" : 0,
"inputMetrics" : {
"bytesRead" : 0,
"recordsRead" : 410409
},
"outputMetrics" : {
"bytesWritten" : 0,
"recordsWritten" : 0
},
"shuffleReadMetrics" : {
"remoteBlocksFetched" : 0,
"localBlocksFetched" : 0,
"fetchWaitTime" : 0,
"remoteBytesRead" : 0,
"remoteBytesReadToDisk" : 0,
"localBytesRead" : 0,
"recordsRead" : 0
},
"shuffleWriteMetrics" : {
"bytesWritten" : 3161381,
"writeTime" : 195639346,
"recordsWritten" : 410409
}
}
}
},
"executorSummary" : {
"driver" : {
"taskTime" : 7188,
"failedTasks" : 0,
"succeededTasks" : 1,
"killedTasks" : 0,
"inputBytes" : 0,
"inputRecords" : 410409,
"outputBytes" : 0,
"outputRecords" : 0,
"shuffleRead" : 0,
"shuffleReadRecords" : 0,
"shuffleWrite" : 3161381,
"shuffleWriteRecords" : 410409,
"memoryBytesSpilled" : 0,
"diskBytesSpilled" : 0
}
},
"killedTasksSummary" : { }
} ]```