diff --git a/.gitpod.yml b/.gitpod.yml index b181988..77d051a 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -6,7 +6,7 @@ tasks: curl https://katapod-file-store.s3.us-west-1.amazonaws.com/ds201/lab06-environment.tar.gz \ --output environment.tar.gz tar xf environment.tar.gz - cassandra + ./apache-cassandra-4.1.0/bin/cassandra init: | command: | clear diff --git a/finish.md b/finish.md index 040c58f..5d7c0db 100644 --- a/finish.md +++ b/finish.md @@ -9,7 +9,7 @@ @@ -34,7 +34,7 @@ diff --git a/step4.md b/step4.md deleted file mode 100644 index 6fb2ccb..0000000 --- a/step4.md +++ /dev/null @@ -1,79 +0,0 @@ - -
- -
- Node - ℹ️ For technical support, please contact us via email. -
-
- - - - - - -
Examine partitioning and datadistribution in the cluster
- -You should still be in *cqlsh*, if not start it again and connect to the cluster. - -✅ Execute the following query to retrieve the tag partition key value for each row from the videos_by_tag table, along with its corresponding token: -``` -SELECT tag, token(tag), title FROM videos_by_tag; -``` -**Question:** How many unique tokens are in the table? - -
Answer -

-There are two unique tokens, one for each unique partition key. -

-
-
- -✅ Exit from *cqlsh*: -``` -exit -``` - -✅ Run the following command to refresh your memory as to which nodes own which token ranges. -``` -/workspace/ds201-lab06/node1/bin/nodetool ring -``` -✅ Execute the following commands to map the specific tags (`datastax` and `cassandra`) to endpoints/nodes. - ---- -**Note:** Note that we must also supply the keyspace and table name we are interested in since we set replication on a per-keyspace basis. There is more on replication to come later in this course. - ---- - - -``` -/workspace/ds201-lab06/node1/bin/nodetool getendpoints killrvideo videos_by_tag 'datastax' - -/workspace/ds201-lab06/node1/bin/nodetool getendpoints killrvideo videos_by_tag 'cassandra' -``` - -✅ Run `nodetool status` again to see the token range ownership percentages. -``` -/workspace/ds201-lab06/node1/bin/nodetool status -``` - -**Question:** What do the *Owns* values mean? - -
Answer -

-The Owns fields are the percentage of tokens owned by each node in the cluster. The tokens may not be evenly distributed because there are such a small number. The *videos* table as 5 unique tokens and the *videos_by_tag* table has 2. -

-
-
- - -