static boolean hasExpectedMessage(Throwable cause, String expectedMessage) {
    return Optional.ofNullable(cause.getMessage())
        .map(m -> m.contains(expectedMessage))
        .orElse(false);
  }
Determine whether the target node has gone offline once based on the cause.

@param cause Throwable
@return true/false
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/ThriftClient.java