當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。