# Path: kafka-monitor/plugins/base_handler.py
# class BaseHandler(object):
#     '''
#     Base validator for handling incoming requests from kafka
#     '''
#     # override this with your own 'something.json' schema
#     schema = "NONE"
# 
#     def setup(self, settings):
#         '''
#         Setup the handler
# 
#         @param settings: The loaded settings file
#         '''
#         if self.schema == "NONE":
#             raise NotImplementedError("Please specify a schema for the kafka monitor")
# 
#     def handle(self, dict):
#         '''
#         Process a valid incoming request dict and handle any logic associated
#         with it
# 
#         @param dict: The valid request object
#         '''
#         raise NotImplementedError("Please implement handle() for your handler class")
# 
#     def _set_logger(self, logger):
#         '''
#         Set the logger
# 
#         @param logger: The LogObject
#         '''
#         self.logger = logger


from .base_handler import BaseHandler
from redis.exceptions import ConnectionError
import tldextract
import redis
import sys
from __future__ import absolute_import


class ActionHandler(BaseHandler):

    schema = "action_schema.json"


# Path: kafka-monitor/plugins/base_handler.py
# class BaseHandler(object):
#     '''
#     Base validator for handling incoming requests from kafka
#     '''
#     # override this with your own 'something.json' schema
#     schema = "NONE"
# 
#     def setup(self, settings):
#         '''
#         Setup the handler
# 
#         @param settings: The loaded settings file
#         '''
#         if self.schema == "NONE":
#             raise NotImplementedError("Please specify a schema for the kafka monitor")
# 
#     def handle(self, dict):
#         '''
#         Process a valid incoming request dict and handle any logic associated
#         with it
# 
#         @param dict: The valid request object
#         '''
#         raise NotImplementedError("Please implement handle() for your handler class")
# 
#     def _set_logger(self, logger):
#         '''
#         Set the logger
# 
#         @param logger: The LogObject
#         '''
#         self.logger = logger


# Path: kafka-monitor/plugins/action_handler.py
from .base_handler import BaseHandler
from redis.exceptions import ConnectionError
import tldextract
import redis
import sys

from __future__ import absolute_import


class ActionHandler(BaseHandler):

    schema = "action_schema.json"


    def setup(self, settings):