Merge "Added support of Hue 3.8.1 to MapR plugin"
This commit is contained in:
commit
5b4028c9ac
@ -46,6 +46,13 @@ HUE = np.NodeProcess(
|
||||
open_ports=[8002, 8888]
|
||||
)
|
||||
|
||||
HUE_LIVY = np.NodeProcess(
|
||||
name="hue-livy",
|
||||
ui_name="Hue Livy",
|
||||
package="mapr-hue-livy",
|
||||
open_ports=[8998]
|
||||
)
|
||||
|
||||
|
||||
@six.add_metaclass(s.Single)
|
||||
class Hue(s.Service):
|
||||
@ -214,3 +221,13 @@ class HueV370(Hue):
|
||||
def __init__(self):
|
||||
super(HueV370, self).__init__()
|
||||
self._version = '3.7.0'
|
||||
|
||||
|
||||
@six.add_metaclass(s.Single)
|
||||
class HueV381(Hue):
|
||||
def __init__(self):
|
||||
super(HueV381, self).__init__()
|
||||
self._version = "3.8.1"
|
||||
self._dependencies = [("mapr-hue-base", self.version)]
|
||||
self._node_processes = [HUE, HUE_LIVY]
|
||||
self._validation_rules.append(vu.at_most(1, HUE_LIVY))
|
||||
|
1136
sahara/plugins/mapr/services/hue/resources/hue_3.8.1.template
Normal file
1136
sahara/plugins/mapr/services/hue/resources/hue_3.8.1.template
Normal file
File diff suppressed because it is too large
Load Diff
@ -38,6 +38,22 @@ class LessThanCountException(e.InvalidComponentCountException):
|
||||
self.message = LessThanCountException.MESSAGE % args
|
||||
|
||||
|
||||
class MoreThanCountException(e.InvalidComponentCountException):
|
||||
MESSAGE = _("Hadoop cluster should contain at most"
|
||||
" %(expected_count)d %(component)s component(s)."
|
||||
" Actual %(component)s count is %(actual_count)d")
|
||||
|
||||
def __init__(self, component, expected_count, count):
|
||||
super(MoreThanCountException, self).__init__(
|
||||
component, expected_count, count)
|
||||
args = {
|
||||
"expected_count": expected_count,
|
||||
"component": component,
|
||||
"actual_count": count,
|
||||
}
|
||||
self.message = MoreThanCountException.MESSAGE % args
|
||||
|
||||
|
||||
class EvenCountException(ex.SaharaException):
|
||||
MESSAGE = _("Hadoop cluster should contain odd number of %(component)s"
|
||||
" but %(actual_count)s found.")
|
||||
@ -99,6 +115,16 @@ def at_least(count, component):
|
||||
return ft.partial(validate, component=component, count=count)
|
||||
|
||||
|
||||
def at_most(count, component):
|
||||
def validate(cluster_context, component, count):
|
||||
actual_count = cluster_context.get_instances_count(component)
|
||||
if actual_count > count:
|
||||
raise MoreThanCountException(
|
||||
component.ui_name, count, actual_count)
|
||||
|
||||
return ft.partial(validate, component=component, count=count)
|
||||
|
||||
|
||||
def exactly(count, component):
|
||||
def validate(cluster_context, component, count):
|
||||
actual_count = cluster_context.get_instances_count(component)
|
||||
|
@ -55,6 +55,7 @@ class VersionHandler(bvh.BaseVersionHandler):
|
||||
mahout.MahoutV010(),
|
||||
oozie.OozieV410(),
|
||||
hue.HueV370(),
|
||||
hue.HueV381(),
|
||||
hbase.HBaseV0989(),
|
||||
hbase.HBaseV09812(),
|
||||
drill.DrillV11(),
|
||||
|
@ -55,6 +55,7 @@ class VersionHandler(bvh.BaseVersionHandler):
|
||||
mahout.MahoutV010(),
|
||||
oozie.OozieV410(),
|
||||
hue.HueV370(),
|
||||
hue.HueV381(),
|
||||
hbase.HBaseV0989(),
|
||||
hbase.HBaseV09812(),
|
||||
drill.DrillV11(),
|
||||
|
Loading…
Reference in New Issue
Block a user