Cassandra Database(8)Upgrade to 2.1.2 and OpsCenter
Cassandra Database(8)Upgrade to 2.1.2 and OpsCenter
Our project is using version 1.2.13. The latest version is 2.1.2 now.
Some example about the 2.0.4 version, using java driver and cqlsh http://sillycat.iteye.com/admin/blogs/2011991.
Configure the cluster without other tool, http://sillycat.iteye.com/blog/2166583.
Backup and restore data
1. Useful command
List all the key spaces we have.
> describe keyspaces;
Show the structure of the one key space and its tables.
> describe keyspace device_lookup;
CREATE KEYSPACE device_lookup WITH replication = {
'class': 'SimpleStrategy',
'replication_factor': '2'
};
USE device_lookup;
CREATE TABLE profile_devices (
brandcode ascii,
profileid bigint,
deviceid ascii,
PRIMARY KEY ((brandcode, profileid), deviceid)
) WITH COMPACT STORAGE AND
bloom_filter_fp_chance=0.100000 AND
caching='KEYS_ONLY' AND
comment='' AND
dclocal_read_repair_chance=0.000000 AND
gc_grace_seconds=864000 AND
read_repair_chance=0.100000 AND
replicate_on_write='true' AND
populate_io_cache_on_flush='false' AND
compaction={'sstable_size_in_mb': '5', 'class': 'LeveledCompactionStrategy'} AND
'class': 'SimpleStrategy',
'replication_factor': '2'
};
USE device_lookup;
CREATE TABLE profile_devices (
brandcode ascii,
profileid bigint,
deviceid ascii,
PRIMARY KEY ((brandcode, profileid), deviceid)
) WITH COMPACT STORAGE AND
bloom_filter_fp_chance=0.100000 AND
caching='KEYS_ONLY' AND
comment='' AND
dclocal_read_repair_chance=0.000000 AND
gc_grace_seconds=864000 AND
read_repair_chance=0.100000 AND
replicate_on_write='true' AND
populate_io_cache_on_flush='false' AND
compaction={'sstable_size_in_mb': '5', 'class': 'LeveledCompactionStrategy'} AND
compression={'sstable_compression': 'SnappyCompressor'};
Opscenter
2. Try Install the Latest Version
Set it up as normal. Edit the cassandra.yaml
listen_address: ubuntu-dev1
seed_provider:
# Addresses of hosts that are deemed contact points.
# Cassandra nodes use this list of hosts to find each other and learn
# the topology of the ring. You must change this if you are running
# multiple nodes!
- class_name: org.apache.cassandra.locator.SimpleSeedProvider
parameters:
# seeds is actually a comma-delimited list of addresses.
# Ex: "<ip1>,<ip2>,<ip3>"
# Addresses of hosts that are deemed contact points.
# Cassandra nodes use this list of hosts to find each other and learn
# the topology of the ring. You must change this if you are running
# multiple nodes!
- class_name: org.apache.cassandra.locator.SimpleSeedProvider
parameters:
# seeds is actually a comma-delimited list of addresses.
# Ex: "<ip1>,<ip2>,<ip3>"
- seeds:"ubuntu-dev1,ubuntu-dev2"
rpc_address: 0.0.0.0
broadcast_rpc_address: ubuntu-dev1
When start the cassandra server
> nohup cassandra -f conf/cassandra.yaml &
I get error message as follow:
Cassandra 2.0 and later require Java 7u25 or later.
Try to upgrade the JDK
>sudo add-apt-repository ppa:webupd8team/java
>sudo apt-get update
> sudo apt-get install oracle-java7-installer
>sudo update-alternatives --config java
>sudo update-alternatives --config javac
After the cassandra running, we can use cqlsh to connect to that.
9160 is used for thrift clients, 9042 is for native protocol clients.
Check the cluster
> nodetool -h ubuntu-dev1 status
3. Try to install OpsCenter
Find the latest version here.
> sudo ln -s /home/carl/tool/opscenter-5.0.2 /opt/opscenter-5.0.2
> sudo ln -s /opt/opscenter-5.0.2 /opt/opscenter
Start the opscenter
> bin/opscenter -f
Visit the webpage
Put ubuntu-dev1 and connect from there.
Plan to start cassandra and nodeJS later after gatling.
References:
old blog 1 ~ 7
http://sillycat.iteye.com/blog/1870661
http://sillycat.iteye.com/blog/2011524
http://sillycat.iteye.com/blog/2011525
http://sillycat.iteye.com/blog/2011526
http://sillycat.iteye.com/blog/2011991
http://sillycat.iteye.com/blog/2011992
http://sillycat.iteye.com/blog/2166583
official website
相关推荐
SUNDRAGON 2020-07-23
zhangxiaocc 2020-07-18
韩学敏 2020-01-07
累积技术沉淀经验 2020-01-07
CassandraTorres 2020-01-03
累积技术沉淀经验 2019-12-12
akcsdno 2019-12-06
那年夏天0 2019-12-06
数据库起来 2019-12-06
dqk 2019-11-12
zffj 2019-10-20
风一样的小宝 2019-11-01
sunfragrence 2017-08-11
wangtua 2018-02-01
gyunling 2019-09-08
newzhhsh 2019-03-27
dqk 2012-07-18
maggie 2016-06-06
李春春 2015-09-21