Wednesday, May 7, 2014

MapR commands - 9 Managing the Cluster

  • Alarm email

maprcli alarm config save -values "AE_ALARM_AEQUOTA_EXCEEDED,1,"
maprcli alarm config save -values "NODE_ALARM_CORE_PRESENT,1,"
  • List Alarm

$ maprcli alarm list -type cluster
alarm state  description                                             entity   alarm name                             alarm statechange time  
1            One or more licenses is about to expire within 28 days  CLUSTER  CLUSTER_ALARM_LICENSE_NEAR_EXPIRATION  1330171978541 
$ maprcli alarm list -type node
alarm state  description                                                                            entity  alarm name                    alarm statechange time  
1            Can not determine if service: cldb is running. Check logs at: /opt/mapr/logs/cldb.log  sdw1    NODE_ALARM_SERVICE_CLDB_DOWN  1324274386763           
1            Node has core file(s)                                                                  mdw     NODE_ALARM_CORE_PRESENT       1330145172579  
  • List Nodes

maprcli node list -columns id,h,hn,br,da,dtotal,dused,davail,fs-heartbeat
maprcli node list -columns id,br,fs-heartbeat,jt-heartbeat
  • Reformat a Node

Stop warden:
/etc/init.d/mapr-warden stop
Remove the disktab file:
rm /opt/mapr/conf/disktab
Create a text file /tmp/disks.txt that lists all the disks and partitions to format for use.
# cat  /tmp/disks.txt
Use disksetup to re-format the disks
/opt/mapr/server/disksetup -F /tmp/disks.txt
Start the Warden:
/etc/init.d/mapr-warden start
  • Remove a Node

Take server5 for example.Stop warden on server5:
/etc/init.d/mapr-warden stop
Remove on CLDB node: 
maprcli node remove -nodes server5 -zkconnect server1:5181
  • Add a Node

/opt/mapr/server/ -C master -Z server1 -N mynameCluster
/opt/mapr/server/disksetup -F /tmp/disks.txt
/etc/init.d/mapr-warden start
  • Memory overcommit

If the node has swap space, type "sysctl -w vm.overcommit_memory=0"
If the node does not have swap space, type "sysctl -w vm.overcommit_memory=1"
If you have a compelling reason to use vm.overcommit_memory=2, you should set overcommit_ratio to 100 by typing: "sysctl -w vm.overcommit_ratio=100"
  • List topology

maprcli node topo

No comments:

Post a Comment

Popular Posts