Example #1
0
 def __init__(self, db, table):
     """
     :param db:
     :param table:
     :return:
     """
     self.database = db
     self.table = table
     self.shell_exec = ShellExecutor()
Example #2
0
    def __init__(self,config_file=None):
        """
        :param topic: Dataset's Trinity topic name
        :param db: Dataset's Thrive database name in Hive
        :table: Dataset's Thrive table name in Hive
        :return:
        """
        self.parser = SafeConfigParser()
        self.parser.read(config_file)

        self.topic = self.get_config("topic_name")
        self.database = self.get_config("database_name")
        self.table = self.get_config("table_name")
        self.connection_info = self.get_config("connection_info")
        self.metadata_mgr = MetadataManager(self.connection_info,self.table,self.topic)
        self.hdfs_mgr = hdfsManager(self.topic)
        self.hive_mng = HiveManager(self.database,self.table)
        self.shell_exec = ShellExecutor()
        self.loadts = datetime.now()

        self.hdfs_topic = "idea-flowview"