public static HashinatorSnapshotData retrieveHashinatorConfig ( String path , String nonce , int hostId , VoltLogger logger ) throws IOException { HashinatorSnapshotData hashData = null ; String expectedFileName = constructHashinatorConfigFilenameForNonce ( nonce , hostId ) ; File [ ] files = new VoltFile ( path ) . listFiles ( ) ; if ( files != null ) { for ( File file : files ) { if ( file . getName ( ) . equals ( expectedFileName ) ) { hashData = new HashinatorSnapshotData ( ) ; hashData . restoreFromFile ( file ) ; break ; } } } if ( hashData == null ) { throw new IOException ( "Missing hashinator data in snapshot" ) ; } return hashData ; }
Retrieve hashinator config for restore .