Documentation ¶
Index ¶
- type ElodinaTransport
- func (this *ElodinaTransport) GetAssignment() []consumer.TopicAndPartition
- func (this *ElodinaTransport) GetConnectUrl() string
- func (this *ElodinaTransport) GetStalePartitions() []*PartitionState
- func (this *ElodinaTransport) GetState() map[string]map[int]*PartitionState
- func (this *ElodinaTransport) GetTask() *mesos.TaskInfo
- func (this *ElodinaTransport) IsPending() bool
- func (this *ElodinaTransport) UpdateOffset(topic string, partition int, offset int)
- type ElodinaTransportScheduler
- func (this *ElodinaTransportScheduler) Disconnected(driver scheduler.SchedulerDriver)
- func (this *ElodinaTransportScheduler) Error(driver scheduler.SchedulerDriver, err string)
- func (this *ElodinaTransportScheduler) ExecutorLost(scheduler scheduler.SchedulerDriver, executorId *mesos.ExecutorID, ...)
- func (this *ElodinaTransportScheduler) FrameworkMessage(driver scheduler.SchedulerDriver, executorId *mesos.ExecutorID, ...)
- func (this *ElodinaTransportScheduler) GetTopicPartitions() (*consumer.TopicAndPartitionSet, error)
- func (this *ElodinaTransportScheduler) OfferRescinded(driver scheduler.SchedulerDriver, offerId *mesos.OfferID)
- func (this *ElodinaTransportScheduler) Registered(driver scheduler.SchedulerDriver, frameworkId *mesos.FrameworkID, ...)
- func (this *ElodinaTransportScheduler) Reregistered(driver scheduler.SchedulerDriver, masterInfo *mesos.MasterInfo)
- func (this *ElodinaTransportScheduler) ResourceOffers(driver scheduler.SchedulerDriver, offers []*mesos.Offer)
- func (this *ElodinaTransportScheduler) Shutdown(driver scheduler.SchedulerDriver)
- func (this *ElodinaTransportScheduler) SlaveLost(driver scheduler.SchedulerDriver, slaveId *mesos.SlaveID)
- func (this *ElodinaTransportScheduler) StatusUpdate(driver scheduler.SchedulerDriver, status *mesos.TaskStatus)
- type ElodinaTransportSchedulerConfig
- type HttpMirrorExecutor
- func (this *HttpMirrorExecutor) Assign(tps []consumer.TopicAndPartition)
- func (this *HttpMirrorExecutor) Disconnected(executor.ExecutorDriver)
- func (this *HttpMirrorExecutor) Error(driver executor.ExecutorDriver, err string)
- func (this *HttpMirrorExecutor) FrameworkMessage(driver executor.ExecutorDriver, msg string)
- func (this *HttpMirrorExecutor) KillTask(_ executor.ExecutorDriver, taskId *mesos.TaskID)
- func (this *HttpMirrorExecutor) LaunchTask(driver executor.ExecutorDriver, taskInfo *mesos.TaskInfo)
- func (this *HttpMirrorExecutor) MirrorMessage(topic string, partition int32, messages []*siesta.MessageAndOffset) error
- func (this *HttpMirrorExecutor) Registered(driver executor.ExecutorDriver, execInfo *mesos.ExecutorInfo, ...)
- func (this *HttpMirrorExecutor) Reregistered(driver executor.ExecutorDriver, slaveInfo *mesos.SlaveInfo)
- func (this *HttpMirrorExecutor) Shutdown(executor.ExecutorDriver)
- type OfferAndResources
- type PartitionState
- type TransferMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ElodinaTransport ¶
type ElodinaTransport struct {
// contains filtered or unexported fields
}
func NewElodinaTransport ¶
func (*ElodinaTransport) GetAssignment ¶
func (this *ElodinaTransport) GetAssignment() []consumer.TopicAndPartition
func (*ElodinaTransport) GetConnectUrl ¶
func (this *ElodinaTransport) GetConnectUrl() string
func (*ElodinaTransport) GetStalePartitions ¶
func (this *ElodinaTransport) GetStalePartitions() []*PartitionState
func (*ElodinaTransport) GetState ¶
func (this *ElodinaTransport) GetState() map[string]map[int]*PartitionState
func (*ElodinaTransport) GetTask ¶
func (this *ElodinaTransport) GetTask() *mesos.TaskInfo
func (*ElodinaTransport) IsPending ¶
func (this *ElodinaTransport) IsPending() bool
func (*ElodinaTransport) UpdateOffset ¶
func (this *ElodinaTransport) UpdateOffset(topic string, partition int, offset int)
type ElodinaTransportScheduler ¶
type ElodinaTransportScheduler struct { TakenTopicPartitions *consumer.TopicAndPartitionSet // contains filtered or unexported fields }
func NewElodinaTransportScheduler ¶
func NewElodinaTransportScheduler(config ElodinaTransportSchedulerConfig) *ElodinaTransportScheduler
func (*ElodinaTransportScheduler) Disconnected ¶
func (this *ElodinaTransportScheduler) Disconnected(driver scheduler.SchedulerDriver)
mesos.Scheduler interface method. Invoked when the scheduler becomes "disconnected" from the master.
func (*ElodinaTransportScheduler) Error ¶
func (this *ElodinaTransportScheduler) Error(driver scheduler.SchedulerDriver, err string)
mesos.Scheduler interface method. Invoked when there is an unrecoverable error in the scheduler or scheduler driver.
func (*ElodinaTransportScheduler) ExecutorLost ¶
func (this *ElodinaTransportScheduler) ExecutorLost(scheduler scheduler.SchedulerDriver, executorId *mesos.ExecutorID, slaveId *mesos.SlaveID, exitCode int)
mesos.Scheduler interface method. Invoked when an executor has exited/terminated.
func (*ElodinaTransportScheduler) FrameworkMessage ¶
func (this *ElodinaTransportScheduler) FrameworkMessage(driver scheduler.SchedulerDriver, executorId *mesos.ExecutorID, slaveId *mesos.SlaveID, message string)
mesos.Scheduler interface method. Invoked when an executor sends a message.
func (*ElodinaTransportScheduler) GetTopicPartitions ¶
func (this *ElodinaTransportScheduler) GetTopicPartitions() (*consumer.TopicAndPartitionSet, error)
func (*ElodinaTransportScheduler) OfferRescinded ¶
func (this *ElodinaTransportScheduler) OfferRescinded(driver scheduler.SchedulerDriver, offerId *mesos.OfferID)
mesos.Scheduler interface method. Invoked when an offer is no longer valid.
func (*ElodinaTransportScheduler) Registered ¶
func (this *ElodinaTransportScheduler) Registered(driver scheduler.SchedulerDriver, frameworkId *mesos.FrameworkID, masterInfo *mesos.MasterInfo)
mesos.Scheduler interface method. Invoked when the scheduler successfully registers with a Mesos master.
func (*ElodinaTransportScheduler) Reregistered ¶
func (this *ElodinaTransportScheduler) Reregistered(driver scheduler.SchedulerDriver, masterInfo *mesos.MasterInfo)
mesos.Scheduler interface method. Invoked when the scheduler re-registers with a newly elected Mesos master.
func (*ElodinaTransportScheduler) ResourceOffers ¶
func (this *ElodinaTransportScheduler) ResourceOffers(driver scheduler.SchedulerDriver, offers []*mesos.Offer)
mesos.Scheduler interface method. Invoked when resources have been offered to this framework.
func (*ElodinaTransportScheduler) Shutdown ¶
func (this *ElodinaTransportScheduler) Shutdown(driver scheduler.SchedulerDriver)
Gracefully shuts down all running tasks.
func (*ElodinaTransportScheduler) SlaveLost ¶
func (this *ElodinaTransportScheduler) SlaveLost(driver scheduler.SchedulerDriver, slaveId *mesos.SlaveID)
mesos.Scheduler interface method. Invoked when a slave has been determined unreachable
func (*ElodinaTransportScheduler) StatusUpdate ¶
func (this *ElodinaTransportScheduler) StatusUpdate(driver scheduler.SchedulerDriver, status *mesos.TaskStatus)
mesos.Scheduler interface method. Invoked when the status of a task has changed.
type ElodinaTransportSchedulerConfig ¶
type ElodinaTransportSchedulerConfig struct { Topics []string // Number of CPUs allocated for each created Mesos task. CpuPerTask float64 // Number of RAM allocated for each created Mesos task. MemPerTask float64 // Artifact server host name. Will be used to fetch the executor. ServiceHost string // Artifact server port.Will be used to fetch the executor. ServicePort int // Name of the executor binary file contained in the executor archive. ExecutorBinaryName string // Maximum retries to kill a task. KillTaskRetries int // time after partition is considered stale StaleDuration time.Duration // Mirror configuration ConsumerConfig consumer.PartitionConsumerConfig // Threads per task ThreadsPerTask int // Target produce URL TargetURL string //SSL certificate file path SSLCertFilePath string //SSL key file path SSLKeyFilePath string //SSL CA certificate file path SSLCACertFilePath string //Elodina API key ApiKey string //Elodina API user ApiUser string //Disable certificate verification Insecure bool }
func NewElodinaTransportSchedulerConfig ¶
func NewElodinaTransportSchedulerConfig() ElodinaTransportSchedulerConfig
type HttpMirrorExecutor ¶
type HttpMirrorExecutor struct {
// contains filtered or unexported fields
}
func NewHttpMirrorExecutor ¶
func NewHttpMirrorExecutor(apiKey, apiUser, certFile, keyFile, caFile, targetURL string, insecure bool) *HttpMirrorExecutor
Creates a new HttpMirrorExecutor with a given config.
func (*HttpMirrorExecutor) Assign ¶
func (this *HttpMirrorExecutor) Assign(tps []consumer.TopicAndPartition)
func (*HttpMirrorExecutor) Disconnected ¶
func (this *HttpMirrorExecutor) Disconnected(executor.ExecutorDriver)
mesos.Executor interface method. Invoked when the executor becomes "disconnected" from the slave.
func (*HttpMirrorExecutor) Error ¶
func (this *HttpMirrorExecutor) Error(driver executor.ExecutorDriver, err string)
mesos.Executor interface method. Invoked when a fatal error has occured with the executor and/or executor driver.
func (*HttpMirrorExecutor) FrameworkMessage ¶
func (this *HttpMirrorExecutor) FrameworkMessage(driver executor.ExecutorDriver, msg string)
mesos.Executor interface method. Invoked when a framework message has arrived for this executor.
func (*HttpMirrorExecutor) KillTask ¶
func (this *HttpMirrorExecutor) KillTask(_ executor.ExecutorDriver, taskId *mesos.TaskID)
mesos.Executor interface method. Invoked when a task running within this executor has been killed.
func (*HttpMirrorExecutor) LaunchTask ¶
func (this *HttpMirrorExecutor) LaunchTask(driver executor.ExecutorDriver, taskInfo *mesos.TaskInfo)
mesos.Executor interface method. Invoked when a task has been launched on this executor.
func (*HttpMirrorExecutor) MirrorMessage ¶
func (this *HttpMirrorExecutor) MirrorMessage(topic string, partition int32, messages []*siesta.MessageAndOffset) error
func (*HttpMirrorExecutor) Registered ¶
func (this *HttpMirrorExecutor) Registered(driver executor.ExecutorDriver, execInfo *mesos.ExecutorInfo, fwinfo *mesos.FrameworkInfo, slaveInfo *mesos.SlaveInfo)
mesos.Executor interface method. Invoked once the executor driver has been able to successfully connect with Mesos. Not used by HttpMirrorExecutor yet.
func (*HttpMirrorExecutor) Reregistered ¶
func (this *HttpMirrorExecutor) Reregistered(driver executor.ExecutorDriver, slaveInfo *mesos.SlaveInfo)
mesos.Executor interface method. Invoked when the executor re-registers with a restarted slave.
func (*HttpMirrorExecutor) Shutdown ¶
func (this *HttpMirrorExecutor) Shutdown(executor.ExecutorDriver)
mesos.Executor interface method. Invoked when the executor should terminate all of its currently running tasks.
type OfferAndResources ¶
type OfferAndResources struct { RemainingCpu float64 RemainingMemory float64 RemainingPorts []*mesos.Value_Range Offer *mesos.Offer }
func NewOfferState ¶
func NewOfferState(offer *mesos.Offer) *OfferAndResources
type PartitionState ¶
type PartitionState struct {
// contains filtered or unexported fields
}
func NewPartitionState ¶
func NewPartitionState(topic string, partition int) *PartitionState
func (*PartitionState) Update ¶
func (this *PartitionState) Update(offset int)
type TransferMessage ¶
type TransferMessage struct { Topic string `json:"topic"` Partition int32 `json:"partition"` Data []byte `json:"data"` }
func EncodeMessage ¶
func EncodeMessage(topic string, partition int32, messages []*siesta.MessageAndOffset) []*TransferMessage