运行远程命令

要在集群上执行远程命令,请运行:

$ adam cmd -n [cluster-name] -t [target-nodes] [command]

示例:要date在名为“cluster”的集群中的所有节点上运行该命令:

$ adam cmd -n cluster date
192.168.1.1: Wed Jun 29 03:08:10 UTC 2016
192.168.1.2: Wed Jun 29 03:08:10 UTC 2016
192.168.1.3: Wed Jun 29 03:08:10 UTC 2016
192.168.1.4: Wed Jun 29 03:08:10 UTC 2016