public static void validateDeletion(CFMetaData metadata, Deletion del) throws org.apache.cassandra.exceptions.InvalidRequestException { if (del.super_column != null) validateColumnNames(metadata, (ByteBuffer)null, Arrays.asList(del.super_column)); if (del.predicate != null) validateSlicePredicate(metadata, del.super_column, del.predicate); if (metadata.cfType == ColumnFamilyType.Standard && del.super_column != null) { String msg = String.format("Deletion of super columns is not possible on a standard ColumnFamily (KeySpace=%s ColumnFamily=%s Deletion=%s)", metadata.ksName, metadata.cfName, del); throw new org.apache.cassandra.exceptions.InvalidRequestException(msg); } if (metadata.isCounter()) { // forcing server timestamp even if a timestamp was set for coherence with other counter operation del.timestamp = System.currentTimeMillis(); } else if (!del.isSetTimestamp()) { throw new org.apache.cassandra.exceptions.InvalidRequestException("Deletion timestamp is not optional for non commutative column family " + metadata.cfName); } }
public static void validateDeletion(CFMetaData metadata, Deletion del) throws org.apache.cassandra.exceptions.InvalidRequestException { if (del.super_column != null) validateColumnNames(metadata, (ByteBuffer)null, Arrays.asList(del.super_column)); if (del.predicate != null) validateSlicePredicate(metadata, del.super_column, del.predicate); if (!metadata.isSuper() && del.super_column != null) { String msg = String.format("Deletion of super columns is not possible on a standard table (KeySpace=%s Table=%s Deletion=%s)", metadata.ksName, metadata.cfName, del); throw new org.apache.cassandra.exceptions.InvalidRequestException(msg); } if (metadata.isCounter()) { // forcing server timestamp even if a timestamp was set for coherence with other counter operation del.timestamp = FBUtilities.timestampMicros(); } else if (!del.isSetTimestamp()) { throw new org.apache.cassandra.exceptions.InvalidRequestException("Deletion timestamp is not optional for non commutative table " + metadata.cfName); } }
public static void validateDeletion(CFMetaData metadata, Deletion del) throws org.apache.cassandra.exceptions.InvalidRequestException { if (del.super_column != null) validateColumnNames(metadata, (ByteBuffer)null, Arrays.asList(del.super_column)); if (del.predicate != null) validateSlicePredicate(metadata, del.super_column, del.predicate); if (!metadata.isSuper() && del.super_column != null) { String msg = String.format("Deletion of super columns is not possible on a standard table (KeySpace=%s Table=%s Deletion=%s)", metadata.ksName, metadata.cfName, del); throw new org.apache.cassandra.exceptions.InvalidRequestException(msg); } if (metadata.isCounter()) { // forcing server timestamp even if a timestamp was set for coherence with other counter operation del.timestamp = FBUtilities.timestampMicros(); } else if (!del.isSetTimestamp()) { throw new org.apache.cassandra.exceptions.InvalidRequestException("Deletion timestamp is not optional for non commutative table " + metadata.cfName); } }