@ Override public Put createPut ( Record record , String tableName , String famName , String quaName ) throws IOException { HTable hTable = getTable ( tableName ) ; Put put = null ; if ( hTable != null ) { // Transforming data model record into an Avro record AvroSerializer serializer = getSerializer ( ) ; final byte [ ] bytes = serializer . toBytes ( record ) ; // Resource's Key put = new Put ( Bytes . toBytes ( record . getID ( ) . toString ( ) ) ) ; // Resource's Value put . add ( Bytes . toBytes ( famName ) , Bytes . toBytes ( quaName ) , bytes ) ; } return put ; }
Creates puts for HBase