@Override public void start() throws Exception { final NodeEndpoint endpoint = context.get().getEndpoint(); endpointName = endpoint.getAddress() + ":" + endpoint.getUserPort(); logger.info("Starting NodeRegistration for {}", endpointName); Roles roles = endpoint.getRoles(); if (roles.getMaster()) { registrationHandles.add(coord.get().getServiceSet(ClusterCoordinator.Role.MASTER).register(endpoint)); } if (roles.getSqlQuery()) { registrationHandles.add(coord.get().getServiceSet(ClusterCoordinator.Role.COORDINATOR).register(endpoint)); } if (roles.getJavaExecutor()) { registrationHandles.add(coord.get().getServiceSet(ClusterCoordinator.Role.EXECUTOR).register(endpoint)); } logger.info("NodeRegistration is up for {}", endpointName); }
hash = (53 * hash) + hashBoolean(getMaster());
public Builder mergeFrom(com.dremio.exec.proto.CoordinationProtos.Roles other) { if (other == com.dremio.exec.proto.CoordinationProtos.Roles.getDefaultInstance()) return this; if (other.hasSqlQuery()) { setSqlQuery(other.getSqlQuery()); } if (other.hasLogicalPlan()) { setLogicalPlan(other.getLogicalPlan()); } if (other.hasPhysicalPlan()) { setPhysicalPlan(other.getPhysicalPlan()); } if (other.hasJavaExecutor()) { setJavaExecutor(other.getJavaExecutor()); } if (other.hasDistributedCache()) { setDistributedCache(other.getDistributedCache()); } if (other.hasMaster()) { setMaster(other.getMaster()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public void writeTo(io.protostuff.Output output, com.dremio.exec.proto.CoordinationProtos.Roles message) throws java.io.IOException { if(message.hasSqlQuery()) output.writeBool(1, message.getSqlQuery(), false); if(message.hasLogicalPlan()) output.writeBool(2, message.getLogicalPlan(), false); if(message.hasPhysicalPlan()) output.writeBool(3, message.getPhysicalPlan(), false); if(message.hasJavaExecutor()) output.writeBool(4, message.getJavaExecutor(), false); if(message.hasDistributedCache()) output.writeBool(5, message.getDistributedCache(), false); if(message.hasMaster()) output.writeBool(100, message.getMaster(), false); } public boolean isInitialized(com.dremio.exec.proto.CoordinationProtos.Roles message)
@Override protected boolean contains(Roles roles) { return roles.getMaster(); } };