@Override
    public Map<String, String> mapToColumns(Tuple tuple) {
        Fields fields = tuple.getFields();
        Map<String, String> columns = new HashMap<String, String>();
        for (int i = 0; i < fields.size(); i++) {
            String name = fields.get(i);
            Boolean isRowField = Arrays.asList(this.rowKeyFields).contains(name);
            if (!isRowField) {
                Object value = tuple.getValueByField(name);
                columns.put(name, (value != null ? value.toString() : ""));
            }
        }
        return columns;
    }
@ Override public Map < String , String > mapToColumns ( Tuple tuple ) { Fields fields = tuple . getFields ( ) ; Map < String , String > columns = new HashMap < String , String > ( ) ; for ( int i = 0 ; i < fields . size ( ) ; i ++ ) { String name = fields . get ( i ) ; Boolean isRowField = Arrays . asList ( this . rowKeyFields ) . contains ( name ) ; if ( ! isRowField ) { Object value = tuple . getValueByField ( name ) ; columns . put ( name , ( value != null ? value . toString ( ) : "" ) ) ; } } return columns ; }
Write each value in the tuple as a key:value pair
in the Cassandra row, excluding fields that were included in the row.

@param tuple
@return map of columns to values