hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Work logged] (HDDS-1339) Implement Ratis Snapshots on OM
Date Thu, 28 Mar 2019 23:32:00 GMT

     [ https://issues.apache.org/jira/browse/HDDS-1339?focusedWorklogId=220317&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-220317
]

ASF GitHub Bot logged work on HDDS-1339:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 28/Mar/19 23:31
            Start Date: 28/Mar/19 23:31
    Worklog Time Spent: 10m 
      Work Description: hanishakoneru commented on pull request #651: HDDS-1339. Implement
ratis snapshots on OM
URL: https://github.com/apache/hadoop/pull/651#discussion_r270236979
 
 

 ##########
 File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerStateMachine.java
 ##########
 @@ -308,56 +357,35 @@ private IOException constructExceptionForFailedRequest(
         STATUS_CODE + omResponse.getStatus());
   }
 
-  /*
-   * Apply a committed log entry to the state machine.
-   */
-  @Override
-  public CompletableFuture<Message> applyTransaction(TransactionContext trx) {
-    try {
-      OMRequest request = OMRatisHelper.convertByteStringToOMRequest(
-          trx.getStateMachineLogEntry().getLogData());
-      CompletableFuture<Message> future = CompletableFuture
-          .supplyAsync(() -> runCommand(request));
-      return future;
-    } catch (IOException e) {
-      return completeExceptionally(e);
-    }
-  }
-
   /**
-   * Query the state machine. The request must be read-only.
+   * Submits write request to OM and returns the response Message.
+   * @param request OMRequest
+   * @return response from OM
+   * @throws ServiceException
    */
-  @Override
-  public CompletableFuture<Message> query(Message request) {
-    try {
-      OMRequest omRequest = OMRatisHelper.convertByteStringToOMRequest(
-          request.getContent());
-      return CompletableFuture.completedFuture(runCommand(omRequest));
-    } catch (IOException e) {
-      return completeExceptionally(e);
+  private Message runCommand(OMRequest request, long trxLogIndex) {
+    OMResponse response = handler.handle(request);
+    if (response.getSuccess()) {
 
 Review comment:
   done. 
 
----------------------------------------------------------------
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:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 220317)
    Time Spent: 1h 40m  (was: 1.5h)

> Implement Ratis Snapshots on OM
> -------------------------------
>
>                 Key: HDDS-1339
>                 URL: https://issues.apache.org/jira/browse/HDDS-1339
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>            Reporter: Hanisha Koneru
>            Assignee: Hanisha Koneru
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> For bootstrapping and restarting OMs, we need to implement snapshots in OM. The OM state
maintained by RocksDB will be checkpoint-ed on demand. Ratis snapshots will only preserve
the last applied log index by the State Machine on disk. This index will be stored in file
in the OM metadata dir.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message