[
https://issues.apache.org/jira/browse/HDDS-1649?focusedWorklogId=279167&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-279167
]
ASF GitHub Bot logged work on HDDS-1649:
----------------------------------------
Author: ASF GitHub Bot
Created on: 18/Jul/19 17:15
Start Date: 18/Jul/19 17:15
Worklog Time Spent: 10m
Work Description: bharatviswa504 commented on pull request #948:
HDDS-1649. On installSnapshot notification from OM leader, download checkpoint
and reload OM state
URL: https://github.com/apache/hadoop/pull/948#discussion_r304689358
##########
File path:
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOMRatisSnapshots.java
##########
@@ -0,0 +1,193 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
under
+ * the License.
+ */
+package org.apache.hadoop.ozone.om;
+
+import org.apache.commons.lang3.RandomStringUtils;
+import org.apache.hadoop.hdds.conf.OzoneConfiguration;
+import org.apache.hadoop.ozone.MiniOzoneCluster;
+import org.apache.hadoop.ozone.MiniOzoneHAClusterImpl;
+import org.apache.hadoop.ozone.client.ObjectStore;
+import org.apache.hadoop.ozone.client.OzoneBucket;
+import org.apache.hadoop.ozone.client.OzoneClientFactory;
+import org.apache.hadoop.ozone.client.OzoneVolume;
+import org.apache.hadoop.ozone.client.VolumeArgs;
+import org.apache.hadoop.ozone.om.helpers.OmVolumeArgs;
+import org.apache.hadoop.ozone.om.ratis.OzoneManagerRatisServer;
+import org.apache.hadoop.utils.db.DBCheckpoint;
+import org.apache.hadoop.utils.db.Table;
+import org.apache.hadoop.utils.db.TableIterator;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.junit.rules.Timeout;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
+import static org.apache.hadoop.ozone.om.TestOzoneManagerHA.createKey;
+
+/**
+ * Tests the Ratis snaphsots feature in OM.
+ */
+public class TestOMRatisSnapshots {
+
+ private MiniOzoneHAClusterImpl cluster = null;
+ private ObjectStore objectStore;
+ private OzoneConfiguration conf;
+ private String clusterId;
+ private String scmId;
+ private int numOfOMs = 3;
+ private static final long SNAPSHOT_THRESHOLD = 50;
+ private static final int LOG_PURGE_GAP = 50;
+
+ @Rule
+ public ExpectedException exception = ExpectedException.none();
+
+ @Rule
+ public Timeout timeout = new Timeout(3000_000);
+
+ /**
+ * Create a MiniDFSCluster for testing. The cluster initially has one
Review comment:
Minor: MiniOzoneCluster
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 279167)
Time Spent: 4h 40m (was: 4.5h)
> On installSnapshot notification from OM leader, download checkpoint and
> reload OM state
> ---------------------------------------------------------------------------------------
>
> Key: HDDS-1649
> URL: https://issues.apache.org/jira/browse/HDDS-1649
> Project: Hadoop Distributed Data Store
> Issue Type: Sub-task
> Reporter: Hanisha Koneru
> Assignee: Hanisha Koneru
> Priority: Major
> Labels: pull-request-available
> Time Spent: 4h 40m
> Remaining Estimate: 0h
>
> Installing a DB checkpoint on the OM involves following steps:
> 1. When an OM follower receives installSnapshot notification from OM leader,
> it should initiate a new checkpoint on the OM leader and download that
> checkpoint through Http.
> 2. After downloading the checkpoint, the StateMachine must be paused so that
> the old OM DB can be replaced with the new downloaded checkpoint.
> 3. The OM should be reloaded with the new state . All the services having a
> dependency on the OM DB (such as MetadataManager, KeyManager etc.) must be
> re-initialized/ restarted.
> 4. Once the OM is ready with the new state, the state machine must be
> unpaused to resume participating in the Ratis ring.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]