public static RowColumn toRowColumn ( Key key ) { if ( key == null ) { return RowColumn . EMPTY ; } if ( ( key . getRow ( ) == null ) || key . getRow ( ) . getLength ( ) == 0 ) { return RowColumn . EMPTY ; } Bytes row = ByteUtil . toBytes ( key . getRow ( ) ) ; if ( ( key . getColumnFamily ( ) == null ) || key . getColumnFamily ( ) . getLength ( ) == 0 ) { return new RowColumn ( row ) ; } Bytes cf = ByteUtil . toBytes ( key . getColumnFamily ( ) ) ; if ( ( key . getColumnQualifier ( ) == null ) || key . getColumnQualifier ( ) . getLength ( ) == 0 ) { return new RowColumn ( row , new Column ( cf ) ) ; } Bytes cq = ByteUtil . toBytes ( key . getColumnQualifier ( ) ) ; if ( ( key . getColumnVisibility ( ) == null ) || key . getColumnVisibility ( ) . getLength ( ) == 0 ) { return new RowColumn ( row , new Column ( cf , cq ) ) ; } Bytes cv = ByteUtil . toBytes ( key . getColumnVisibility ( ) ) ; return new RowColumn ( row , new Column ( cf , cq , cv ) ) ; }
Converts from an Accumulo Key to a Fluo RowColumn