• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python service.service函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中service.service函数的典型用法代码示例。如果您正苦于以下问题:Python service函数的具体用法?Python service怎么用?Python service使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: stop

  def stop(self, env):
    import params
    env.set_params(params)

    service('nodemanager',
            action='stop'
    )
开发者ID:OpenPOWER-BigData,项目名称:HDP-ambari,代码行数:7,代码来源:nodemanager.py


示例2: start

  def start(self, env, rolling_restart=False):
    import params
    env.set_params(params)
    self.configure(env)

    supervisord_service("supervisor", action="start")
    service("logviewer", action="start")
开发者ID:fanzhidongyzby,项目名称:ambari,代码行数:7,代码来源:supervisor_prod.py


示例3: start

  def start(self, env):
    import params
    env.set_params(params)
    self.configure(env)

    service("supervisor", action="start")
    service("logviewer", action="start")
开发者ID:OpenPOWER-BigData,项目名称:HDP-ambari,代码行数:7,代码来源:supervisor.py


示例4: start

 def start(self, env):
   import params
   env.set_params(params)
   self.configure(env)
   service('historyserver',
           action='start'
   )
开发者ID:duxia,项目名称:ambari,代码行数:7,代码来源:historyserver.py


示例5: start

 def start(self, env):
   import params
   env.set_params(params)
   self.configure(env) # FOR SECURITY
   service('jobtracker',
           action='start'
   )
开发者ID:wbear2,项目名称:ambari,代码行数:7,代码来源:jobtracker.py


示例6: start

    def start(self, env):
        import params

        env.set_params(params)
        self.configure(env)  # FOR SECURITY
        copy_tarballs_to_hdfs("mapreduce", params.mapred_user, params.hdfs_user, params.user_group)
        service("historyserver", action="start", serviceName="mapreduce")
开发者ID:duxia,项目名称:ambari,代码行数:7,代码来源:historyserver.py


示例7: start

  def start(self, env, rolling_restart=False):
    import params
    env.set_params(params)
    self.configure(env) # FOR SECURITY
    service('timelineserver', action='start')

    Links(params.new_yarn_log_path, params.yarn_log_path)
开发者ID:chinpeng,项目名称:ambari,代码行数:7,代码来源:application_timeline_server.py


示例8: start

    def start(self, env):
        import params

        env.set_params(params)
        self.configure(env)

        service("drpc", action="start")
开发者ID:fanzhidongyzby,项目名称:ambari,代码行数:7,代码来源:drpc_server.py


示例9: start

  def start(self, env):
    import params

    env.set_params(params)
    self.configure(env) # FOR SECURITY
    service('resourcemanager',
            action='start'
    )
开发者ID:OpenPOWER-BigData,项目名称:HDP-ambari,代码行数:8,代码来源:resourcemanager.py


示例10: stop

  def stop(self, env, rolling_restart=False):
    import params

    env.set_params(params)

    service('resourcemanager',
            action='stop'
    )
开发者ID:fanzhidongyzby,项目名称:ambari,代码行数:8,代码来源:resourcemanager.py


示例11: start

  def start(self, env, rolling_restart=False):
    import params

    env.set_params(params)
    self.configure(env) # FOR SECURITY
    if params.has_ranger_admin and params.is_supported_yarn_ranger:
      setup_ranger_yarn() #Ranger Yarn Plugin related calls
    service('resourcemanager', action='start')
开发者ID:andreysabitov,项目名称:ambari-mantl,代码行数:8,代码来源:resourcemanager.py


示例12: refreshqueues

  def refreshqueues(self, env):
    import params

    self.configure(env)
    env.set_params(params)

    service('resourcemanager',
            action='refreshQueues'
    )
开发者ID:OpenPOWER-BigData,项目名称:HDP-ambari,代码行数:9,代码来源:resourcemanager.py


示例13: start

  def start(self, env, rolling_restart=False):
    import params
    env.set_params(params)
    self.configure(env) # FOR SECURITY
    service('nodemanager',action='start')

    Links(params.new_yarn_nodemanager_local_dirs_path, params.yarn_nodemanager_local_dirs_paths)
    Links(params.new_yarn_nodemanager_log_dirs_path, params.yarn_nodemanager_log_dirs_paths)
    Links(params.new_yarn_log_path, params.yarn_log_path)
开发者ID:chinpeng,项目名称:ambari,代码行数:9,代码来源:nodemanager.py


