Sha256: 165b64ef96e9ca252ea20cffee42ef10c9bcaff2df37372d77d377400104a152

Contents?: true

Size: 1.76 KB

Versions: 2

Compression:

Stored size: 1.76 KB

Contents

include "../package2/package2.sfp"

schema Hadoop2 extends Package2 {
	installed = true
	running = true
	configured = true
	
	final name = "hadoop"
	final provider = "tar"
	final version = "2.2.0"
	final source = "http://master.herry.ext9.sup.hpl.hp.com/hadoop"
	final home = "/opt/hadoop2"

	final user = "hadoop"
	final group = "hadoop"
	final password = "!"
	final java_home = ""
	final data_dir = "/opt/hadoop2/data"

	sub install {
		condition {
			this.installed != true
		}
		effect {
			this.installed = true
			this.running = false
			this.configured = false
		}
	}

	sub uninstall {
		condition {
			this.running = false
			this.installed = true
		}
		effect {
			this.installed = false
			this.configured = true
		}
	}

	sub start {
		condition {
			this.running != true
			this.installed = true
			this.configured = true
		}
		effect {
			this.running = true
		}
	}

	sub stop {
		condition {
			this.running = true
		}
		effect {
			this.running = false
		}
	}

	sub configure {
		condition {
			this.running = false
			this.configured = false
		}
		effect {
			this.configured = true
		}
	}

}

schema Hadoop2Master extends Hadoop2 {
	final cluster_name = "hadoopnuri"
}

schema Hadoop2Slave extends Hadoop2 {
	master isref Hadoop2Master

	sub install (master : Hadoop2Master) {
		condition {
			this.installed != true
			master.parent.created = true
		}
		effect {
			this.installed = true
			this.running = false
			this.configured = false
			this.master = master
		}
	}

	sub start (master : Hadoop2Master) {
		condition {
			this.running != true
			this.installed = true
			this.configured = true
			this.master = master
			master.running = true
		}
		effect {
			this.running = true
		}
	}

	sub stop {
		condition {
			this.running = true
		}
		effect {
			this.running = false
		}
	}
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
nuri-0.5.5 modules/hadoop2/hadoop2.sfp
nuri-0.5.4 modules/hadoop2/hadoop2.sfp