YutingWang98 commented on code in PR #2826:
URL: https://github.com/apache/celeborn/pull/2826#discussion_r1807175379
##########
master/src/main/java/org/apache/celeborn/service/deploy/master/MasterSecretRegistryImpl.java:
##########
@@ -44,7 +44,32 @@ public void register(String appId, String secret) {
}
}
- void setMetadataHandler(IMetadataHandler metadataHandler) {
+ @Override
+ public String getSecretKey(String appId) {
+ String secret = super.getSecretKey(appId);
+ if (secret == null && metadataHandler != null) {
+ LOG.info("Fetching secret from AbstractMetaManager for appId: {}",
appId);
Review Comment:
thanks! changed to metadata manager
##########
master/src/main/java/org/apache/celeborn/service/deploy/master/MasterSecretRegistryImpl.java:
##########
@@ -44,7 +44,32 @@ public void register(String appId, String secret) {
}
}
- void setMetadataHandler(IMetadataHandler metadataHandler) {
+ @Override
+ public String getSecretKey(String appId) {
+ String secret = super.getSecretKey(appId);
+ if (secret == null && metadataHandler != null) {
+ LOG.info("Fetching secret from AbstractMetaManager for appId: {}",
appId);
+ ApplicationMeta applicationMeta =
metadataHandler.applicationMetas.get(appId);
+ if (applicationMeta != null) {
+ secret = applicationMeta.secret();
+ } else {
+ LOG.warn("Secret not found from AbstractMetaManager for appId: {}",
appId);
+ }
+ }
+ return secret;
+ }
+
+ @Override
+ public boolean isRegistered(String appId) {
+ boolean isRegistered = super.isRegistered(appId);
+ if (!isRegistered && metadataHandler != null) {
+ LOG.info("Fetching registration status from AbstractMetaManager for
appId: {}", appId);
Review Comment:
updated
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]