From 14f8b022581176348fbd5d7656ae0b0e707fdf7a Mon Sep 17 00:00:00 2001 From: Artem Osadchyi Date: Mon, 3 Aug 2015 12:56:42 +0300 Subject: [PATCH] Added support of Mahout 0.10 to MapR plugin Change-Id: Ibb2f1a0f20c6e58782fc7ad9d15861ce2ec7a1c5 Implements: blueprint mapr-mahout-010 --- sahara/plugins/mapr/services/mahout/mahout.py | 16 ++++++++++++++-- .../mapr/versions/v3_1_1/version_handler.py | 2 +- .../mapr/versions/v4_0_1_mrv1/version_handler.py | 2 +- .../mapr/versions/v4_0_1_mrv2/version_handler.py | 2 +- .../mapr/versions/v4_0_2_mrv1/version_handler.py | 2 +- .../mapr/versions/v4_0_2_mrv2/version_handler.py | 2 +- 6 files changed, 19 insertions(+), 7 deletions(-) diff --git a/sahara/plugins/mapr/services/mahout/mahout.py b/sahara/plugins/mapr/services/mahout/mahout.py index dc3a7eb5..aec89636 100644 --- a/sahara/plugins/mapr/services/mahout/mahout.py +++ b/sahara/plugins/mapr/services/mahout/mahout.py @@ -19,7 +19,6 @@ import sahara.plugins.mapr.domain.node_process as np import sahara.plugins.mapr.domain.service as s import sahara.plugins.mapr.util.validation_utils as vu - MAHOUT = np.NodeProcess( name='mahout', ui_name='Mahout', @@ -34,6 +33,19 @@ class Mahout(s.Service): super(Mahout, self).__init__() self._name = 'mahout' self._ui_name = 'Mahout' - self._version = '0.9' self._node_processes = [MAHOUT] self._validation_rules = [vu.at_least(1, MAHOUT)] + + +@six.add_metaclass(s.Single) +class MahoutV09(Mahout): + def __init__(self): + super(MahoutV09, self).__init__() + self._version = '0.9' + + +@six.add_metaclass(s.Single) +class MahoutV010(Mahout): + def __init__(self): + super(MahoutV010, self).__init__() + self._version = '0.10.0' diff --git a/sahara/plugins/mapr/versions/v3_1_1/version_handler.py b/sahara/plugins/mapr/versions/v3_1_1/version_handler.py index 59b35b58..f2654147 100644 --- a/sahara/plugins/mapr/versions/v3_1_1/version_handler.py +++ b/sahara/plugins/mapr/versions/v3_1_1/version_handler.py @@ -54,7 +54,7 @@ class VersionHandler(bvh.BaseVersionHandler): hbase.HBaseV094(), hbase.HBaseV0987(), httpfs.HttpFS(), - mahout.Mahout(), + mahout.MahoutV09(), pig.PigV013(), pig.PigV014(), swift.Swift(), diff --git a/sahara/plugins/mapr/versions/v4_0_1_mrv1/version_handler.py b/sahara/plugins/mapr/versions/v4_0_1_mrv1/version_handler.py index 5dede308..049c7b1c 100644 --- a/sahara/plugins/mapr/versions/v4_0_1_mrv1/version_handler.py +++ b/sahara/plugins/mapr/versions/v4_0_1_mrv1/version_handler.py @@ -52,7 +52,7 @@ class VersionHandler(bvh.BaseVersionHandler): hbase.HBaseV0987(), hbase.HBaseV0989(), httpfs.HttpFS(), - mahout.Mahout(), + mahout.MahoutV09(), pig.PigV013(), pig.PigV014(), swift.Swift(), diff --git a/sahara/plugins/mapr/versions/v4_0_1_mrv2/version_handler.py b/sahara/plugins/mapr/versions/v4_0_1_mrv2/version_handler.py index 1978042e..9adff20d 100644 --- a/sahara/plugins/mapr/versions/v4_0_1_mrv2/version_handler.py +++ b/sahara/plugins/mapr/versions/v4_0_1_mrv2/version_handler.py @@ -53,7 +53,7 @@ class VersionHandler(bvh.BaseVersionHandler): hbase.HBaseV0987(), hbase.HBaseV0989(), httpfs.HttpFS(), - mahout.Mahout(), + mahout.MahoutV09(), pig.PigV013(), pig.PigV014(), swift.Swift(), diff --git a/sahara/plugins/mapr/versions/v4_0_2_mrv1/version_handler.py b/sahara/plugins/mapr/versions/v4_0_2_mrv1/version_handler.py index b93de929..b9d1c257 100644 --- a/sahara/plugins/mapr/versions/v4_0_2_mrv1/version_handler.py +++ b/sahara/plugins/mapr/versions/v4_0_2_mrv1/version_handler.py @@ -58,7 +58,7 @@ class VersionHandler(bvh.BaseVersionHandler): hue.HueV360(), hue.HueV370(), httpfs.HttpFS(), - mahout.Mahout(), + mahout.MahoutV09(), pig.PigV013(), pig.PigV014(), sqoop2.Sqoop2(), diff --git a/sahara/plugins/mapr/versions/v4_0_2_mrv2/version_handler.py b/sahara/plugins/mapr/versions/v4_0_2_mrv2/version_handler.py index 3b04f02f..81a317bb 100644 --- a/sahara/plugins/mapr/versions/v4_0_2_mrv2/version_handler.py +++ b/sahara/plugins/mapr/versions/v4_0_2_mrv2/version_handler.py @@ -59,7 +59,7 @@ class VersionHandler(bvh.BaseVersionHandler): hue.HueV360(), hue.HueV370(), httpfs.HttpFS(), - mahout.Mahout(), + mahout.MahoutV09(), pig.PigV013(), pig.PigV014(), sqoop2.Sqoop2(),