forked from taboola/cassandra-unit
-
Notifications
You must be signed in to change notification settings - Fork 1
What can you set into a dataSet
jsevellec edited this page Jun 13, 2012
·
11 revisions
you can see skeleton of dataset here :
A lot of elements are optionals and work with default value. Here is a description of theses elements : ##1. keyspace level :
- name : the name of the keyspace to create
- strategy (optional) : the strategy of the keyspace to choose between
- "org.apache.cassandra.locator.LocalStrategy" (as default)
- "org.apache.cassandra.locator.NetworkTopologyStrategy"
- "org.apache.cassandra.locator.SimpleStrategy"
- replicationFactor (optional) : the replication factor of the data in the keyspace. "1" as default.
- columnFamily : a list of column family.
##2. columnFamily level :
- name : the name of the Column Family
- type (optional) : the type of the Column Family to choose between :
- "STANDARD" (as default)
- "SUPER"
- keyType (optional) : The Data Type of the key to choose between :
- "BytesType" (as default)
- "IntegerType"
- "LexicalUUIDType"
- "LongType"
- "TimeUUIDType"
- "UTF8Type"
- "UUIDType"
- comparatorType (optional) : The Data Type of the Column name to choose between :
- "BytesType" (as default)
- "IntegerType"
- "LexicalUUIDType"
- "LongType"
- "TimeUUIDType"
- "UTF8Type"
- "UUIDType"
- subComparatorType (optional) : Not taken into account if your Column Family type is "STANDARD". The Data Type of the Sub Column name to choose between :
- "BytesType" (as default)
- "IntegerType"
- "LexicalUUIDType"
- "LongType"
- "TimeUUIDType"
- "UTF8Type"
- "UUIDType"
- defaultColumnValueType (optional) : The Data Type of all Column value to choose between :
- "BytesType" (as default)
- "IntegerType"
- "LexicalUUIDType"
- "LongType"
- "TimeUUIDType"
- "UTF8Type"
- "UUIDType"
- "CounterColumnType" (to define the column family as a counter column family) Since the version 0.8.0.4
(If you want to set different yype into column value, ou can use "Function for value" which is explained below.)
- columnMetadata (optional) : a list of column metadata Since the version 1.0.1.2
- row (optional) : a list of row
##3. colummMetadata level
- name : the name of the column
-
validationClass : the validationClass of the column value to choose between :
- "BytesType" (as default)
- "IntegerType"
- "LexicalUUIDType"
- "LongType"
- "TimeUUIDType"
- "UTF8Type"
- "UUIDType"
- indexType (optional) : define if the column is indexed. Possible value are :
- "KEYS"
##4. row level
- key : the key value of the row
- column (optional) : a list of column
- superColumn (optional) : a list of superColumn. Not taken into account if your Column Family type is "STANDARD".
##5. superColumn level
- name : the name of the super column
- column (optional) : a list of column
##6. column level
- name : the name of the column
- value (optional): the value of the column.
If the "defaultColumnValueType" element is set at the column Family level, the value has to be a valid regarding to the type. If not set, the value has to be a valid hexByte because the default type is "BytesType".
If you want to set colum values with different types into the same column family, you have to read : How to set column values with different types