Github user ericl commented on a diff in the pull request: https://github.com/apache/spark/pull/14080#discussion_r69989978 --- 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 -- Btw I don't think you need this metric, the client can easily derive it from the other metrics.
--- 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