public void deleteSecondaryIndexKey(String resource, String secondaryIndex, Object secondaryIndexKey, Object resourceId) throws HiveLockableException {
SecondaryIndex index = getSecondaryIndex(resource, secondaryIndex);
Preconditions.isWritable(directory.getKeySemaphoresOfResourceId(getResource(resource), resourceId), semaphore);
if (!directory.doesSecondaryIndexKeyExist(index, secondaryIndexKey, resourceId))
throw new HiveKeyNotFoundException(
String.format(
"Secondary index key %s of secondary index %s does not exist",
secondaryIndexKey, index.getName()), secondaryIndexKey);
directory.deleteSecondaryIndexKey(index, secondaryIndexKey, resourceId);