public static ServerName parseServerNameFromWALName(String name) {
    String decoded;
    try {
      decoded = URLDecoder.decode(name, StandardCharsets.UTF_8.name());
    } catch (UnsupportedEncodingException e) {
      throw new AssertionError("should never happen", e);
    }
    Matcher matcher = SERVER_NAME_PATTERN.matcher(decoded);
    if (matcher.find()) {
      return ServerName.valueOf(matcher.group());
    } else {
      throw new IllegalArgumentException(name + " is not started with a server name");
    }
  }
Parse the server name from wal prefix. A wal's name is always started with a server name in non
test code.
@throws IllegalArgumentException if the name passed in is not started with a server name
@return the server name
hbase-server/src/main/java/org/apache/hadoop/hbase/wal/AbstractFSWALProvider.java