@@ -290,6 +290,27 @@ private[spark] abstract class RpcEndpointRef(@transient conf: SparkConf)
290
290
291
291
def name : String
292
292
293
+ /**
294
+ * Sends a one-way asynchronous message. Fire-and-forget semantics.
295
+ */
296
+ def send (message : Any ): Unit
297
+
298
+ /**
299
+ * Send a message to the corresponding [[RpcEndpoint.receiveAndReply) ]] and return a `Future` to
300
+ * receive the reply within a default timeout.
301
+ *
302
+ * This method only sends the message once and never retries.
303
+ */
304
+ def sendWithReply [T : ClassTag ](message : Any ): Future [T ] = sendWithReply(message, defaultTimeout)
305
+
306
+ /**
307
+ * Send a message to the corresponding [[RpcEndpoint.receiveAndReply) ]] and return a `Future` to
308
+ * receive the reply within the specified timeout.
309
+ *
310
+ * This method only sends the message once and never retries.
311
+ */
312
+ def sendWithReply [T : ClassTag ](message : Any , timeout : FiniteDuration ): Future [T ]
313
+
293
314
/**
294
315
* Send a message to the corresponding [[RpcEndpoint ]] and get its result within a default
295
316
* timeout, or throw a SparkException if this fails even after the default number of retries.
@@ -344,27 +365,6 @@ private[spark] abstract class RpcEndpointRef(@transient conf: SparkConf)
344
365
s " Error sending message [message = $message] " , lastException)
345
366
}
346
367
347
- /**
348
- * Sends a one-way asynchronous message. Fire-and-forget semantics.
349
- */
350
- def send (message : Any ): Unit
351
-
352
- /**
353
- * Send a message to the corresponding [[RpcEndpoint.receiveAndReply) ]] and return a `Future` to
354
- * receive the reply within a default timeout.
355
- *
356
- * This method only sends the message once and never retries.
357
- */
358
- def sendWithReply [T : ClassTag ](message : Any ): Future [T ] = sendWithReply(message, defaultTimeout)
359
-
360
- /**
361
- * Send a message to the corresponding [[RpcEndpoint.receiveAndReply) ]] and return a `Future` to
362
- * receive the reply within the specified timeout.
363
- *
364
- * This method only sends the message once and never retries.
365
- */
366
- def sendWithReply [T : ClassTag ](message : Any , timeout : FiniteDuration ): Future [T ]
367
-
368
368
def toURI : URI
369
369
}
370
370
0 commit comments