public boolean delete ( DeleteAction deleteAction ) { HTableInterface table = pool . getTable ( tableName ) ; try { for ( DeleteActionModifier deleteActionModifier : deleteActionModifiers ) { deleteAction = deleteActionModifier . modifyDeleteAction ( deleteAction ) ; } Delete delete = deleteAction . getDelete ( ) ; if ( deleteAction . getVersionCheckAction ( ) != null ) { byte [ ] versionBytes = Bytes . toBytes ( deleteAction . getVersionCheckAction ( ) . getVersion ( ) ) ; try { return table . checkAndDelete ( delete . getRow ( ) , Constants . SYS_COL_FAMILY , Constants . VERSION_CHECK_COL_QUALIFIER , versionBytes , delete ) ; } catch ( IOException e ) { throw new DatasetIOException ( "Error deleteing row from table with checkAndDelete" , e ) ; } } else { try { table . delete ( delete ) ; return true ; } catch ( IOException e ) { throw new DatasetIOException ( "Error deleteing row from table" , e ) ; } } } finally { if ( table != null ) { try { table . close ( ) ; } catch ( IOException e ) { throw new DatasetIOException ( "Error putting table back into pool" , e ) ; } } } }
Execute a Delete on HBase .