Skip to content

Commit bdbbf0d

Browse files
committed
comments, remove some unnecessary changes
1 parent 857331a commit bdbbf0d

File tree

7 files changed

+23
-15
lines changed

7 files changed

+23
-15
lines changed

network/shuffle/src/main/java/org/apache/spark/network/shuffle/ExternalShuffleBlockHandler.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ public class ExternalShuffleBlockHandler extends RpcHandler {
5151
final ExternalShuffleBlockResolver blockManager;
5252
private final OneForOneStreamManager streamManager;
5353

54-
public ExternalShuffleBlockHandler(TransportConf conf, File registeredExecutorFile)
55-
throws IOException, ClassNotFoundException {
54+
public ExternalShuffleBlockHandler(TransportConf conf, File registeredExecutorFile) {
5655
this(new OneForOneStreamManager(),
5756
new ExternalShuffleBlockResolver(conf, registeredExecutorFile));
5857
}
@@ -104,6 +103,16 @@ public void applicationRemoved(String appId, boolean cleanupLocalDirs) {
104103
blockManager.applicationRemoved(appId, cleanupLocalDirs);
105104
}
106105

106+
/**
107+
* Register an (application, executor) with the given shuffle info.
108+
*
109+
* The "re-" is meant to highlight the intended use of this method -- when this service is
110+
* restarted, this is used to restore the state of executors from before the restart. Normal
111+
* registration will happen via a message handled in receive()
112+
*
113+
* @param appExecId
114+
* @param executorInfo
115+
*/
107116
public void reregisterExecutor(AppExecId appExecId, ExecutorShuffleInfo executorInfo) {
108117
blockManager.registerExecutor(appExecId.appId, appExecId.execId, executorInfo);
109118
}

network/shuffle/src/main/java/org/apache/spark/network/shuffle/ExternalShuffleBlockResolver.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ public class ExternalShuffleBlockResolver {
6161
@VisibleForTesting
6262
final File registeredExecutorFile;
6363

64-
public ExternalShuffleBlockResolver(TransportConf conf, File registeredExecutorFile)
65-
throws IOException, ClassNotFoundException {
64+
public ExternalShuffleBlockResolver(TransportConf conf, File registeredExecutorFile) {
6665
this(conf, registeredExecutorFile, Executors.newSingleThreadExecutor(
6766
// Add `spark` prefix because it will run in NM in Yarn mode.
6867
NettyUtils.createThreadFactory("spark-shuffle-directory-cleaner")));
@@ -73,7 +72,7 @@ public ExternalShuffleBlockResolver(TransportConf conf, File registeredExecutorF
7372
ExternalShuffleBlockResolver(
7473
TransportConf conf,
7574
File registeredExecutorFile,
76-
Executor directoryCleaner) throws IOException, ClassNotFoundException {
75+
Executor directoryCleaner) {
7776
this.conf = conf;
7877
this.registeredExecutorFile = registeredExecutorFile;
7978
this.executors = Maps.newConcurrentMap();

network/shuffle/src/test/java/org/apache/spark/network/shuffle/ExternalShuffleBlockResolverSuite.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public static void afterAll() {
5959
}
6060

6161
@Test
62-
public void testBadRequests() throws IOException, ClassNotFoundException {
62+
public void testBadRequests() {
6363
ExternalShuffleBlockResolver resolver = new ExternalShuffleBlockResolver(conf, null);
6464
// Unregistered executor
6565
try {
@@ -90,7 +90,7 @@ public void testBadRequests() throws IOException, ClassNotFoundException {
9090
}
9191

9292
@Test
93-
public void testSortShuffleBlocks() throws IOException, ClassNotFoundException {
93+
public void testSortShuffleBlocks() throws IOException {
9494
ExternalShuffleBlockResolver resolver = new ExternalShuffleBlockResolver(conf, null);
9595
resolver.registerExecutor("app0", "exec0",
9696
dataContext.createExecutorInfo("org.apache.spark.shuffle.sort.SortShuffleManager"));
@@ -109,7 +109,7 @@ public void testSortShuffleBlocks() throws IOException, ClassNotFoundException {
109109
}
110110

111111
@Test
112-
public void testHashShuffleBlocks() throws IOException, ClassNotFoundException {
112+
public void testHashShuffleBlocks() throws IOException {
113113
ExternalShuffleBlockResolver resolver = new ExternalShuffleBlockResolver(conf, null);
114114
resolver.registerExecutor("app0", "exec0",
115115
dataContext.createExecutorInfo("org.apache.spark.shuffle.hash.HashShuffleManager"));

network/shuffle/src/test/java/org/apache/spark/network/shuffle/ExternalShuffleCleanupSuite.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class ExternalShuffleCleanupSuite {
3838
TransportConf conf = new TransportConf(new SystemPropertyConfigProvider());
3939

4040
@Test
41-
public void noCleanupAndCleanup() throws IOException, ClassNotFoundException {
41+
public void noCleanupAndCleanup() throws IOException {
4242
TestShuffleDataContext dataContext = createSomeData();
4343

4444
ExternalShuffleBlockResolver resolver =
@@ -55,7 +55,7 @@ public void noCleanupAndCleanup() throws IOException, ClassNotFoundException {
5555
}
5656

5757
@Test
58-
public void cleanupUsesExecutor() throws IOException, ClassNotFoundException {
58+
public void cleanupUsesExecutor() throws IOException {
5959
TestShuffleDataContext dataContext = createSomeData();
6060

6161
final AtomicBoolean cleanupCalled = new AtomicBoolean(false);
@@ -79,7 +79,7 @@ public void cleanupUsesExecutor() throws IOException, ClassNotFoundException {
7979
}
8080

8181
@Test
82-
public void cleanupMultipleExecutors() throws IOException, ClassNotFoundException {
82+
public void cleanupMultipleExecutors() throws IOException {
8383
TestShuffleDataContext dataContext0 = createSomeData();
8484
TestShuffleDataContext dataContext1 = createSomeData();
8585

@@ -95,7 +95,7 @@ public void cleanupMultipleExecutors() throws IOException, ClassNotFoundExceptio
9595
}
9696

9797
@Test
98-
public void cleanupOnlyRemovedApp() throws IOException, ClassNotFoundException {
98+
public void cleanupOnlyRemovedApp() throws IOException {
9999
TestShuffleDataContext dataContext0 = createSomeData();
100100
TestShuffleDataContext dataContext1 = createSomeData();
101101

network/shuffle/src/test/java/org/apache/spark/network/shuffle/ExternalShuffleIntegrationSuite.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public class ExternalShuffleIntegrationSuite {
7373
};
7474

7575
@BeforeClass
76-
public static void beforeAll() throws IOException, ClassNotFoundException {
76+
public static void beforeAll() throws IOException {
7777
Random rand = new Random();
7878

7979
for (byte[] block : exec0Blocks) {

network/shuffle/src/test/java/org/apache/spark/network/shuffle/ExternalShuffleSecuritySuite.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public class ExternalShuffleSecuritySuite {
4343
TransportServer server;
4444

4545
@Before
46-
public void beforeEach() throws IOException, ClassNotFoundException {
46+
public void beforeEach() {
4747
TransportContext context =
4848
new TransportContext(conf, new ExternalShuffleBlockHandler(conf, null));
4949
TransportServerBootstrap bootstrap = new SaslServerBootstrap(conf,

yarn/src/test/resources/log4j.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ log4j.appender.file.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss.SSS} %t %p %c{
2525

2626
# Ignore messages below warning level from Jetty, because it's a bit verbose
2727
log4j.logger.org.spark-project.jetty=WARN
28-
log4j.logger.org.apache.hadoop=INFO
28+
log4j.logger.org.apache.hadoop=WARN

0 commit comments

Comments
 (0)