func NewRiakNode(taskInfo *mesos.TaskInfo, executor *ExecutorCore) *RiakNode { taskData, err := common.DeserializeTaskData(taskInfo.Data) if err != nil { log.Panic("Got error", err) } log.Infof("Deserialized task data: %+v", taskData) mgr := metamgr.NewMetadataManager(taskData.FrameworkName, taskData.Zookeepers) return &RiakNode{ executor: executor, taskInfo: taskInfo, running: false, metadataManager: mgr, taskData: taskData, } }
func NewRiakNode(taskInfo *mesos.TaskInfo, executor *ExecutorCore) *RiakNode { taskData, err := common.DeserializeTaskData(taskInfo.Data) if err != nil { log.Panic("Got error", err) } log.Infof("Deserialized task data: %+v", taskData) mgr := metamgr.NewMetadataManager(taskData.FrameworkName, taskData.Zookeepers) killStatus := &mesos.TaskStatus{ TaskId: taskInfo.GetTaskId(), State: mesos.TaskState_TASK_FAILED.Enum(), } return &RiakNode{ executor: executor, taskInfo: taskInfo, running: false, metadataManager: mgr, taskData: taskData, killStatus: killStatus, } }