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

Golang mesosproto.FrameworkID类代码示例

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

本文整理汇总了Golang中github.com/mesos/mesos-go/mesosproto.FrameworkID的典型用法代码示例。如果您正苦于以下问题:Golang FrameworkID类的具体用法?Golang FrameworkID怎么用?Golang FrameworkID使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: Registered

func (s *StackDeployScheduler) Registered(driver scheduler.SchedulerDriver, id *mesos.FrameworkID, master *mesos.MasterInfo) {
	Logger.Info("[Registered] framework: %s master: %s:%d", id.GetValue(), master.GetHostname(), master.GetPort())

	s.Storage.FrameworkID = id.GetValue()
	s.Storage.Save()
	s.driver = driver
}
开发者ID:elodina,项目名称:stack-deploy,代码行数:7,代码来源:scheduler.go


示例2: PersistFrameworkID

func PersistFrameworkID(
	fwid *mesos.FrameworkID,
	zkServers []string,
	zkChroot string,
	frameworkName string,
) error {
	c, _, err := zk.Connect(zkServers, RPC_TIMEOUT)
	if err != nil {
		return err
	}
	defer c.Close()
	// attempt to create the path
	_, err = c.Create(
		zkChroot,
		[]byte(""),
		0,
		zk.WorldACL(zk.PermAll),
	)
	if err != nil && err != zk.ErrNodeExists {
		return err
	}
	// attempt to write framework ID to <path> / <frameworkName>
	_, err = c.Create(zkChroot+"/"+frameworkName+"_framework_id",
		[]byte(fwid.GetValue()),
		0,
		zk.WorldACL(zk.PermAll))
	// TODO(tyler) when err is zk.ErrNodeExists, cross-check value
	if err != nil {
		return err
	}
	log.Info("Successfully persisted Framework ID to zookeeper.")

	return nil
}
开发者ID:puppetizeme,项目名称:etcd-mesos,代码行数:34,代码来源:zk.go


示例3: Registered

// Registered is called when the Scheduler is Registered
func (s *eremeticScheduler) Registered(driver sched.SchedulerDriver, frameworkID *mesos.FrameworkID, masterInfo *mesos.MasterInfo) {
	log.Debugf("Framework %s registered with master %s", frameworkID.GetValue(), masterInfo.GetHostname())
	if !s.initialised {
		driver.ReconcileTasks([]*mesos.TaskStatus{})
		s.initialised = true
	} else {
		s.Reconcile(driver)
	}
}
开发者ID:keis,项目名称:eremetic,代码行数:10,代码来源:scheduler.go


示例4: Registered

func (s *Scheduler) Registered(driver scheduler.SchedulerDriver, id *mesos.FrameworkID, master *mesos.MasterInfo) {
	Logger.Infof("[Registered] framework: %s master: %s:%d", id.GetValue(), master.GetHostname(), master.GetPort())

	s.cluster.frameworkID = id.GetValue()
	s.cluster.Save()

	s.driver = driver
	s.reconcileTasks(true)
}
开发者ID:elodina,项目名称:go-kafka-client-mesos,代码行数:9,代码来源:scheduler.go


示例5: Registered

// Registered is called when the Scheduler is Registered
func (s *Scheduler) Registered(driver mesossched.SchedulerDriver, frameworkID *mesosproto.FrameworkID, masterInfo *mesosproto.MasterInfo) {
	logrus.WithFields(logrus.Fields{
		"framework_id": frameworkID.GetValue(),
		"master_id":    masterInfo.GetId(),
		"master":       masterInfo.GetHostname(),
	}).Debug("Framework registered with master.")

	if !s.initialised {
		driver.ReconcileTasks([]*mesosproto.TaskStatus{})
		s.initialised = true
	} else {
		s.Reconcile(driver)
	}
}
开发者ID:klarna,项目名称:eremetic,代码行数:15,代码来源:scheduler.go


示例6: Registered

// Registered method for registered mesos framework
func (c *Cluster) Registered(driver mesosscheduler.SchedulerDriver, fwID *mesosproto.FrameworkID, masterInfo *mesosproto.MasterInfo) {
	log.WithFields(log.Fields{"name": "mesos", "frameworkId": fwID.GetValue()}).Debug("Framework registered")
}
开发者ID:nagyistoce,项目名称:ms-docker-swarm,代码行数:4,代码来源:driver.go


示例7: Registered

func (s *Scheduler) Registered(driver scheduler.SchedulerDriver, id *mesos.FrameworkID, master *mesos.MasterInfo) {
	Logger.Infof("[Registered] framework: %s master: %s:%d", id.GetValue(), master.GetHostname(), master.GetPort())

	s.driver = driver
}
开发者ID:elodina,项目名称:syscol,代码行数:5,代码来源:scheduler.go


示例8: Registered

func (sched *NoneScheduler) Registered(driver sched.SchedulerDriver, frameworkId *mesos.FrameworkID, masterInfo *mesos.MasterInfo) {
	log.Infoln("Framework Registered with Master", masterInfo)
	sched.frameworkId = frameworkId.GetValue()
}
开发者ID:felixb,项目名称:none,代码行数:4,代码来源:scheduler.go


示例9: Registered

func (sched *testScheduler) Registered(dr SchedulerDriver, fw *mesos.FrameworkID, mi *mesos.MasterInfo) {
	log.Infoln("Sched.Registered() called.")
	sched.s.Equal(fw.GetValue(), sched.s.registeredFrameworkId.GetValue(), "driver did not register the expected framework ID")
	sched.s.Equal(mi.GetIp(), uint32(123456))
	sched.ch <- true
}
开发者ID:elodina,项目名称:stack-deploy,代码行数:6,代码来源:scheduler_intgr_test.go


示例10: Registered

func (self *MesosManager) Registered(driver sched.SchedulerDriver, fid *mesos.FrameworkID, mi *mesos.MasterInfo) {
	log.Printf("OnRegisterd master:%v:%v, frameworkId:%v", Inet_itoa(mi.GetIp()), mi.GetPort(), fid.GetValue())

}
开发者ID:kellrott,项目名称:agro,代码行数:4,代码来源:scheduler.go


示例11: Registered

// Registered is called when the Scheduler is Registered
func (s *eremeticScheduler) Registered(_ sched.SchedulerDriver, frameworkID *mesos.FrameworkID, masterInfo *mesos.MasterInfo) {
	log.Debugf("Framework %s registered with master %s", frameworkID.GetValue(), masterInfo.GetHostname())
}
开发者ID:mommel,项目名称:eremetic,代码行数:4,代码来源:scheduler.go


示例12: Registered

func (sched *MesosRunonceScheduler) Registered(driver sched.SchedulerDriver, frameworkId *mesos.FrameworkID, masterInfo *mesos.MasterInfo) {
	log.V(1).Infoln("Framework Registered with Master ", masterInfo)
	_frameworkId = frameworkId.GetValue()
	fmt.Println("Registered with master and given framework ID:", _frameworkId)
}
开发者ID:yp-engineering,项目名称:mesos-runonce,代码行数:5,代码来源:main.go



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Golang mesosproto.FrameworkInfo类代码示例发布时间:2022-05-28
下一篇:
Golang mesosproto.ExecutorInfo类代码示例发布时间:2022-05-28
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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