当前位置: 首页>>代码示例>>Python>>正文


Python OozieServerProvider.setup_class方法代码示例

本文整理汇总了Python中liboozie.oozie_api_test.OozieServerProvider.setup_class方法的典型用法代码示例。如果您正苦于以下问题:Python OozieServerProvider.setup_class方法的具体用法?Python OozieServerProvider.setup_class怎么用?Python OozieServerProvider.setup_class使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在liboozie.oozie_api_test.OozieServerProvider的用法示例。


在下文中一共展示了OozieServerProvider.setup_class方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setUp

# 需要导入模块: from liboozie.oozie_api_test import OozieServerProvider [as 别名]
# 或者: from liboozie.oozie_api_test.OozieServerProvider import setup_class [as 别名]
  def setUp(self):
    OozieServerProvider.setup_class()
    self.cluster.fs.do_as_user('test', self.cluster.fs.create_home_dir, '/user/jobsub_test')
    self.cluster.fs.do_as_superuser(self.cluster.fs.chmod, '/user/jobsub_test', 0777, True)
    self.client = make_logged_in_client(username='jobsub_test')

    # Ensure access to MR folder
    self.cluster.fs.do_as_superuser(self.cluster.fs.chmod, '/tmp', 0777, recursive=True)
开发者ID:chanshik,项目名称:hue,代码行数:10,代码来源:tests.py

示例2: setup_class

# 需要导入模块: from liboozie.oozie_api_test import OozieServerProvider [as 别名]
# 或者: from liboozie.oozie_api_test.OozieServerProvider import setup_class [as 别名]
  def setup_class(cls):
    OozieServerProvider.setup_class()
    if not cls.cluster.fs.exists("/tmp"):
      cls.cluster.fs.do_as_superuser(cls.cluster.fs.mkdir, "/tmp")
    cls.cluster.fs.do_as_superuser(cls.cluster.fs.chmod, "/tmp", 0777)

    # Install examples
    import jobsub.management.commands.jobsub_setup as jobsub_setup
    if not jobsub_setup.Command().has_been_setup():
      jobsub_setup.Command().handle()

    cls.sleep_design_id = OozieDesign.objects.get(name='sleep_job').id
开发者ID:lalaguozhe,项目名称:hue,代码行数:14,代码来源:tests.py

示例3: setUp

# 需要导入模块: from liboozie.oozie_api_test import OozieServerProvider [as 别名]
# 或者: from liboozie.oozie_api_test.OozieServerProvider import setup_class [as 别名]
  def setUp(self):
    OozieServerProvider.setup_class()
    self.cluster.fs.do_as_user('test', self.cluster.fs.create_home_dir, '/user/jobsub_test')
    self.cluster.fs.do_as_superuser(self.cluster.fs.chmod, '/user/jobsub_test', 0777, True)
    self.client = make_logged_in_client(username='jobsub_test')

    # Ensure access to MR folder.
    # Need to chmod because jobs are submitted as a
    # different user than what was previously used.
    for i in range(0,10):
      try:
        self.cluster.fs.do_as_superuser(self.cluster.fs.chmod, '/tmp', 0777, recursive=True)
        break
      except Exception, e:
        # chmod failure likely do to async processing of resource deletion.
        # If the directory has improper permissions, should fail later in the test case.
        LOG.warn("Received the following exception while change mode attempt %d of /tmp: %s" % (i, str(e)))
        time.sleep(1)
开发者ID:2013Commons,项目名称:HUE-SHARK,代码行数:20,代码来源:tests.py

示例4: setup_class

# 需要导入模块: from liboozie.oozie_api_test import OozieServerProvider [as 别名]
# 或者: from liboozie.oozie_api_test.OozieServerProvider import setup_class [as 别名]
 def setup_class(cls):
   OozieServerProvider.setup_class()
   if not cls.cluster.fs.exists("/tmp"):
     cls.cluster.fs.do_as_superuser(cls.cluster.fs.mkdir, "/tmp")
   cls.cluster.fs.do_as_superuser(cls.cluster.fs.chmod, "/tmp", 0777)
开发者ID:agibsonccc,项目名称:hue,代码行数:7,代码来源:tests.py

示例5: setup_class

# 需要导入模块: from liboozie.oozie_api_test import OozieServerProvider [as 别名]
# 或者: from liboozie.oozie_api_test.OozieServerProvider import setup_class [as 别名]
 def setup_class(cls):
   OozieServerProvider.setup_class()
开发者ID:Web5design,项目名称:hue,代码行数:4,代码来源:tests.py

示例6: setUp

# 需要导入模块: from liboozie.oozie_api_test import OozieServerProvider [as 别名]
# 或者: from liboozie.oozie_api_test.OozieServerProvider import setup_class [as 别名]
 def setUp(self):
   OozieServerProvider.setup_class()
   self.cluster.fs.do_as_user('test', self.cluster.fs.create_home_dir, '/user/test')
   self.cluster.fs.do_as_superuser(self.cluster.fs.chmod, '/user/test', 0777, True)
   self.client = make_logged_in_client()
开发者ID:takeshimiao,项目名称:hue,代码行数:7,代码来源:tests.py


注:本文中的liboozie.oozie_api_test.OozieServerProvider.setup_class方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。