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 .