private void processSnapshotResponse ( ClientResponse response ) { setState ( State . WAITING ) ; final long now = System . currentTimeMillis ( ) ; m_nextSnapshotTime += m_frequencyInMillis ; if ( m_nextSnapshotTime < now ) { m_nextSnapshotTime = now - 1 ; } if ( response . getStatus ( ) != ClientResponse . SUCCESS ) { logFailureResponse ( "Snapshot failed" , response ) ; return ; } final VoltTable results [ ] = response . getResults ( ) ; final VoltTable result = results [ 0 ] ; final String err = SnapshotUtil . didSnapshotRequestFailWithErr ( results ) ; if ( err != null ) { SNAP_LOG . warn ( "Snapshot failed with failure response: " + err ) ; m_snapshots . removeLast ( ) ; return ; } //assert(result.getColumnName(1).equals("TABLE")); boolean success = true ; while ( result . advanceRow ( ) ) { if ( ! result . getString ( "RESULT" ) . equals ( "SUCCESS" ) ) { success = false ; SNAP_LOG . warn ( "Snapshot save feasibility test failed for host " + result . getLong ( "HOST_ID" ) + " table " + result . getString ( "TABLE" ) + " with error message " + result . getString ( "ERR_MSG" ) ) ; } } if ( ! success ) { m_snapshots . removeLast ( ) ; } }
Confirm and log that the snapshot was a success