Tabsets
Tabsets depend on the Asciidoctor Tabs extension. Tabs syncing is controlled by the |
Basic tabset
-
Tab A
-
Tab B
-
Tab C
Contents of Tab A.
Contents of Tab B.
Contents of Tab C.
Second line in Tab C.
Tabset w/ code blocks
-
Command
-
Other Command
curl -s -L -X GET https://$ASTRA_CLUSTER_ID-$ASTRA_REGION.apps.astra.datastax.com/api/rest/v2/schemas/keyspaces/users_keyspace \
-H "X-Cassandra-Token: $ASTRA_DB_APPLICATION_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
Result
{"data":{"name":"users_keyspace"}}
curl -s -L -X GET https://$ASTRA_CLUSTER_ID-$ASTRA_REGION.apps.astra.datastax.com/api/rest/v2/schemas/keyspaces/users_keyspace \
-H "X-Cassandra-Token: $ASTRA_DB_APPLICATION_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
Result
{"data":{"name":"users_keyspace"}}
-
Command
-
Other Command
curl -s -L -X GET https://$ASTRA_CLUSTER_ID-$ASTRA_REGION.apps.astra.datastax.com/api/rest/v2/schemas/keyspaces/users_keyspace \
-H "X-Cassandra-Token: $ASTRA_DB_APPLICATION_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
curl -s -L -X GET https://$ASTRA_CLUSTER_ID-$ASTRA_REGION.apps.astra.datastax.com/api/rest/v2/schemas/keyspaces/users_keyspace \
-H "X-Cassandra-Token: $ASTRA_DB_APPLICATION_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
Complex tabset w/ nested tabsets
-
Tarball
-
Debian
-
CentOS
-
If you haven’t already, start by downloading the Cassandra binary tarball. For example, to download Cassandra 4.1.2:
-
cURL
-
Wget
curl -OL https://archive.apache.org/dist/cassandra/4.1.2/apache-cassandra-4.1.2-bin.tar.gz
wget https://archive.apache.org/dist/cassandra/4.1.2/apache-cassandra-4.1.2-bin.tar.gz
To download a different version of Cassandra, visit the Apache Archives.
-
-
Optional: Verify the integrity of the downloaded tarball using one of the methods here.
-
For example, to verify the SHA256 hash of the downloaded file using GPG:
gpg --print-md SHA256 apache-cassandra-4.1.2-bin.tar.gz
-
Compare the output with the contents of the SHA256 file:
curl -L https://archive.apache.org/dist/cassandra/4.1.2/apache-cassandra-4.1.2-bin.tar.gz.sha256
-
-
Instructions for Debian-based systems.
-
For example, to verify the SHA256 hash of the downloaded file using GPG:
-
cURL
-
Wget
curl -OL https://archive.apache.org/dist/cassandra/4.1.2/apache-cassandra-4.1.2-bin.tar.gz
wget https://archive.apache.org/dist/cassandra/4.1.2/apache-cassandra-4.1.2-bin.tar.gz
-
-
Compare the output with the contents of the SHA256 file:
-
cURL
-
Wget
-
Third subtab
curl -L https://archive.apache.org/dist/cassandra/4.1.2/apache-cassandra-4.1.2-bin.tar.gz.sha256
wget --quiet -O - https://archive.apache.org/dist/cassandra/4.1.2/apache-cassandra-4.1.2-bin.tar.gz.sha256
7ce3103a76b8af76ffd8488d6bf484e1f175119617f3205ae0526c71d816c6f7
-
-
Just text.
Tab title rendering
These tabsets demonstrate the rendering for horizontal scrolling on tabs, as well as an experimental (unused) icon feature.
-
Tab Name
-
A Long Tab Name
-
A Really Long Tab Name
-
A Really Really Long Tab Name
-
Another Tab Name
Contents of Tab.
Contents of Long Tab.
Contents of Really Long Tab.
Contents of Really Really Long Tab.
Contents of Another Tab.
-
Tab Name
-
A Long Tab Name
-
A Really Long Tab Name
-
A Really Really Long Tab Name
-
Another Tab Name
Contents of Tab.
Contents of Long Tab.
Contents of Really Long Tab.
Contents of Really Really Long Tab.
Contents of Another Tab.
-
CQL
-
Python
-
Java
-
REST API
USE cycling;
CREATE TABLE rank_by_year_and_name (
race_year int,
race_name text,
cyclist_name text,
rank int,
PRIMARY KEY ((race_year, race_name), rank)
);
log.info("creating table...")
session.execute("""
CREATE TABLE IF NOT EXISTS cyclist_by_year_and_name (
race_year int,
race_name text,
rank int,
cyclist_name text,
PRIMARY KEY ((race_year,race_name),rank)
)
""")
CreateTable create = createTable("cycling", "cyclist_by_year_and_name")
.withPartitionKey("race_year", DataTypes.INT)
.withPartitionKey("race_name", DataTypes.TEXT)
.withClusteringColumn("rank", DataTypes.INT)
.withColumn("cyclist_name", DataTypes.TEXT);
// CREATE TABLE cycling.cyclist_by_year_and_name (race_year int,race_name text,rank int,cyclist_name text,PRIMARY KEY((race_year,race_name),rank))
curl -s --location \
--request POST http://localhost:8082/v2/schemas/keyspaces/cycling/tables \
--header "X-Cassandra-Token: $AUTH_TOKEN" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data '{
"name": "cyclist_by_year_and_name",
"columnDefinitions":
[
{
"name": "race_year",
"typeDefinition": "int"
},
{
"name": "race_name",
"typeDefinition": "text"
},
{
"name": "rank",
"typeDefinition": "int"
}
,
{
"name": "cyclist_name",
"typeDefinition": "text"
}
],
"primaryKey":
{
"partitionKey": ["race_year", "race_name"],
"clusteringKey": ["rank"]
},
"tableOptions":
{
"defaultTimeToLive": 0,
"clusteringExpression":
[{ "column": "rank", "order": "ASC" }]
}
}'