ServerLockCleaner { public void eraseLockAndData(ColumnCoordinate column, long timestamp) throws IOException { eraseLockAndData(column.getTableName(), column.getRow(), Lists.<Column>newArrayList(column), timestamp); } ServerLockCleaner(HConnection conn, ThemisCoprocessorClient cpClient); static PrimaryLock getPrimaryLockWithColumn(ThemisLock lock); void cleanLock(ThemisLock lock); Pair<Long, PrimaryLock> cleanPrimaryLock(ColumnCoordinate columnCoordinate,
      long prewriteTs); Long getTimestampOfWriteIndexingPrewriteTs(ColumnCoordinate columnCoordinate, long timestamp); Get createGetOfWriteColumnsIndexingPrewriteTs(ColumnCoordinate columnCoordinate, long timestamp); void cleanSecondaryLocks(PrimaryLock primaryLock, Long commitTs); void eraseLockAndData(ColumnCoordinate column, long timestamp); void eraseLockAndData(byte[] tableName, byte[] row, Collection<Column> columns, long timestamp);  }
@Test public void testEraseAndDataLock() throws IOException { writeLockAndData(COLUMN); lockCleaner.eraseLockAndData(COLUMN, prewriteTs); Assert.assertNull(readDataValue(COLUMN, prewriteTs)); Assert.assertNull(readLockBytes(COLUMN)); for (ColumnCoordinate columnCoordinate : new ColumnCoordinate[]{COLUMN, COLUMN_WITH_ANOTHER_FAMILY, COLUMN_WITH_ANOTHER_QUALIFIER}) { writeLockAndData(columnCoordinate); } lockCleaner.eraseLockAndData(TABLENAME, PRIMARY_ROW.getRow(), PRIMARY_ROW.getColumns(), prewriteTs); for (ColumnCoordinate columnCoordinate : new ColumnCoordinate[]{COLUMN, COLUMN_WITH_ANOTHER_FAMILY, COLUMN_WITH_ANOTHER_QUALIFIER}) { Assert.assertNull(readLockBytes(columnCoordinate)); } }