advancedxy commented on code in PR #527:
URL: https://github.com/apache/incubator-uniffle/pull/527#discussion_r1091826852
##########
client-spark/spark3/src/main/java/org/apache/spark/shuffle/RssShuffleManager.java:
##########
@@ -528,7 +529,7 @@ private Roaring64NavigableMap getExpectedTasksByExecutorId(
endMapIndex,
startPartition,
endPartition);
- } catch (Exception ignored) {
+ } catch (NoSuchMethodException | InvocationTargetException |
IllegalAccessException ignored1) {
Review Comment:
This is expected to ignore all the exceptions including RuntimeException.
Let's use annotation to suppress the warning then?
##########
storage/src/main/java/org/apache/uniffle/storage/handler/impl/LocalFileWriteHandler.java:
##########
@@ -52,17 +52,11 @@ public LocalFileWriteHandler(
private void createBasePath() {
File baseFolder = new File(basePath);
- // check if shuffle folder exist
- if (!baseFolder.exists()) {
- try {
- // try to create folder, it may be created by other Shuffle Server
- baseFolder.mkdirs();
- } catch (Exception e) {
- // if folder exist, ignore the exception
- if (!baseFolder.exists()) {
- LOG.error("Can't create shuffle folder:" + basePath, e);
- throw e;
- }
+ // try to create folder, it may already exist
+ if (!baseFolder.mkdirs()) {
Review Comment:
this doesn't seem right.
`mkdirs` may throw exceptions. you have to raise the exception to sync with
old logic.
##########
client-mr/src/main/java/org/apache/hadoop/mapreduce/v2/app/RssMRAppMaster.java:
##########
@@ -366,7 +366,10 @@ static void writeExtraConf(JobConf conf, JobConf
extraConf) {
long size = status.getLen();
String sizes = conf.get(MRJobConfig.CACHE_FILES_SIZES);
conf.set(MRJobConfig.CACHE_FILES_SIZES, sizes == null ?
String.valueOf(size) : size + "," + sizes);
- } catch (Exception e) {
+ } catch (InterruptedException e) {
+ LOG.error("Interrupted while trying to upload extra conf ", e);
+ Thread.currentThread().interrupt();
Review Comment:
this is not right.
`InterruptedException` means this thread has already been interrupted, you
cannot interrupt current thread then.
Let's catch the `RuntimeException` first, then the normal wildcard Exception.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]