aboutsummaryrefslogtreecommitdiff
path: root/network/common
diff options
context:
space:
mode:
authorTimothy Chen <tnachen@gmail.com>2015-08-03 01:55:58 -0700
committerAndrew Or <andrew@databricks.com>2015-08-03 01:55:58 -0700
commit95dccc63350c45045f038bab9f8a5080b4e1f8cc (patch)
treec6ac9b266234a3d349ce4ada3a80a17adc7744fc /network/common
parent1ebd41b141a95ec264bd2dd50f0fe24cd459035d (diff)
downloadspark-95dccc63350c45045f038bab9f8a5080b4e1f8cc.tar.gz
spark-95dccc63350c45045f038bab9f8a5080b4e1f8cc.tar.bz2
spark-95dccc63350c45045f038bab9f8a5080b4e1f8cc.zip
[SPARK-8873] [MESOS] Clean up shuffle files if external shuffle service is used
This patch builds directly on #7820, which is largely written by tnachen. The only addition is one commit for cleaning up the code. There should be no functional differences between this and #7820. Author: Timothy Chen <tnachen@gmail.com> Author: Andrew Or <andrew@databricks.com> Closes #7881 from andrewor14/tim-cleanup-mesos-shuffle and squashes the following commits: 8894f7d [Andrew Or] Clean up code 2a5fa10 [Andrew Or] Merge branch 'mesos_shuffle_clean' of github.com:tnachen/spark into tim-cleanup-mesos-shuffle fadff89 [Timothy Chen] Address comments. e4d0f1d [Timothy Chen] Clean up external shuffle data on driver exit with Mesos.
Diffstat (limited to 'network/common')
-rw-r--r--network/common/src/main/java/org/apache/spark/network/client/TransportClient.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/network/common/src/main/java/org/apache/spark/network/client/TransportClient.java b/network/common/src/main/java/org/apache/spark/network/client/TransportClient.java
index 37f2e34ceb..e8e7f06247 100644
--- a/network/common/src/main/java/org/apache/spark/network/client/TransportClient.java
+++ b/network/common/src/main/java/org/apache/spark/network/client/TransportClient.java
@@ -19,6 +19,7 @@ package org.apache.spark.network.client;
import java.io.Closeable;
import java.io.IOException;
+import java.net.SocketAddress;
import java.util.UUID;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
@@ -79,6 +80,10 @@ public class TransportClient implements Closeable {
return channel.isOpen() || channel.isActive();
}
+ public SocketAddress getSocketAddress() {
+ return channel.remoteAddress();
+ }
+
/**
* Requests a single chunk from the remote side, from the pre-negotiated streamId.
*