Package org.apache.spark.network.shuffle.protocol

Examples of org.apache.spark.network.shuffle.protocol.RegisterExecutor


  @Test
  public void testRegisterExecutor() {
    RpcResponseCallback callback = mock(RpcResponseCallback.class);

    ExecutorShuffleInfo config = new ExecutorShuffleInfo(new String[] {"/a", "/b"}, 16, "sort");
    byte[] registerMessage = new RegisterExecutor("app0", "exec1", config).toByteArray();
    handler.receive(client, registerMessage, callback);
    verify(blockManager, times(1)).registerExecutor("app0", "exec1", config);

    verify(callback, times(1)).onSuccess((byte[]) any());
    verify(callback, never()).onFailure((Throwable) any());
View Full Code Here


      long streamId = streamManager.registerStream(blocks.iterator());
      logger.trace("Registered streamId {} with {} buffers", streamId, msg.blockIds.length);
      callback.onSuccess(new StreamHandle(streamId, msg.blockIds.length).toByteArray());

    } else if (msgObj instanceof RegisterExecutor) {
      RegisterExecutor msg = (RegisterExecutor) msgObj;
      blockManager.registerExecutor(msg.appId, msg.execId, msg.executorInfo);
      callback.onSuccess(new byte[0]);

    } else {
      throw new UnsupportedOperationException("Unexpected message: " + msgObj);
View Full Code Here

      int port,
      String execId,
      ExecutorShuffleInfo executorInfo) throws IOException {
    assert appId != null : "Called before init()";
    TransportClient client = clientFactory.createClient(host, port);
    byte[] registerMessage = new RegisterExecutor(appId, execId, executorInfo).toByteArray();
    client.sendRpcSync(registerMessage, 5000 /* timeoutMs */);
  }
View Full Code Here

TOP

Related Classes of org.apache.spark.network.shuffle.protocol.RegisterExecutor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.