How to find Cassandra Version for a node which is down? - cassandra

It is easy to find Cassandra version of running Cassandra node. How to find the Cassandra version of a Cassandra node which is down or not started? Is there any file in which version is mentioned and which we can see?

you should have file lib/apache-cassandra-<version>.jar file in the Cassandra directory. You can also look into first line of the NEWS.txt file - it should have a version of the current version.

Related

upgrade apache cassandra from 2.0.11 to 3.11

What should be the upgrade path of Apache Cassandra 2.0.11 to 3.11 (latest)?
My node ring is 4 machines with around 400 GB.
you can upgrade from Cassandra 2.1.9 (or higher) to Cassandra 3.11 (or higher).However here you may need to go to through with intermediate upgrade.
2.0.11 -> 2.2.* -> 3.11
Steps for upgrade cassandra version
1.Take snapshots on each node
2.Run nodetool drain
3.Stop cassandra services.
4.Back up your Cassandra configuration files from the old installation to safe place.
5.Update java version to 8 if required
6.Install the binaries (via tarball, apt-get, yum, etc...) for the apache Cassandra.
Configure the new product.
Compare, merge and update any modifications you have previously made into the new configuration files for the apache version (cassandra.yaml, cassandra-env.sh, etc.).
7.Start the cassandra services.
8.Check the logs for warnings, errors, and exceptions. tail -f /var/logs/cassandra/system.log # or path where you set your logs.
Run nodetool upgradesstables
9."nodetool upgradesstables" (The upgradesstables step can be run on each node after the nodes done with migration.)
Check the logs for warnings, errors, and exceptions. tail -f /var/logs/cassandra/system.log # or path where you set your logs.
10.Check cassandra version "nodetool version".

cql-import tool not present in sqoop 1.4.6

I am currently stuck on Data migration, I want to migrate data from Oracle Database to Cassandra.
I have following tools installed on Linux
DSE 4.8
Hadoop 2.7.3
Sqoop 1.4.6
I am not sure why my SQOOP version is not having cql-import or any cassandra related commands.
Following are the available commands I can see in the "SQOOP help" output
Available commands:
codegen
create-hive-table
eval
export
help
import
import-all-tables
import-mainframe
job
list-databases
list-tables
merge
metastore
version
I have searched throughout the net and found following link having latest sqoop version, but cql-import tool is missing in all of them.
https://www-eu.apache.org/dist/sqoop/
http://mirrors.ibiblio.org/apache/sqoop/1.4.6/
It would be very helpful if any one has the link for a sqoop version which supports cassandra data migration commands like "cql-import".
Editted:
One more point to add, I have manually configured Hadoop and Sqoop.
Thanks in advance

Upgrading Cassandra 1.2.9 to 2.0.x

