← Back to team overview

bigdata-dev team mailing list archive

[Merge] lp:~bigdata-dev/charms/trusty/apache-pig/trunk into lp:charms/trusty/apache-pig

 

Kevin W Monroe has proposed merging lp:~bigdata-dev/charms/trusty/apache-pig/trunk into lp:charms/trusty/apache-pig.

Requested reviews:
  Juju Big Data Development (bigdata-dev)

For more details, see:
https://code.launchpad.net/~bigdata-dev/charms/trusty/apache-pig/trunk/+merge/271387
-- 
Your team Juju Big Data Development is requested to review the proposed merge of lp:~bigdata-dev/charms/trusty/apache-pig/trunk into lp:charms/trusty/apache-pig.
=== modified file 'hooks/callbacks.py'
--- hooks/callbacks.py	2015-08-06 19:55:03 +0000
+++ hooks/callbacks.py	2015-09-16 21:43:51 +0000
@@ -33,6 +33,10 @@
     hookenv.status_set('active', 'Ready')
 
 
+def clear_active_flag():
+    unitdata.kv().set('charm.active', False)
+
+
 # Main Pig class for callbacks
 class Pig(object):
     def __init__(self, dist_config):
@@ -54,7 +58,6 @@
                               destination=self.dist_config.path('pig'),
                               skip_top_level=True)
         self.setup_pig_config()
-        self.configure_pig()
         unitdata.kv().set('pig.installed', True)
 
     def setup_pig_config(self):
@@ -70,7 +73,7 @@
         default_conf.rmtree_p()
         pig_conf.symlink(default_conf)
 
-    def configure_pig(self):
+        # Configure immutable bits
         pig_bin = self.dist_config.path('pig') / 'bin'
         with utils.environment_edit_in_place('/etc/environment') as env:
             if pig_bin not in env['PATH']:

=== modified file 'hooks/common.py' (properties changed: +x to -x)
--- hooks/common.py	2015-06-29 20:48:50 +0000
+++ hooks/common.py	2015-09-16 21:43:51 +0000
@@ -68,7 +68,9 @@
                 callbacks.update_active_status,
             ],
             'cleanup': [
+                callbacks.clear_active_flag,
                 pig.cleanup,
+                callbacks.update_blocked_status,
             ],
         },
     ])

=== added file 'resources/python/jujuresources-0.2.11.tar.gz'
Binary files resources/python/jujuresources-0.2.11.tar.gz	1970-01-01 00:00:00 +0000 and resources/python/jujuresources-0.2.11.tar.gz	2015-09-16 21:43:51 +0000 differ
=== removed file 'resources/python/jujuresources-0.2.9.tar.gz'
Binary files resources/python/jujuresources-0.2.9.tar.gz	2015-06-29 20:48:50 +0000 and resources/python/jujuresources-0.2.9.tar.gz	1970-01-01 00:00:00 +0000 differ
=== modified file 'tests/00-setup'
--- tests/00-setup	2015-03-03 03:03:50 +0000
+++ tests/00-setup	2015-09-16 21:43:51 +0000
@@ -1,5 +1,8 @@
 #!/bin/bash
 
-sudo add-apt-repository ppa:juju/stable -y
-sudo apt-get update
-sudo apt-get install python3 amulet -y
+if ! dpkg -s amulet &> /dev/null; then
+    echo Installing Amulet...
+    sudo add-apt-repository -y ppa:juju/stable
+    sudo apt-get update
+    sudo apt-get -y install amulet
+fi

=== modified file 'tests/100-deploy-pig'
--- tests/100-deploy-pig	2015-08-24 23:25:47 +0000
+++ tests/100-deploy-pig	2015-09-16 21:43:51 +0000
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 import unittest
 import amulet
 
@@ -13,10 +13,10 @@
     def setUpClass(cls):
         cls.d = amulet.Deployment(series='trusty')
         # Deploy a hadoop cluster
-        cls.d.add('yarn-master', charm='cs:~bigdata-dev/trusty/apache-hadoop-yarn-master')
-        cls.d.add('hdfs-master', charm='cs:~bigdata-dev/trusty/apache-hadoop-hdfs-master')
-        cls.d.add('compute-slave', charm='cs:~bigdata-dev/trusty/apache-hadoop-compute-slave', units=3)
-        cls.d.add('plugin', charm='cs:~bigdata-dev/trusty/apache-hadoop-plugin')
+        cls.d.add('yarn-master', charm='cs:trusty/apache-hadoop-yarn-master')
+        cls.d.add('hdfs-master', charm='cs:trusty/apache-hadoop-hdfs-master')
+        cls.d.add('compute-slave', charm='cs:trusty/apache-hadoop-compute-slave', units=3)
+        cls.d.add('plugin', charm='cs:trusty/apache-hadoop-plugin')
         cls.d.relate('yarn-master:namenode', 'hdfs-master:namenode')
         cls.d.relate('compute-slave:nodemanager', 'yarn-master:nodemanager')
         cls.d.relate('compute-slave:datanode', 'hdfs-master:datanode')
@@ -24,11 +24,11 @@
         cls.d.relate('plugin:namenode', 'hdfs-master:namenode')
 
         # Add Pig Service
-        cls.d.add('pig', charm='cs:~bigdata-dev/trusty/apache-pig')
+        cls.d.add('pig', charm='cs:trusty/apache-pig')
         cls.d.relate('pig:hadoop-plugin', 'plugin:hadoop-plugin')
 
         cls.d.setup(timeout=3600)
-        cls.d.sentry.wait()
+        cls.d.sentry.wait(timeout=3600)
         cls.unit = cls.d.sentry.unit['pig/0']
 
 


Follow ups