public boolean verifyEditLogLedgerMetadata(EditLogLedgerMetadata metadata,
      String fullPathToVerify) {
    Preconditions.checkNotNull(metadata);
    try {
      EditLogLedgerMetadata otherMetadata =
          readEditLogLedgerMetadata(fullPathToVerify);
      if (otherMetadata == null) {
        LOG.warn("No metadata found " + fullPathToVerify + "!");
      }
      if (LOG.isTraceEnabled()) {
        LOG.trace("Verifying " + otherMetadata + " read from " +
            fullPathToVerify + " against " + metadata);
      }
      return metadata.equals(otherMetadata);
    } catch (IOException e) {
      LOG.error("Unrecoverable error when verifying " + fullPathToVerify, e);
    }
    return false;
  }
public boolean verifyEditLogLedgerMetadata ( EditLogLedgerMetadata metadata , String fullPathToVerify ) { Preconditions . checkNotNull ( metadata ) ; try { EditLogLedgerMetadata otherMetadata = readEditLogLedgerMetadata ( fullPathToVerify ) ; if ( otherMetadata == null ) { LOG . warn ( "No metadata found " + fullPathToVerify + "!" ) ; } if ( LOG . isTraceEnabled ( ) ) { LOG . trace ( "Verifying " + otherMetadata + " read from " + fullPathToVerify + " against " + metadata ) ; } return metadata . equals ( otherMetadata ) ; } catch ( IOException e ) { LOG . error ( "Unrecoverable error when verifying " + fullPathToVerify , e ) ; } return false ; }
Verify that the specified EditLogLedgerMetadata instance is the same
as the EditLogLedgerMetadata object stored in the specified ZNode path.
@param metadata The instance to compare against
@param fullPathToVerify The path to verify
@return True if we are able to successfully verify the metadata