Github user lovexi commented on a diff in the pull request: https://github.com/apache/spark/pull/14080#discussion_r70112425 --- Diff: common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/ExternalShuffleBlockHandler.java --- @@ -93,18 +113,34 @@ protected void handleMessage( client.getClientId(), NettyUtils.getRemoteAddress(client.getChannel())); callback.onSuccess(new StreamHandle(streamId, msg.blockIds.length).toByteBuffer()); + transferBlockRate.mark(totalBlockSize / 1024 / 1024); + responseDelayContext.stop(); } else if (msgObj instanceof RegisterExecutor) { + final Timer.Context responseDelayContext = timeDelayForRegisterExecutorRequest.time(); RegisterExecutor msg = (RegisterExecutor) msgObj; checkAuth(client, msg.appId); blockManager.registerExecutor(msg.appId, msg.execId, msg.executorInfo); callback.onSuccess(ByteBuffer.wrap(new byte[0])); + responseDelayContext.stop(); } else { throw new UnsupportedOperationException("Unexpected message: " + msgObj); } } + public MetricSet getAllMetrics() { + return metrics; + } + + public long getRegisteredExecutorsSize() { + return blockManager.getRegisteredExecutorsSize(); + } + + public long getTotalShuffleRequests() { + return timeDelayForOpenBlockRequest.getCount() + timeDelayForOpenBlockRequest.getCount(); --- End diff -- Oh, if this metric can be exported to UI or other data collector, this metric can provide much more clear and direct vision about total shuffle request number in real-time fashion. What do you think about it?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org