Java Code Examples for org.apache.mesos.Protos#SlaveInfo

The following examples show how to use org.apache.mesos.Protos#SlaveInfo . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SingularityExecutor.java    From Singularity with Apache License 2.0 6 votes vote down vote up
/**
 * Invoked once the executor driver has been able to successfully
 * connect with Mesos. In particular, a scheduler can pass some
 * data to it's executors through the FrameworkInfo.ExecutorInfo's
 * data field.
 */
@Override
public void registered(
  ExecutorDriver executorDriver,
  Protos.ExecutorInfo executorInfo,
  Protos.FrameworkInfo frameworkInfo,
  Protos.SlaveInfo slaveInfo
) {
  LOG.debug(
    "Registered {} with Mesos slave {} for framework {}",
    executorInfo.getExecutorId().getValue(),
    slaveInfo.getId().getValue(),
    frameworkInfo.getId().getValue()
  );
  LOG.trace(
    "Registered {} with Mesos slave {} for framework {}",
    MesosUtils.formatForLogging(executorInfo),
    MesosUtils.formatForLogging(slaveInfo),
    MesosUtils.formatForLogging(frameworkInfo)
  );
}
 
Example 2
Source File: TaskExecutor.java    From shardingsphere-elasticjob-cloud with Apache License 2.0 5 votes vote down vote up
@Override
public void registered(final ExecutorDriver executorDriver, final Protos.ExecutorInfo executorInfo, final Protos.FrameworkInfo frameworkInfo, final Protos.SlaveInfo slaveInfo) {
    if (!executorInfo.getData().isEmpty()) {
        Map<String, String> data = SerializationUtils.deserialize(executorInfo.getData().toByteArray());
        BasicDataSource dataSource = new BasicDataSource();
        dataSource.setDriverClassName(data.get("event_trace_rdb_driver"));
        dataSource.setUrl(data.get("event_trace_rdb_url"));
        dataSource.setPassword(data.get("event_trace_rdb_password"));
        dataSource.setUsername(data.get("event_trace_rdb_username"));
        jobEventBus = new JobEventBus(new JobEventRdbConfiguration(dataSource));
    }
}
 
Example 3
Source File: CassandraExecutor.java    From dcos-cassandra-service with Apache License 2.0 5 votes vote down vote up
@Override
public void registered(ExecutorDriver driver,
                       Protos.ExecutorInfo executorInfo,
                       Protos.FrameworkInfo frameworkInfo,
                       Protos.SlaveInfo slaveInfo) {
    cassandraTaskFactory = new CassandraTaskFactory(driver);
    customExecutor = new CustomExecutor(clusterJobExecutorService, cassandraTaskFactory);
}
 
Example 4
Source File: TaskExecutor.java    From shardingsphere-elasticjob-cloud with Apache License 2.0 4 votes vote down vote up
@Override
public void reregistered(final ExecutorDriver executorDriver, final Protos.SlaveInfo slaveInfo) {
}
 
Example 5
Source File: MesosWorker.java    From twister2 with Apache License 2.0 4 votes vote down vote up
@Override
public void registered(ExecutorDriver executorDriver,
                       Protos.ExecutorInfo executorInfo,
                       Protos.FrameworkInfo frameworkInfo, Protos.SlaveInfo slaveInfo) {
}
 
Example 6
Source File: MesosWorker.java    From twister2 with Apache License 2.0 4 votes vote down vote up
@Override
public void reregistered(ExecutorDriver executorDriver,
                         Protos.SlaveInfo slaveInfo) {
}
 
Example 7
Source File: CassandraExecutor.java    From dcos-cassandra-service with Apache License 2.0 4 votes vote down vote up
@Override
public void reregistered(ExecutorDriver driver,
                         Protos.SlaveInfo slaveInfo) {
    customExecutor.reregistered(driver, slaveInfo);
}
 
Example 8
Source File: LogstashExecutor.java    From logstash with Apache License 2.0 4 votes vote down vote up
@Override
public void registered(ExecutorDriver driver, Protos.ExecutorInfo executorInfo,
                       Protos.FrameworkInfo frameworkInfo, Protos.SlaveInfo slaveInfo) {
    LOGGER.info("LogstashExecutor Logstash registered. slaveId={}", slaveInfo.getId());
}
 
Example 9
Source File: LogstashExecutor.java    From logstash with Apache License 2.0 4 votes vote down vote up
@Override
public void reregistered(ExecutorDriver driver, Protos.SlaveInfo slaveInfo) {
    LOGGER.info("LogstashExecutor Logstash re-registered. slaveId={}", slaveInfo.getId());
}
 
Example 10
Source File: SingularityExecutor.java    From Singularity with Apache License 2.0 4 votes vote down vote up
/**
 * Invoked when the executor re-registers with a restarted slave.
 */
@Override
public void reregistered(ExecutorDriver executorDriver, Protos.SlaveInfo slaveInfo) {
  LOG.debug("Re-registered with Mesos slave {}", slaveInfo.getId().getValue());
  LOG.info("Re-registered with Mesos slave {}", MesosUtils.formatForLogging(slaveInfo));
}
 
Example 11
Source File: HelloWorldExecutor.java    From tutorials with MIT License 4 votes vote down vote up
@Override
public void registered(ExecutorDriver driver, Protos.ExecutorInfo executorInfo, Protos.FrameworkInfo frameworkInfo, Protos.SlaveInfo slaveInfo) {
}
 
Example 12
Source File: HelloWorldExecutor.java    From tutorials with MIT License 4 votes vote down vote up
@Override
public void reregistered(ExecutorDriver driver, Protos.SlaveInfo slaveInfo) {
}