cassandra-стресс: невозможно найти таблицу <имя пространства ключей>.<имя таблицы> в MaybeLoadschemainfo (StressProfile.java)
Конфигурации: -
Кластер из 3 узлов
Узел 1 -> 172.27.21.16(Семенной узел)
Узел 2 -> 172.27.21.18
Узел 3 -> 172.27.21.19
Параметры cassandra.yaml для всех узлов: -
1) семена: "172.27.21.16"
2) write_request_timeout_in_ms: 5000
3) адрес для прослушивания: 172.27.21.1 (6,8,9)
4) rpc_address: 172.27.21.1 (6,8,9)
Это мой файл code.yaml: -
keyspace: prutorStress3node
keyspace_definition: |
CREATE KEYSPACE prutorStress3node WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 2};
table: code
table_definition: |
CREATE TABLE code (
id timeuuid,
assignment_id bigint,
user_id text,
contents text,
save_type smallint,
save_time timeuuid,
PRIMARY KEY(assignment_id, id)
) WITH CLUSTERING ORDER BY (id DESC)
columnspec:
- name: assignment_id
population: uniform(1..100000) # Assignment IDs from range 1-100000
- name: id
cluster: fixed(100) # Each assignment id will have atmost 100 ids(maximum 100 codes allowed per student)
- name: user_id
size: fixed(50) # user_id comes from account table varchar(50)
- name: contents
size: uniform(1..2000)
- name: save_type
size: fixed(1) # Generated values between 1 to 4
population: uniform(1..4)
- name: save_time
insert:
partitions: fixed(1) # The number of partitions to update per batch
select: fixed(1)/100 # The ratio of rows each partition should insert as a proportion of the total possible rows for the partition (as defined by the clustering distribution columns
batchtype: UNLOGGED # The type of CQL batch to use. Either LOGGED/UNLOGGED
queries:
query1:
cql: select id,contents,save_type,save_time from code where assignment_id = ?
fields: samerow
query2:
cql: select id,contents,save_type,save_time from code where assignment_id = ? LIMIT 10
fields: samerow
query3:
cql: SELECT contents FROM code WHERE id = ? # Create index for this query
fields: samerow
Ниже приведен мой скрипт, который я запускаю с 172.27.21.17(узел в той же сети, но в другом кластере):
#!/bin/bash
echo '***********************************'
echo Deleting old data from prutorStress3node
echo '***********************************'
cqlsh -e "DROP KEYSPACE prutorStress3node" 172.27.21.16
sleep 120
echo '***********************************'
echo Creating fresh data
echo '***********************************'
/bin/cassandra-stress user profile=./code.yaml n=1000000 no-warmup cl=quorum ops\(insert=1\) \
-rate threads=25 -node 172.27.21.16
sleep 120
Проблема: - Проблема в том, что когда я запускаю скрипт сразу после удаления предыдущих данных и после вызова этих узлов, он работает нормально, но когда я запускаю его дальше, для каждого запуска я получаю следующую ошибку: -
Unable to find prutorStress3node.code
at org.apache.cassandra.stress.StressProfile.maybeLoadSchemaInfo(StressProfile.java:306)
at org.apache.cassandra.stress.StressProfile.maybeCreateSchema(StressProfile.java:273)
at org.apache.cassandra.stress.StressProfile.newGenerator(StressProfile.java:676)
at org.apache.cassandra.stress.StressProfile.printSettings(StressProfile.java:129)
at org.apache.cassandra.stress.settings.StressSettings.printSettings(StressSettings.java:383)
at org.apache.cassandra.stress.Stress.run(Stress.java:95)
at org.apache.cassandra.stress.Stress.main(Stress.java:62)
В файле StressProfile.java я видел, что метаданные таблицы заполняются до NULL. Я пытался разобраться в трассировке стека, но ничего не смог с этим поделать. Пожалуйста, дайте мне несколько указаний относительно того, что могло пойти не так?
1 ответ
Предоставление пространства ключей и имени таблицы в маленьком случае решило проблему для меня. Ранее я давал смешанный случай и получал ту же ошибку.