mridulm commented on code in PR #2826:
URL: https://github.com/apache/celeborn/pull/2826#discussion_r1811231080
##########
master/src/main/java/org/apache/celeborn/service/deploy/master/MasterSecretRegistryImpl.java:
##########
@@ -22,29 +22,48 @@
import org.apache.celeborn.common.meta.ApplicationMeta;
import org.apache.celeborn.common.network.sasl.SecretRegistry;
-import org.apache.celeborn.common.network.sasl.SecretRegistryImpl;
-import org.apache.celeborn.service.deploy.master.clustermeta.IMetadataHandler;
+import
org.apache.celeborn.service.deploy.master.clustermeta.AbstractMetaManager;
/**
- * A simple implementation of {@link SecretRegistry} that stores secrets in
memory and Ratis. This
- * persists an application secret in Ratis but the deletion of that secret
happens when
- * ApplicationLost is triggered.
+ * A simple implementation of {@link SecretRegistry} that stores secrets in
Ratis. This persists an
+ * application secret in Ratis but the deletion of that secret happens when
ApplicationLost is
+ * triggered.
*/
-public class MasterSecretRegistryImpl extends SecretRegistryImpl {
+public class MasterSecretRegistryImpl implements SecretRegistry {
private static final Logger LOG =
LoggerFactory.getLogger(MasterSecretRegistryImpl.class);
- private IMetadataHandler metadataHandler;
+ private AbstractMetaManager statusSystem;
@Override
public void register(String appId, String secret) {
- super.register(appId, secret);
- if (metadataHandler != null) {
- LOG.info("Persisting metadata for appId: {}", appId);
- metadataHandler.handleApplicationMeta(new ApplicationMeta(appId,
secret));
+ LOG.info("Persisting metadata for appId: {}", appId);
+ statusSystem.handleApplicationMeta(new ApplicationMeta(appId, secret));
+ }
+
+ @Override
+ public void unregister(String appId) {
+ LOG.info("Removing metadata for appId: {}", appId);
+ statusSystem.removeApplicationMeta(appId);
+ }
+
+ @Override
+ public String getSecretKey(String appId) {
+ String secret = null;
+ LOG.info("Fetching secret from metadata manager for appId: {}", appId);
Review Comment:
Let us make this `debug` - else it can get very noisy (will be emitted for
any new connection to master)
```suggestion
LOG.debug("Fetching secret from metadata manager for appId: {}", appId);
```
--
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]