public abstract class Validation
extends java.lang.Object
Constructor and Description |
---|
Validation() |
Modifier and Type | Method and Description |
---|---|
static CFMetaData |
validateColumnFamily(java.lang.String keyspaceName,
java.lang.String tableName)
Retrieves the metadata for the provided keyspace and table name, throwing
a meaningful user exception if those doen't exist.
|
static void |
validateKey(CFMetaData metadata,
java.nio.ByteBuffer key)
Validates a (full serialized) partition key.
|
static void |
validateKeyspaceNotSystem(java.lang.String keyspace)
Validates that the provided keyspace is not one of the system keyspace.
|
public static CFMetaData validateColumnFamily(java.lang.String keyspaceName, java.lang.String tableName) throws InvalidRequestException
keyspaceName
- the keyspace name.tableName
- the table name.keyspaceName.tableName
if it
exists (otherwise an InvalidRequestException
is thrown).InvalidRequestException
- if the table requested doesn't exist.public static void validateKey(CFMetaData metadata, java.nio.ByteBuffer key) throws InvalidRequestException
metadata
- the metadata for the table of which to check the key.key
- the serialized partition key to check.InvalidRequestException
- if the provided key
is invalid.public static void validateKeyspaceNotSystem(java.lang.String keyspace) throws InvalidRequestException
keyspace
- the keyspace name to validate.InvalidRequestException
- if keyspace
is the name of a
system keyspace.Copyright © 2018 The Apache Software Foundation