class TransportClientFactory extends Closeable
Factory for creating TransportClients by using createClient.
The factory maintains a connection pool to other hosts and should return the same TransportClient for the same remote host. It also shares a single worker thread pool for all TransportClients.
TransportClients will be reused whenever possible. Prior to completing the creation of a new
TransportClient, all given TransportClientBootstraps will be run.
- Alphabetic
- By Inheritance
- TransportClientFactory
- Closeable
- AutoCloseable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new TransportClientFactory(context: TransportContext, clientBootstraps: List[TransportClientBootstrap])
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
close(): Unit
Close all connections in the connection pool, and shutdown the worker thread pool.
Close all connections in the connection pool, and shutdown the worker thread pool.
- Definition Classes
- TransportClientFactory → Closeable → AutoCloseable
-
def
createClient(remoteHost: String, remotePort: Int): TransportClient
Create a
TransportClientconnecting to the given remote host / port.Create a
TransportClientconnecting to the given remote host / port.We maintains an array of clients (size determined by spark.shuffle.io.numConnectionsPerPeer) and randomly picks one to use. If no client was previously created in the randomly selected spot, this function creates a new client and places it there.
Prior to the creation of a new TransportClient, we will execute all
TransportClientBootstraps that are registered with this factory.This blocks until a connection is successfully established and fully bootstrapped.
Concurrency: This method is safe to call from multiple threads.
-
def
createUnmanagedClient(remoteHost: String, remotePort: Int): TransportClient
Create a completely new
TransportClientto the given remote host / port.Create a completely new
TransportClientto the given remote host / port. This connection is not pooled.As with
int), this method is blocking. -
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- def getAllMetrics(): MetricSet
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()