I'm trying to upgrade a single-node Cassandra cluster from 1.1.5 to 2.0.x.
My production server is running on Linux. I pulled the data folder to my Windows box, keeping the system keyspace, along with a particular one I'm interested in, and dropping the rest after getting Cassandra up.
I upgraded and tested:
1.1.5 -> 1.2.0
1.2.0 -> 1.2.8
1.2.8 -> 1.2.9
Ran:
nodetool upgradesstables
describe schema
select * from table limit 100
Everything looks good with 1.x versions.
When trying to upgrade to 2.0.7, I run into an issue (I saw the recommended upgrade path is 1.2.9 -> 2.0.7):
INFO 16:43:01,758 Opening C:\path\mykeyspace-mytable-ic-655 (97902117 bytes)
ERROR 16:43:12,443 Exception encountered during startup
java.lang.RuntimeException: Incompatible SSTable found. Current version jb is unable to read file: C:\path\mykeyspace\mytable\mykeyspace-mytable.mytable_location_idx-he-647. Please run upgradesstables.
at org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:409)
at org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:391)
at org.apache.cassandra.db.index.AbstractSimplePerColumnSecondaryIndex.init(AbstractSimplePerColumnSecondaryIndex.java:52)
at org.apache.cassandra.db.index.SecondaryIndexManager.addIndexedColumn(SecondaryIndexManager.java:292)
at org.apache.cassandra.db.ColumnFamilyStore.<init>(ColumnFamilyStore.java:277)
at org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:415)
at org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:386)
at org.apache.cassandra.db.Keyspace.initCf(Keyspace.java:309)
at org.apache.cassandra.db.Keyspace.<init>(Keyspace.java:266)
at org.apache.cassandra.db.Keyspace.open(Keyspace.java:110)
at org.apache.cassandra.db.Keyspace.open(Keyspace.java:88)
at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:290)
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:480)
at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:569)
I did run upgradesstables from 1.2.9/bin, after starting 1.2.9/bin/cassandra.
Any idea what's wrong?
mytable_location_idx-he-647 is a 1.1.5 sstable (he is the version, h is 1.1 and e is the 5th version of h). Run upgradesstables again and verify all the sstables get migrated. the version of the sstable should start with an i for 1.2, and you want it to be at ic before upgrading to 2.0.
The problem lied in the fact that I had only partially migrated my production cluster to my local environment. I had copied the entire system keyspace files and only some of the data files for just one of my keyspaces.
I fixed the problem by redoing everything:
set up 1.1.5 locally
used cqlsh to connect to it, dropped all other keyspaces and tables I didn't have available locally
migrated (not sure which ones did the trick, assume I did them all): 1.1.5 -> 1.2.0 -> 1.2.8 -> 1.2.9 -> 2.0.0 -> 2.0.1 -> 2.0.7.
possibly deleted any mismatching index files Cassandra was complaining about when starting up (not sure if I encountered any when doing the last magically working upgrades, but this let me advance through versions during previous attempts). My guess is Cassandra looks at all of them, but upgradesstables occasionally leaves some behind.

How to upgrade Apache Spark version

Currently, I have installed Spark 1.5.0 version on AWS using spark-ec2.sh script.
Now, I want to upgrade my Spark version to 1.5.1. How do i do this? Is there any upgrade procedure or do i have to build it from scratch using the spark-ec2 script? In that case i will lose all my existing configuration.
Please Advise
Thanks
1.5.1 has identical configuration fields with the 1.5.0, I am not aware of any automation tools, but upgrade should be trivial. C/P $SPARK_HOME/conf should suffice. Back up the old files, nevertheless.

Upgrading Cassandra

my Cassandra version is 1.2.4 and i'm trying to upgrade it to 2.0.5 and i know that in the first part i have to upgrade it to 1.0.14 and after that try to upgrade it to the 2.0.5 ,
when I try to run nodetool -h localhost removenode Host ID it gives me :
Exception in thread "main" java.lang.UnsupportedOperationException: Cannot remove self
at org.apache.cassandra.service.StorageService.removeNode(StorageService.java:3199)
.....
before running that command i tried nodetool upgradesstables
what is the problem ? and how can i resolve it ?
OS:Ubuntu 12.04 lts
UPDATE
Download the versions 1.2.13 and 2.0.5 of Cassandra from the official site . Unpack . Configure cassandra.yaml in both versions downloaded Cassandra. Take as a basis the existing (old) version cassandra.yaml.
Make snapshot for old Cassandra: nodetool snapshot.
Stop recording unit (reading will continue to work): nodetool drain.
Stop old Cassandra.
Copy the data from the current (old) Cassandra in a new version 1.2.13. Run it (1.2.13).
Perform for Cassandra 1.2.13 update command table format: nodetool upgradesstables-a.
Copy data from Cassandra 1.2.13 to Cassandra 2.0.5.
 
FINE POINTS
In 2.0.5 are included by default virtual hosts - vnodes (record "num_tokens: 256" in cassandra.yaml).
In 2.0.5 record "index_interval: 128" factored out of the file cassandra.yaml to the level properties of the table.
In 2.0.5 some settings from previous versions of cassandra.yaml are absent.

Resources