for (Entry<byte[], NavigableMap<Long, byte[]>> column : columnsSet.entrySet()) {
try {
byte[] columnQualifier = column.getKey();
SchemaId schemaId =
new SchemaIdImpl(Bytes.tail(columnQualifier, columnQualifier.length - 1));
FieldType fieldType = typeManager.getFieldTypeById(schemaId);
ValueType valueType = fieldType.getValueType();
NavigableMap<Long, byte[]> cells = column.getValue();
Set<Entry<Long, byte[]>> cellsSet = cells.entrySet();
for (Entry<Long, byte[]> cell : cellsSet) {
// Get blobs to delete
if (valueType.getDeepestValueType() instanceof BlobValueType) {
Object blobValue = null;
if (fieldType.getScope() == Scope.NON_VERSIONED) {
// Read the blob value from the original record,
// since the delete marker has already been put in the field by the delete call
if (originalRecord != null) {
blobValue = originalRecord.getField(fieldType.getName());
}
} else {
byte[] value = cell.getValue();
if (!isDeleteMarker(value)) {
blobValue = valueType.read(EncodingUtil.stripPrefix(value));
}
}
try {
if (blobValue != null) {
blobsToDelete
.addAll(getReferencedBlobs((FieldTypeImpl)fieldType, blobValue));
}
} catch (BlobException e) {
log.warn("Failure occurred while clearing blob data", e);
// We do a best effort here
}
}
// Get cells to delete
// Only delete if in NON_VERSIONED scope
// The NON_VERSIONED fields will get filled in with a delete marker
// This is needed to avoid non-versioned fields to be lost due to the hbase delete thombstone
// See trac ticket http://dev.outerthought.org/trac/outerthought_lilyproject/ticket/297
if (fieldType.getScope() != Scope.NON_VERSIONED) {
delete.deleteColumn(RecordCf.DATA.bytes, columnQualifier, cell.getKey());
}
dataToDelete = true;
}
} catch (FieldTypeNotFoundException e) {