SyntaxException line 1 67 no viable alternative at input University with replication class SimpleStrategy

0 votes

I am trying to create Keyspace in cassandra, but I got the below error.

$ Create keyspace University with replication={'class':SimpleStrategy,'replication_factor': 3};
SyntaxException: line 1:67 no viable alternative at input ',' (... University with replication={'class':[SimpleStrategy],...)

How can I solve this?

Thank You

Apr 1, 2020 in Big Data Hadoop by akhtar
• 38,260 points
7,058 views

1 answer to this question.

0 votes

Hi@akhtar,

It is showing syntax error in your command. Use the below given command to create keyspace in cassandra.

$ Create keyspace University with replication = {'class':'SimpleStrategy','replication_factor': 3};

Hope it will solve your error.

Thank You

answered Apr 1, 2020 by MD
• 95,460 points
This has worked for me when I tried to bring a cassandra on my local , using the docker image.

docker pull cassandra

docker run --name my-cassandra cassandra -p 9042:9042

In another terminal , run cqlsh followed by enter key to get access to the cql console so as to run Cassandra commands.

CREATE KEYSPACE demo WITH
   ...    replication = {
   ...       'class': 'SimpleStrategy',
   ...       'replication_factor': 1};

-- use demo ;
use demo;

Related Questions In Big Data Hadoop

0 votes
1 answer

Hadoop: Error: slave: bash: line 0: cd: /opt/hadoop-1.1.0/libexec/..: No such file or directory

Hi,   In this case, it is searching ...READ MORE

answered Aug 7, 2019 in Big Data Hadoop by Gitika
• 65,770 points
1,464 views
0 votes
1 answer

Best way of starting & stopping the Hadoop daemons with command line

First way is to use start-all.sh & ...READ MORE

answered Apr 15, 2018 in Big Data Hadoop by Shubham
• 13,490 points
10,065 views
0 votes
1 answer

How to Create a table with region replication in Hbase?

Hi, Region replication is a per-table property. All ...READ MORE

answered Jun 1, 2019 in Big Data Hadoop by Gitika
• 65,770 points
1,862 views
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
11,028 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
2,536 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
108,832 views
–1 vote
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,350 points
4,612 views
0 votes
1 answer

Format HDFS Namenode Error: Could not find or load main class ”-Djava.library.path=.home.hadoop.hadoop-3.2.1.lib.native”

Hi@fwood, According to your configuration, you didn't set ...READ MORE

answered Jun 12, 2020 in Big Data Hadoop by MD
• 95,460 points
11,057 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP