File tree 15 files changed +12
-28
lines changed
common/src/main/java/org/apache/spark/network
main/java/org/apache/spark/network
test/java/org/apache/spark/network
15 files changed +12
-28
lines changed Original file line number Diff line number Diff line change 35
35
import org .apache .spark .network .server .TransportChannelHandler ;
36
36
import org .apache .spark .network .server .TransportRequestHandler ;
37
37
import org .apache .spark .network .server .TransportServer ;
38
- import org .apache .spark .network .server .StreamManager ;
39
38
import org .apache .spark .network .util .NettyUtils ;
40
39
import org .apache .spark .network .util .TransportConf ;
41
40
Original file line number Diff line number Diff line change 17
17
18
18
package org .apache .spark .network .protocol ;
19
19
20
- import com .google .common .base .Charsets ;
21
20
import com .google .common .base .Objects ;
22
21
import io .netty .buffer .ByteBuf ;
23
22
Original file line number Diff line number Diff line change 20
20
21
21
import com .google .common .base .Charsets ;
22
22
import io .netty .buffer .ByteBuf ;
23
- import io .netty .buffer .Unpooled ;
24
23
25
24
/** Provides a canonical set of Encoders for simple types. */
26
25
public class Encoders {
Original file line number Diff line number Diff line change 17
17
18
18
package org .apache .spark .network .protocol ;
19
19
20
- import com .google .common .base .Charsets ;
21
20
import com .google .common .base .Objects ;
22
21
import io .netty .buffer .ByteBuf ;
23
22
Original file line number Diff line number Diff line change 28
28
import io .netty .channel .ChannelOption ;
29
29
import io .netty .channel .EventLoopGroup ;
30
30
import io .netty .channel .socket .SocketChannel ;
31
- import io .netty .util .internal .PlatformDependent ;
32
31
import org .slf4j .Logger ;
33
32
import org .slf4j .LoggerFactory ;
34
33
Original file line number Diff line number Diff line change 17
17
18
18
package org .apache .spark .network .util ;
19
19
20
- import java .nio .ByteBuffer ;
21
-
22
- import java .io .ByteArrayInputStream ;
23
- import java .io .ByteArrayOutputStream ;
24
20
import java .io .Closeable ;
25
21
import java .io .File ;
26
22
import java .io .IOException ;
27
- import java .io .ObjectInputStream ;
28
- import java .io .ObjectOutputStream ;
23
+ import java .nio .ByteBuffer ;
29
24
30
- import com .google .common .base .Preconditions ;
31
- import com .google .common .io .Closeables ;
32
25
import com .google .common .base .Charsets ;
26
+ import com .google .common .base .Preconditions ;
33
27
import io .netty .buffer .Unpooled ;
34
28
import org .slf4j .Logger ;
35
29
import org .slf4j .LoggerFactory ;
Original file line number Diff line number Diff line change 25
25
import io .netty .channel .Channel ;
26
26
import io .netty .channel .EventLoopGroup ;
27
27
import io .netty .channel .ServerChannel ;
28
- import io .netty .channel .epoll .Epoll ;
29
28
import io .netty .channel .epoll .EpollEventLoopGroup ;
30
29
import io .netty .channel .epoll .EpollServerSocketChannel ;
31
30
import io .netty .channel .epoll .EpollSocketChannel ;
Original file line number Diff line number Diff line change 19
19
20
20
import java .util .concurrent .ConcurrentMap ;
21
21
22
- import com .google .common .base .Charsets ;
23
22
import com .google .common .collect .Maps ;
24
- import io .netty .buffer .ByteBuf ;
25
23
import io .netty .buffer .Unpooled ;
26
24
import org .slf4j .Logger ;
27
25
import org .slf4j .LoggerFactory ;
28
26
29
27
import org .apache .spark .network .client .RpcResponseCallback ;
30
28
import org .apache .spark .network .client .TransportClient ;
31
- import org .apache .spark .network .protocol .Encodable ;
32
29
import org .apache .spark .network .server .RpcHandler ;
33
30
import org .apache .spark .network .server .StreamManager ;
34
31
Original file line number Diff line number Diff line change 29
29
import org .apache .spark .network .shuffle .protocol .BlockTransferMessage ;
30
30
import org .apache .spark .network .shuffle .protocol .OpenBlocks ;
31
31
import org .apache .spark .network .shuffle .protocol .StreamHandle ;
32
- import org .apache .spark .network .util .JavaUtils ;
33
32
34
33
/**
35
34
* Simple wrapper on top of a TransportClient which interprets each chunk as a whole block, and
Original file line number Diff line number Diff line change 23
23
import io .netty .buffer .ByteBuf ;
24
24
25
25
import org .apache .spark .network .protocol .Encoders ;
26
- import org .apache .spark .network .shuffle .protocol .BlockTransferMessage .Type ;
27
26
28
27
/** Request to read a set of blocks. Returns {@link StreamHandle}. */
29
28
public class OpenBlocks extends BlockTransferMessage {
Original file line number Diff line number Diff line change 21
21
import io .netty .buffer .ByteBuf ;
22
22
23
23
import org .apache .spark .network .protocol .Encoders ;
24
- import org .apache .spark .network .shuffle .protocol .BlockTransferMessage .Type ;
25
24
26
25
/**
27
26
* Initial registration message between an executor and its local shuffle server.
Original file line number Diff line number Diff line change 20
20
import com .google .common .base .Objects ;
21
21
import io .netty .buffer .ByteBuf ;
22
22
23
- import org .apache .spark .network .shuffle .protocol .BlockTransferMessage .Type ;
24
-
25
23
/**
26
24
* Identifier for a fixed number of chunks to read from a stream created by an "open blocks"
27
25
* message. This is used by {@link org.apache.spark.network.shuffle.OneForOneBlockFetcher}.
Original file line number Diff line number Diff line change 23
23
import io .netty .buffer .ByteBuf ;
24
24
25
25
import org .apache .spark .network .protocol .Encoders ;
26
- import org .apache .spark .network .shuffle .protocol .BlockTransferMessage .Type ;
27
26
28
27
29
28
/** Request to upload a block with a certain StorageLevel. Returns nothing (empty byte array). */
Original file line number Diff line number Diff line change 17
17
18
18
package org .apache .spark .network .sasl ;
19
19
20
- import java .util .Map ;
20
+ import static org .junit .Assert .assertFalse ;
21
+ import static org .junit .Assert .assertTrue ;
22
+ import static org .junit .Assert .fail ;
21
23
22
- import com .google .common .collect .ImmutableMap ;
23
24
import org .junit .Test ;
24
25
25
- import static org .junit .Assert .*;
26
26
27
27
/**
28
28
* Jointly tests SparkSaslClient and SparkSaslServer, as both are black boxes.
Original file line number Diff line number Diff line change 28
28
import org .mockito .invocation .InvocationOnMock ;
29
29
import org .mockito .stubbing .Answer ;
30
30
31
- import static org .junit .Assert .*;
32
31
import static org .junit .Assert .assertEquals ;
32
+ import static org .junit .Assert .fail ;
33
33
import static org .mockito .Matchers .any ;
34
+ import static org .mockito .Matchers .anyInt ;
35
+ import static org .mockito .Matchers .anyLong ;
34
36
import static org .mockito .Matchers .eq ;
35
- import static org .mockito .Mockito .*;
37
+ import static org .mockito .Mockito .doAnswer ;
38
+ import static org .mockito .Mockito .mock ;
39
+ import static org .mockito .Mockito .times ;
40
+ import static org .mockito .Mockito .verify ;
36
41
37
42
import org .apache .spark .network .buffer .ManagedBuffer ;
38
43
import org .apache .spark .network .buffer .NettyManagedBuffer ;
You can’t perform that action at this time.
0 commit comments