Tuesday, May 6, 2014

MapR commands - 2 Volume

  • Turn off compression for directorie

[root@mdw ~]# hadoop mfs -ls|grep var
drwxrwxrwx Z   - root    root             1 2011-12-19 13:52  268435456 /var
[root@mdw ~]# hadoop mfs -setcompression off /var
[root@mdw ~]# hadoop mfs -ls|grep var
drwxrwxrwx U   - root    root             1 2011-12-19 13:52  268435456 /var
  • Create volume

maprcli volume create  -name mynamevol -path /mynamevol -quota 1G -advisoryquota 200M
maprcli volume create  -name mynamevol.mirror -source mynamevol@mynamecluster -path /mynamevol_mirror -type 1
  • List volume

maprcli volume list -columns volumeid,volumetype,volumename,mountdir,mounted,aename,quota,used,totalused,actualreplication,rackpath
  • Viewing Volume Properties

maprcli volume info -name mynamevol
maprcli volume info -output terse -name mynamevol
  • Modifying a Volume

maprcli volume modify -name mynamevol.mirror -source mynamevol
  • Mount/Unmount Volume

maprcli volume unmount -name mynamevol
maprcli volume mount -name mynamevol
  • Remove Volume

maprcli volume remove -name testvol
  • Setting default volume topology

maprcli config save -values "{\"cldb.default.volume.topology\":\"/default-rack\"}"
maprcli config save -values "{\"cldb.default.volume.topology\":\"/\"}"
  • CLDB only topology

Planning: 
CLDB only nodes: mdw,sdw1
Other nodes: sdw3,sdw5,sdw7

Checking node id:
maprcli node list -columns id,hostname,"topo(rack)"

Move nodes to topology cldbonly:
maprcli node move -serverids 4277269757083023248,3528082726925061986 -topology /cldbonly

Move CLDB volume to topology cldbonly:
maprcli volume move -name mapr.cldb.internal -topology /cldbonly

Move non-cldb nodes to topology noncldb:
maprcli node move -serverids 5521777324064226112,3482126520576246764,4667932985226440135 -topology /noncldb

Move non-CLDB volume to topology noncldb:
maprcli volume move -name mapr.var -topology /noncldb
maprcli volume move -name mynamevol -topology /noncldb
maprcli volume move -name mapr.hbase -topology /noncldb
maprcli volume move -name mapr.jobtracker.volume -topology /noncldb
maprcli volume move -name mapr.cluster.root -topology /noncldb

No comments:

Post a Comment

Popular Posts