Minor change to improve log info in worker

This commit is contained in:
tqin 2016-03-24 16:19:31 +08:00
Родитель ce3e04f986
Коммит e4001e68ce
2 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@ -57,7 +57,7 @@ namespace Microsoft.Spark.CSharp
// can not initialize logger earlier to avoid unwanted stdout ouput
InitializeLogger();
logger.LogInfo("RunDaemonWorker ...");
logger.LogInfo("Run MultiThreadWorker ...");
logger.LogDebug("Port number used to pipe in/out data between JVM and CLR {0}", localPort);
Worker.PrintFiles();

Просмотреть файл

@ -249,7 +249,7 @@ namespace Microsoft.Spark.CSharp
var funcProcessWatch = new Stopwatch();
commandProcessWatch.Start();
ReadDiagnosticsInfo(networkStream);
int stageId = ReadDiagnosticsInfo(networkStream);
string deserializerMode = SerDe.ReadString(networkStream);
logger.LogDebug("Deserializer mode: " + deserializerMode);
@ -322,7 +322,7 @@ namespace Microsoft.Spark.CSharp
// log statistics
inputEnumerator.LogStatistic();
logger.LogInfo(string.Format("func process time: {0}", funcProcessWatch.ElapsedMilliseconds));
logger.LogInfo(string.Format("command process time: {0}", commandProcessWatch.ElapsedMilliseconds));
logger.LogInfo(string.Format("stage {0}, command process time: {1}", stageId, commandProcessWatch.ElapsedMilliseconds));
}
else
{
@ -390,12 +390,13 @@ namespace Microsoft.Spark.CSharp
}
private static void ReadDiagnosticsInfo(NetworkStream networkStream)
private static int ReadDiagnosticsInfo(NetworkStream networkStream)
{
int rddId = SerDe.ReadInt(networkStream);
int stageId = SerDe.ReadInt(networkStream);
int partitionId = SerDe.ReadInt(networkStream);
logger.LogInfo(string.Format("rddInfo: rddId {0}, stageId {1}, partitionId {2}", rddId, stageId, partitionId));
return stageId;
}
private static void WriteDiagnosticsInfo(NetworkStream networkStream, DateTime bootTime, DateTime initTime)