ChenSammi commented on code in PR #4294:
URL: https://github.com/apache/ozone/pull/4294#discussion_r1174757356
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis_snapshot/OmRatisSnapshotProvider.java:
##########
@@ -71,23 +68,20 @@
* bootstrap. The follower needs these copies to respond the users
* snapshot requests when it becomes the leader.
*/
-public class OmRatisSnapshotProvider {
+public class OmRatisSnapshotProvider extends RDBSnapshotProvider {
private static final Logger LOG =
LoggerFactory.getLogger(OmRatisSnapshotProvider.class);
- private final File omSnapshotDir;
- private Map<String, OMNodeDetails> peerNodesMap;
+ private final Map<String, OMNodeDetails> peerNodesMap;
private final HttpConfig.Policy httpPolicy;
private final boolean spnegoEnabled;
private final URLConnectionFactory connectionFactory;
public OmRatisSnapshotProvider(MutableConfigurationSource conf,
File omRatisSnapshotDir, Map<String, OMNodeDetails> peerNodeDetails) {
-
+ super(omRatisSnapshotDir, OM_DB_NAME);
LOG.info("Initializing OM Snapshot Provider");
- this.omSnapshotDir = omRatisSnapshotDir;
-
this.peerNodesMap = new HashMap<>();
Review Comment:
Can you change this peerNodesMap to ConcurrentHashMap?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]