예제 #1
0
    def assert_installed(testcase, package_filename=None):
        # Verify that the package file exists
        if package_filename is None:
            _, package_filename = \
                SliderPrestoInstaller._detect_presto_package(testcase)

        si = SliderInstaller(testcase)
        keywords = si.get_keywords()
        hdfs_cmd = 'hdfs dfs -ls %s' % (os.path.join(
            '/', 'user', keywords[SLIDER_USER], '.slider', 'package',
            keywords[APPNAME], os.path.basename(package_filename)))
        testcase.cluster.exec_cmd_on_host(
            SliderPrestoInstaller._get_slider_master(testcase), hdfs_cmd,
            SliderPrestoInstaller._get_slider_user(testcase))

        # Verify that slider thinks the package is installed
        conf = get_config()
        slider_cmd = \
            "bash -c 'export HADOOP_CONF_DIR=%s ; %s package --list'" % (
                conf[HADOOP_CONF], get_slider_bin(conf))

        output = testcase.cluster.exec_cmd_on_host(
            SliderPrestoInstaller._get_slider_master(testcase),
            slider_cmd,
            user=SliderPrestoInstaller._get_slider_user(testcase))
        testcase.assertRegexpMatches(output, r'\b%s\b' % (conf[APPNAME]))
    def assert_installed(testcase, package_filename=None):
        # Verify that the package file exists
        if package_filename is None:
            _, package_filename = \
                SliderPrestoInstaller._detect_presto_package(testcase)

        si = SliderInstaller(testcase)
        keywords = si.get_keywords()
        hdfs_cmd = 'hdfs dfs -ls %s' % (
            os.path.join('/', 'user', keywords[SLIDER_USER], '.slider',
                         'package', keywords[APPNAME],
                         os.path.basename(package_filename))
        )
        testcase.cluster.exec_cmd_on_host(
            SliderPrestoInstaller._get_slider_master(testcase), hdfs_cmd,
            SliderPrestoInstaller._get_slider_user(testcase))

        # Verify that slider thinks the package is installed
        conf = get_config()
        slider_cmd = \
            "bash -c 'export HADOOP_CONF_DIR=%s ; %s package --list'" % (
                conf[HADOOP_CONF], get_slider_bin(conf))

        output = testcase.cluster.exec_cmd_on_host(
            SliderPrestoInstaller._get_slider_master(testcase), slider_cmd,
            user=SliderPrestoInstaller._get_slider_user(testcase))
        testcase.assertRegexpMatches(output, r'\b%s\b' % (conf[APPNAME]))
예제 #3
0
 def assert_installed(testcase, conf=get_config()):
     docker_conf = docker_config(conf)
     testcase.assert_path_exists(docker_conf[HOST],
                                 os.path.join(docker_conf[DIR], 'LICENSE'))
예제 #4
0
 def __init__(self, testcase, override=None):
     self.testcase = testcase
     self.conf = get_config(override)
 def test_slider_install_interactive(self):
     self.run_interactive(get_config())
 def test_slider_install(self):
     self.run_with_config(get_config())
 def test_slider_install_interactive_ip(self):
     ips = self.cluster.get_ip_address_dict()
     self.run_interactive(
         get_config(override={HOST: (ips[self.cluster.master],
                                     self.cluster.master)}))
 def test_slider_install_localhost(self):
     self.run_with_config(
         get_config(override={HOST: ('localhost', self.cluster.master)}))
예제 #9
0
 def assert_installed(testcase, conf=None):
     if not conf:
         conf = get_config(testcase.cluster)
     docker_conf = docker_config(conf)
     testcase.assert_path_exists(docker_conf[HOST],
                                 os.path.join(docker_conf[DIR], 'LICENSE'))
예제 #10
0
 def __init__(self, testcase, override=None):
     self.testcase = testcase
     self.conf = get_config(self.testcase.cluster, override)
예제 #11
0
 def test_slider_install_interactive(self):
     self.run_interactive(get_config())
예제 #12
0
 def test_slider_install(self):
     self.run_with_config(get_config())
예제 #13
0
 def test_slider_install_interactive_ip(self):
     ips = self.cluster.get_ip_address_dict()
     self.run_interactive(
         get_config(override={
             HOST: (ips[self.cluster.master], self.cluster.master)
         }))
예제 #14
0
 def test_slider_install_localhost(self):
     self.run_with_config(
         get_config(override={HOST: ('localhost', self.cluster.master)}))
예제 #15
0
 def assert_installed(testcase, conf=get_config()):
     docker_conf = docker_config(conf)
     testcase.assert_path_exists(docker_conf[HOST],
                                 os.path.join(docker_conf[DIR], 'LICENSE'))