Beispiel #1
0
    def tear_down_jdbc_topology(cls, topologyName, useStandaloneCmd):
        """
            kills Jbbc topology.
        """
        from beaver.dbutil import MySQL

        Storm.killTopology(topologyName,
                           logoutput=True,
                           useStandaloneCmd=useStandaloneCmd)
        MySQL.runCmd("drop table user",
                     database="test",
                     host=mysqlnode,
                     user=Config.get('machine', 'MYSQL_ROOT_USER'))
        MySQL.runAsRoot("DROP DATABASE IF EXISTS test")
Beispiel #2
0
    def tear_down_hbase_topology(cls, topologyName, useStandaloneCmd):
        """
        tear down hbase topology.
        """
        from beaver.component.hbase import HBase

        Machine.rm(user=None,
                   host="localhost",
                   filepath=LOCAL_HBASE_WORK_DIR,
                   isdir=True,
                   passwd=None)

        Storm.killTopology(topologyName,
                           logoutput=True,
                           useStandaloneCmd=useStandaloneCmd)
        exit_code, stdout = HBase.dropTable(HBASE_TABLE_NAME, True, None)
        ruAssert("Storm", exit_code == 0)
Beispiel #3
0
    def tear_down_hdfs_topology(cls, topologyName, useStandaloneCmd):
        """
            kills hdfs topologies and deletes the hdfs directories.
        """
        Machine.rm(user=None,
                   host="localhost",
                   filepath=LOCAL_HDFS_WORK_DIR,
                   isdir=True,
                   passwd=None)

        Storm.killTopology(topologyName,
                           logoutput=True,
                           useStandaloneCmd=useStandaloneCmd)
        HDFS.deleteDirectory("/tmp/mySeqTopology", HDFS_USER)
        HDFS.deleteDirectory("/tmp/dest", HDFS_USER)
        HDFS.deleteDirectory("/tmp/dest2", HDFS_USER)
        HDFS.deleteDirectory("/tmp/foo", HDFS_USER)
        HDFS.deleteDirectory("/tmp/trident", HDFS_USER)
        HDFS.deleteDirectory("/tmp/trident-seq", HDFS_USER)
Beispiel #4
0
    def tear_down_hive_topology(cls, topologyName, useStandaloneCmd):
        """
        tear down hbase topology.
        """
        from beaver.component.hive import Hive

        Machine.rm(user=None,
                   host="localhost",
                   filepath=LOCAL_HIVE_WORK_DIR,
                   isdir=True,
                   passwd=None)

        Storm.killTopology(topologyName,
                           logoutput=True,
                           useStandaloneCmd=useStandaloneCmd)
        #Hive.restoreConfig(services=['metastore'])
        drop_table_q = "use %s; drop table if exists %s; " % (DATABASE_NAME,
                                                              HIVE_TABLE_NAME)
        exit_code, stdout = Hive.runQuery(
            cls.get_set_queue_cmd(useStandaloneCmd) + drop_table_q)
        ruAssert("Storm", exit_code == 0)