private KuduLookupKey generateLookupKey ( final Record record , final String tableName ) throws OnRecordErrorException { Map < String , Field > keyList = new HashMap <> ( ) ; for ( Map . Entry < String , String > key : columnToField . entrySet ( ) ) { String fieldName = key . getValue ( ) ; if ( ! record . has ( fieldName ) ) { throw new OnRecordErrorException ( record , Errors . KUDU_32 , fieldName ) ; } keyList . put ( key . getKey ( ) , record . get ( fieldName ) ) ; } return new KuduLookupKey ( tableName , keyList ) ; }
Create a map of keyColumn - value to lookup in cache .