Merge lp:~bigdata-dev/charms/trusty/apache-hadoop-client/status-removed into lp:~bigdata-dev/charms/trusty/apache-hadoop-client/trunk

Proposed by Cory Johns
Status: Merged
Merged at revision: 99
Proposed branch: lp:~bigdata-dev/charms/trusty/apache-hadoop-client/status-removed
Merge into: lp:~bigdata-dev/charms/trusty/apache-hadoop-client/trunk
Diff against target: 22 lines (+9/-1)
2 files modified
hooks/hadoop-plugin-relation-changed (+7/-1)
hooks/hadoop-plugin-relation-departed (+2/-0)
To merge this branch: bzr merge lp:~bigdata-dev/charms/trusty/apache-hadoop-client/status-removed
Reviewer Review Type Date Requested Status
Kevin W Monroe Approve
Review via email: mp+267593@code.launchpad.net

Description of the change

Fixed status reporting not being accurate when relations were removed

To post a comment you must log in.
Revision history for this message
Kevin W Monroe (kwmonroe) wrote :

LGTM, your bash is marvelous.

review: Approve
99. By Cory Johns

Added support for HDFS-only deployment

Revision history for this message
Kevin W Monroe (kwmonroe) wrote :

New drop to support hdfs-only status LGTM as well. Nice job, but next time, don't make me review twice :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'hooks/hadoop-plugin-relation-changed'
--- hooks/hadoop-plugin-relation-changed 2015-05-11 22:25:12 +0000
+++ hooks/hadoop-plugin-relation-changed 2015-08-13 21:21:13 +0000
@@ -1,4 +1,10 @@
1#!/bin/bash1#!/bin/bash
2if [[ "$(relation-get hdfs-ready)" == "True" ]]; then2hdfs_ready="$(relation-get hdfs-ready)"
3yarn_ready="$(relation-get yarn-ready)"
4if [[ "$hdfs_ready" == "true" && "$yarn_ready" == "true" ]]; then
3 hooks/status-set active "Ready to run mapreduce jobs"5 hooks/status-set active "Ready to run mapreduce jobs"
6elif [[ "$hdfs_ready" == "true" ]]; then
7 hooks/status-set active "Ready (HDFS only)"
8else
9 hooks/status-set waiting "Waiting for Hadoop to be ready"
4fi10fi
511
=== added file 'hooks/hadoop-plugin-relation-departed'
--- hooks/hadoop-plugin-relation-departed 1970-01-01 00:00:00 +0000
+++ hooks/hadoop-plugin-relation-departed 2015-08-13 21:21:13 +0000
@@ -0,0 +1,2 @@
1#!/bin/bash
2hooks/status-set blocked "Please add relation to apache-hadoop-plugin"

Subscribers

People subscribed via source and target branches

to all changes: