public Map < String , Long > delete ( Statement stmt , Qualifier ... qualifiers ) { if ( qualifiers == null || qualifiers . length == 0 ) { /* * There are no qualifiers, so delete every record in the set * using Scan UDF delete */ ExecuteTask task = client . execute ( null , stmt , QUERY_MODULE , "delete_record" ) ; task . waitTillComplete ( ) ; return null ; } if ( qualifiers . length == 1 && qualifiers [ 0 ] instanceof KeyQualifier ) { KeyQualifier keyQualifier = ( KeyQualifier ) qualifiers [ 0 ] ; Key key = keyQualifier . makeKey ( stmt . getNamespace ( ) , stmt . getSetName ( ) ) ; this . client . delete ( null , key ) ; Map < String , Long > map = new HashMap < String , Long > ( ) ; map . put ( "read" , 1L ) ; map . put ( "write" , 1L ) ; return map ; } KeyRecordIterator results = select ( stmt , true , null , qualifiers ) ; return delete ( results ) ; }
Deletes the records specified by the Statement and Qualifiers