[ 
https://issues.apache.org/jira/browse/HBASE-20576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16475268#comment-16475268
 ] 

Zheng Hu commented on HBASE-20576:
----------------------------------

{code}
+      if (!remoteWALDirForPeer.getFileSystem(env.getMasterConfiguration())
+        .exists(remoteWALDirForPeer)) {
+        throw new DoNotRetryIOException(
+          "The remote WAL directory " + remoteWALDirForPeer.toUri().toString() 
+ " does not exist");
+      }
{code}

If pass an invalid path which has no schema  (such as, 
REMOTE_WAL_DIR=>'/hbase/remoteWALs' ),   the remoteWALDirForPeer.getFileSystem 
will use the default Fs in env.getMasterConfiguration(),  which is incorrect 
... Better to check the path  when both peer adding & transiting. 

BTW,  can just use remoteWALDirForPeer , instead of 
remoteWALDirForPeer.toUri().toString() in 
{code}
+        throw new DoNotRetryIOException(
+          "The remote WAL directory " + remoteWALDirForPeer.toUri().toString() 
+ " does not exist");
{code}


Here the SupressWarning annotation could be removed ? 
{code}
+  @SuppressWarnings("unchecked")
+  private void replayRemoteWAL() {
+    addChildProcedure(new RecoverStandbyProcedure(peerId));
+  }
{code}

> Check whether the remote WAL directory is provided when transiting to A
> -----------------------------------------------------------------------
>
>                 Key: HBASE-20576
>                 URL: https://issues.apache.org/jira/browse/HBASE-20576
>             Project: HBase
>          Issue Type: Sub-task
>          Components: Replication
>            Reporter: Duo Zhang
>            Assignee: Duo Zhang
>            Priority: Major
>             Fix For: HBASE-19064
>
>         Attachments: HBASE-20576-HBASE-19064-v1.patch, 
> HBASE-20576-HBASE-19064-v1.patch, HBASE-20576-HBASE-19064-v1.patch, 
> HBASE-20576-HBASE-19064.patch, HBASE-20576-HBASE-19064.patch
>
>
> When testing on the real cluster I typed a wrong remote wal directory. Then I 
> start the procedure for transiting the peer to A, the procedure was stuck 
> there for ever...



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

Reply via email to