示例14: start

  def start(self, env, upgrade_type=None):
    import params

    env.set_params(params)
    self.configure(env) # FOR SECURITY
    if params.has_ranger_admin and params.is_supported_yarn_ranger:
      setup_ranger_yarn() #Ranger Yarn Plugin related calls

    # wait for active-dir and done-dir to be created by ATS if needed
    if params.has_ats:
      Logger.info("Verifying DFS directories where ATS stores time line data for active and completed applications.")
      self.wait_for_dfs_directories_created(params.entity_groupfs_store_dir, params.entity_groupfs_active_dir)

    service('resourcemanager', action='start')
开发者ID:OpenPOWER-BigData,项目名称:HDP-ambari,代码行数:14,代码来源:resourcemanager.py


示例15: main

def main():
        
        config = ConfigParser.SafeConfigParser()
        config.read('/opt/raumServiceDeamon/src/deamon.cfg')
        
        dataPool = {'security': {'motion': False, 'door': False, 'motion_C': "CLOSED"}, 'weather': {'out': 0.0, 'rain': False, 'in': 0.0}}

        checkRRD(config)
        
        signal.signal(signal.SIGINT, kill_signal_handler)
        signal.signal(signal.SIGTERM, kill_signal_handler)
        
        #fillDummyData(dataPool) # DEBUG
        
        t = UploadDeamon(config, dataPool)
        t.start()

        tem = temperatur(config, dataPool)
        tem.start()
        
        sec = security(config, dataPool, t)
        sec.start()
        
        gra = graph(config)
        gra.start()
        
        global ser
        ser = service(dataPool)
        ser.start()
开发者ID:C3MA,项目名称:c3ma_roomservice,代码行数:29,代码来源:c3ma_deamon.py


示例16: start

  def start(self, env, rolling_restart=False):
    import params
    env.set_params(params)
    self.configure(env) # FOR SECURITY

    if params.hdp_stack_version_major and compare_versions(params.hdp_stack_version_major, '2.2.0.0') >= 0:
      # MC Hammer said, "Can't touch this"
      resource_created = copy_to_hdfs("mapreduce", params.user_group, params.hdfs_user)
      resource_created = copy_to_hdfs("tez", params.user_group, params.hdfs_user) or resource_created
      if resource_created:
        params.HdfsResource(None, action="execute")
    else:
      # In HDP 2.1, tez.tar.gz was copied to a different folder in HDFS.
      install_tez_jars()

    service('historyserver', action='start', serviceName='mapreduce')
开发者ID:andreysabitov,项目名称:ambari-mantl,代码行数:16,代码来源:historyserver.py


示例17: _channelInfoRequest

 def _channelInfoRequest(self):
     requestInfo = dict(part = "contentDetails,snippet,statistics")
     
     if self.mine:           requestInfo['mine'] = True
     elif self.channelId:    requestInfo['id'] = self.channelId
     else:                   requestInfo['forUsername'] = self.username
     
     request = service.service().channels().list(**requestInfo)
     return request 
开发者ID:SportySpice,项目名称:Collections,代码行数:9,代码来源:Channel.py


示例18: getUpdateRequest

 def getUpdateRequest(self):
     request = service.service().playlistItems().list(part="snippet", playlistId=self.id, maxResults=self.limit)
     
     def callback(request_id, response, exception):
         if exception is not None:
             raise ValueError('Exception thrown in update playlist videos http request from batch. Request ID: %s \nException: %s' %(request_id,exception))
         else:
             self._processUpdateResponse(response)
             
     return (request, callback)
开发者ID:tonymeds,项目名称:Collections,代码行数:10,代码来源:Playlist.py


示例19: fetch

def fetch():    
    request = service.service().guideCategories().list(part='snippet', regionCode=regionCode)
    response = request.execute()
    
    categories = []
        
    for item in response['items']:
        category = Category.fromCategoryList(item)
        categories.append(category)
        
    return categories
开发者ID:SportySpice,项目名称:Collections,代码行数:11,代码来源:categoryList.py


示例20: getInitialRequest

    def getInitialRequest(self):
        request = service.service().playlists().list(part = "snippet", id=self.id)
        
        def callback(request_id, response, exception):
            if exception is not None:
                raise ValueError(str.format('Exception thrown in initial playlist info http request from batch. \nRequest ID: {0}. Playlist ID: {1}. \nException: {2}', request_id, self.id, exception))
            else:
                self._processInitialResponse(response)
                

        return (request, callback)
开发者ID:tonymeds,项目名称:Collections,代码行数:11,代码来源:Playlist.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python service.Service类代码示例发布时间:2022-05-27
下一篇:
Python service.get_backend_core_proxy函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap