private static boolean printResult ( final ArrayList < KeyValue > row , final byte [ ] family , final boolean formard ) { if ( null == row || row . isEmpty ( ) ) { return false ; } final byte [ ] key = row . get ( 0 ) . key ( ) ; String name = formard ? CliUtils . fromBytes ( key ) : null ; String id = formard ? null : Arrays . toString ( key ) ; boolean printed = false ; for ( final KeyValue kv : row ) { if ( ! Bytes . equals ( kv . family ( ) , family ) ) { continue ; } printed = true ; if ( formard ) { id = Arrays . toString ( kv . value ( ) ) ; } else { name = CliUtils . fromBytes ( kv . value ( ) ) ; } System . out . println ( CliUtils . fromBytes ( kv . qualifier ( ) ) + ' ' + name + ": " + id ) ; } return printed ; }
Helper to print the cells in a given family for a given row if any .