Add Kafka to MapR plugin
Implements: blueprint add-mapr-kafka Change-Id: I2b88cb053f0ff51c2a72bea7acdcfdeacd3df343
This commit is contained in:
parent
488633b085
commit
793c269925
3
releasenotes/notes/add-mapr-kafka-3a808bbc1aa21055.yaml
Normal file
3
releasenotes/notes/add-mapr-kafka-3a808bbc1aa21055.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- Add Kafka to MapR plugin
|
0
sahara/plugins/mapr/services/kafka/__init__.py
Normal file
0
sahara/plugins/mapr/services/kafka/__init__.py
Normal file
73
sahara/plugins/mapr/services/kafka/kafka.py
Normal file
73
sahara/plugins/mapr/services/kafka/kafka.py
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
# Copyright (c) 2015, MapR Technologies
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
KAFKA = np.NodeProcess(
|
||||||
|
name='kafka',
|
||||||
|
ui_name='Kafka',
|
||||||
|
package='mapr-kafka',
|
||||||
|
open_ports=[9092]
|
||||||
|
)
|
||||||
|
|
||||||
|
KAFKA_REST = np.NodeProcess(
|
||||||
|
name='kafka',
|
||||||
|
ui_name='Kafka Rest',
|
||||||
|
package='mapr-kafka-rest',
|
||||||
|
open_ports=[8082]
|
||||||
|
)
|
||||||
|
|
||||||
|
KAFKA_CONNECT_HDFS = np.NodeProcess(
|
||||||
|
name='kafka',
|
||||||
|
ui_name='Kafka Connect HDFS',
|
||||||
|
package='mapr-kafka-connect-hdfs'
|
||||||
|
)
|
||||||
|
|
||||||
|
KAFKA_CONNECT_JDBC = np.NodeProcess(
|
||||||
|
name='kafka',
|
||||||
|
ui_name='Kafka Connect JDBC',
|
||||||
|
package='mapr-kafka-connect-jdbc'
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class Kafka(s.Service):
|
||||||
|
def __init__(self):
|
||||||
|
super(Kafka, self).__init__()
|
||||||
|
self._version = '0.9.0'
|
||||||
|
self._name = 'kafka'
|
||||||
|
self._ui_name = 'Kafka'
|
||||||
|
self._node_processes = [KAFKA]
|
||||||
|
|
||||||
|
|
||||||
|
class KafkaRest(s.Service):
|
||||||
|
def __init__(self):
|
||||||
|
super(KafkaRest, self).__init__()
|
||||||
|
self._version = '2.0.1'
|
||||||
|
self._name = 'kafka-eco'
|
||||||
|
self._ui_name = 'Kafka Rest'
|
||||||
|
self._node_processes = [KAFKA_REST]
|
||||||
|
self._validation_rules = [vu.at_least(1, KAFKA)]
|
||||||
|
|
||||||
|
|
||||||
|
class KafkaConnect(s.Service):
|
||||||
|
def __init__(self):
|
||||||
|
super(KafkaConnect, self).__init__()
|
||||||
|
self._version = '2.0.1'
|
||||||
|
self._name = 'kafka-connect'
|
||||||
|
self._ui_name = 'Kafka Connect'
|
||||||
|
self._node_processes = [KAFKA_CONNECT_HDFS, KAFKA_CONNECT_JDBC]
|
||||||
|
self._validation_rules = [vu.at_least(1, KAFKA)]
|
@ -21,6 +21,7 @@ from sahara.plugins.mapr.services.hive import hive
|
|||||||
from sahara.plugins.mapr.services.httpfs import httpfs
|
from sahara.plugins.mapr.services.httpfs import httpfs
|
||||||
from sahara.plugins.mapr.services.hue import hue
|
from sahara.plugins.mapr.services.hue import hue
|
||||||
from sahara.plugins.mapr.services.impala import impala
|
from sahara.plugins.mapr.services.impala import impala
|
||||||
|
from sahara.plugins.mapr.services.kafka import kafka
|
||||||
from sahara.plugins.mapr.services.mahout import mahout
|
from sahara.plugins.mapr.services.mahout import mahout
|
||||||
from sahara.plugins.mapr.services.management import management as mng
|
from sahara.plugins.mapr.services.management import management as mng
|
||||||
from sahara.plugins.mapr.services.maprfs import maprfs
|
from sahara.plugins.mapr.services.maprfs import maprfs
|
||||||
@ -65,6 +66,9 @@ class VersionHandler(bvh.BaseVersionHandler):
|
|||||||
swift.Swift(),
|
swift.Swift(),
|
||||||
sentry.SentryV16(),
|
sentry.SentryV16(),
|
||||||
spark.SparkOnYarnV201(),
|
spark.SparkOnYarnV201(),
|
||||||
|
kafka.Kafka(),
|
||||||
|
kafka.KafkaConnect(),
|
||||||
|
kafka.KafkaRest(),
|
||||||
]
|
]
|
||||||
|
|
||||||
def get_context(self, cluster, added=None, removed=None):
|
def get_context(self, cluster, added=None, removed=None):
|
||||||
|
Loading…
Reference in New Issue
Block a user