private static String [ ] aggregatePerHostResults ( VoltTable vtable ) { String [ ] ret = new String [ 2 ] ; vtable . advanceRow ( ) ; String kitCheckResult = vtable . getString ( "KIT_CHECK_RESULT" ) ; String rootCheckResult = vtable . getString ( "ROOT_CHECK_RESULT" ) ; String xdcrCheckResult = vtable . getString ( "XDCR_CHECK_RESULT" ) ; StringBuilder result = new StringBuilder ( ) ; if ( ! kitCheckResult . equals ( SUCCESS ) ) { result . append ( kitCheckResult ) . append ( "\n" ) ; } if ( ! rootCheckResult . equals ( SUCCESS ) ) { result . append ( rootCheckResult ) . append ( "\n" ) ; } if ( ! xdcrCheckResult . equals ( SUCCESS ) ) { result . append ( xdcrCheckResult ) ; } if ( result . length ( ) == 0 ) { result . append ( SUCCESS ) ; } ret [ 0 ] = result . toString ( ) ; String warnings = vtable . getString ( "WARNINGS" ) ; if ( warnings != null ) { ret [ 1 ] = warnings ; } return ret ; }
Be user - friendly return reasons of all failed checks .