/** * <code>optional .exec.NodeEndpoint assignment = 1;</code> */ public Builder setAssignment( com.dremio.exec.proto.CoordinationProtos.NodeEndpoint.Builder builderForValue) { if (assignmentBuilder_ == null) { assignment_ = builderForValue.build(); onChanged(); } else { assignmentBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; return this; } /**
/** * <code>optional .exec.NodeEndpoint endpoint = 2;</code> */ public Builder setEndpoint( com.dremio.exec.proto.CoordinationProtos.NodeEndpoint.Builder builderForValue) { if (endpointBuilder_ == null) { endpoint_ = builderForValue.build(); onChanged(); } else { endpointBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; return this; } /**
/** * <code>optional .exec.NodeEndpoint endpoint = 1;</code> */ public Builder setEndpoint( com.dremio.exec.proto.CoordinationProtos.NodeEndpoint.Builder builderForValue) { if (endpointBuilder_ == null) { endpoint_ = builderForValue.build(); onChanged(); } else { endpointBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; return this; } /**
/** * <code>optional .exec.NodeEndpoint endpoint = 3;</code> */ public Builder setEndpoint( com.dremio.exec.proto.CoordinationProtos.NodeEndpoint.Builder builderForValue) { if (endpointBuilder_ == null) { endpoint_ = builderForValue.build(); onChanged(); } else { endpointBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; return this; } /**
/** * <code>optional .exec.NodeEndpoint foreman = 11;</code> */ public Builder setForeman( com.dremio.exec.proto.CoordinationProtos.NodeEndpoint.Builder builderForValue) { if (foremanBuilder_ == null) { foreman_ = builderForValue.build(); onChanged(); } else { foremanBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000100; return this; } /**
/** * <code>optional .exec.NodeEndpoint assignment = 10;</code> */ public Builder setAssignment( com.dremio.exec.proto.CoordinationProtos.NodeEndpoint.Builder builderForValue) { if (assignmentBuilder_ == null) { assignment_ = builderForValue.build(); onChanged(); } else { assignmentBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000080; return this; } /**
@Test public void test3ComponentsConnection() throws Exception { assertNull(zooKeeperServer.getZKClient().exists("/dremio3/test/test-cluster-id", false)); try(ZKClusterClient client = new ZKClusterClient( DEFAULT_SABOT_CONFIG, String.format("%s/dremio3/test/test-cluster-id", zooKeeperServer.getConnectString())) ) { client.start(); ZKServiceSet serviceSet = client.newServiceSet("coordinator"); serviceSet.register(NodeEndpoint.newBuilder().setAddress("foo").build()); Stat stat = zooKeeperServer.getZKClient().exists("/dremio3/test/test-cluster-id/coordinator", false); assertNotNull(stat); assertEquals(1, stat.getNumChildren()); } }
/** * <code>optional .exec.NodeEndpoint endpoint = 2;</code> */ public Builder setEndpoint( com.dremio.exec.proto.CoordinationProtos.NodeEndpoint.Builder builderForValue) { if (endpointBuilder_ == null) { endpoint_ = builderForValue.build(); onChanged(); } else { endpointBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; return this; } /**
private static final CoordinationProtos.NodeEndpoint newNodeEndpoint(String address, int port) { return CoordinationProtos.NodeEndpoint.newBuilder().setAddress(address).setFabricPort(port).build(); }
public ServiceHolder(BufferAllocator allocator, Provider<Iterable<NodeEndpoint>> nodeProvider, PDFSMode mode, String name) throws Exception{ this.allocator = allocator.newChildAllocator(name, 0, Long.MAX_VALUE); pool = new CloseableThreadPool(name); fabric = new FabricServiceImpl(HOSTNAME, 9970, true, THREAD_COUNT, this.allocator, RESERVATION, MAX_ALLOCATION, TIMEOUT, pool); fabric.start(); endpoint = NodeEndpoint.newBuilder() .setAddress(fabric.getAddress()).setFabricPort(fabric.getPort()) .setRoles(Roles.newBuilder().setJavaExecutor(mode == PDFSMode.DATA)) .build(); service = new PDFSService(DirectProvider.wrap((FabricService) fabric), DirectProvider.wrap(endpoint), nodeProvider, DremioTest.DEFAULT_SABOT_CONFIG, this.allocator, mode); service.start(); fileSystem = service.createFileSystem(); }
private static final NodeEndpoint newNodeEndpoint(String address, int port) { return NodeEndpoint.newBuilder().setAddress(address).setFabricPort(port).build(); }
/** * <code>optional .exec.NodeEndpoint foreman = 7;</code> */ public Builder setForeman( com.dremio.exec.proto.CoordinationProtos.NodeEndpoint.Builder builderForValue) { if (foremanBuilder_ == null) { foreman_ = builderForValue.build(); onChanged(); } else { foremanBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000040; return this; } /**
private static NodeEndpoint getEndpoint(String host) { return NodeEndpoint.newBuilder().setAddress(host).setFabricPort(1234).build(); }
private static final NodeEndpoint newNodeEndpoint(String address, int port) { return NodeEndpoint.newBuilder().setAddress(address).setFabricPort(port).build(); } }
public List<MinorFragmentEndpoint> getEndpoints() { List<MinorFragmentEndpoint> l = new ArrayList<MinorFragmentEndpoint>(); for (int i = 0; i < NUM_FRAGMENTS; i++) { l.add(new MinorFragmentEndpoint(i, NodeEndpoint.newBuilder().setAddress(String.format("a_%d", i)).setFabricPort(1).build())); } return l; }
@Before public void setUpPDFSService() throws IOException { NodeEndpoint endpoint = NodeEndpoint.newBuilder() .setAddress(fabric.getAddress()).setFabricPort(fabric.getPort()) .build(); PDFSProtocol pdfsProtocol = PDFSProtocol.newInstance(endpoint, DremioTest.DEFAULT_SABOT_CONFIG, allocator, true); FabricRunnerFactory factory = fabric.registerProtocol(pdfsProtocol); sabotFS = new RemoteNodeFileSystem(factory.getCommandRunner(fabric.getAddress(), fabric.getPort()), allocator); sabotFS.initialize(URI.create(format("sabot://%s:%d", fabric.getAddress(), fabric.getPort())), new Configuration(false)); }
/** * Create a {@link com.dremio.exec.dfs.proto.beans.NodeEndpoint} * @param address the address * @param port the control port * @return */ private static NodeEndpoint newNodeEndpoint(String address, int port) { return NodeEndpoint.newBuilder().setAddress(address).setFabricPort(port).build(); }
@BeforeClass public static void setup() { endpoints = Lists.newArrayList(); final String pattern = "node%d"; for (int i = 2; i < 32; i++) { String host = String.format(pattern, i); endpoints.add(NodeEndpoint.newBuilder().setAddress(host).build()); } }
/** * Create a {@link com.dremio.exec.dfs.proto.beans.NodeEndpoint} * @param address the address * @param port the control port * @return */ private static NodeEndpoint newNodeEndpoint(String address, int port) { return NodeEndpoint.newBuilder().setAddress(address).setFabricPort(port).build(); }
/** * Create a {@link com.dremio.exec.proto.beans.NodeEndpoint} * @param address the address * @param port the control port * @return */ private static NodeEndpoint newNodeEndpoint(String address, int port) { return NodeEndpoint.newBuilder().setAddress(address).setFabricPort(port).setRoles(Roles.newBuilder().setJavaExecutor(true)).build(); }