public static String description ( int [ ] hashes , int m_hashMismatchPos ) { assert ( hashes != null ) ; assert ( hashes . length >= 3 ) ; StringBuilder sb = new StringBuilder ( ) ; sb . append ( "Full Hash " ) . append ( hashes [ 0 ] ) ; sb . append ( ", Catalog Version " ) . append ( hashes [ 1 ] ) ; sb . append ( ", Statement Count " ) . append ( hashes [ 2 ] / 2 ) ; int includedHashes = Math . min ( hashes [ 2 ] , MAX_HASHES_COUNT ) ; int pos = 0 ; for ( int i = HEADER_OFFSET ; i < HEADER_OFFSET + includedHashes ; i += 2 ) { sb . append ( "\n Ran Statement " ) . append ( hashes [ i ] ) ; sb . append ( " with Parameters " ) . append ( hashes [ i + 1 ] ) ; if ( pos == m_hashMismatchPos ) { sb . append ( " <--- ALERT: Hash mismatch starts from here!" ) ; } pos ++ ; } if ( hashes [ 2 ] > MAX_HASHES_COUNT ) { sb . append ( "\n Additional SQL statements truncated." ) ; if ( m_hashMismatchPos == DeterminismHash . HASH_NOT_INCLUDE ) { sb . append ( "\n The mismatched hash is also truncated. " + "For debugging purpose, use VOLTDB_OPTS=\"-DMAX_STATEMENTS_WITH_DETAIL=<hashcount>\" to set to a higher value, " + "it could impact performance." ) ; } } return sb . toString ( ) ; }
Log the contents of the hash array