smallzhongfeng commented on code in PR #210:
URL: https://github.com/apache/incubator-uniffle/pull/210#discussion_r980921405


##########
coordinator/src/main/java/org/apache/uniffle/coordinator/AppBalanceSelectStorageStrategy.java:
##########
@@ -39,106 +45,127 @@
 public class AppBalanceSelectStorageStrategy implements SelectStorageStrategy {
 
   private static final Logger LOG = 
LoggerFactory.getLogger(AppBalanceSelectStorageStrategy.class);
-  /**
-   * store appId -> remote path to make sure all shuffle data of the same 
application
-   * will be written to the same remote storage
-   */
-  private final Map<String, RemoteStorageInfo> appIdToRemoteStorageInfo;
   /**
    * store remote path -> application count for assignment strategy
    */
-  private final Map<String, RankValue> remoteStoragePathCounter;
+  private final Map<String, RankValue> remoteStoragePathRankValue;
+  private final Map<String, RemoteStorageInfo> appIdToRemoteStorageInfo;
   private final Map<String, RemoteStorageInfo> availableRemoteStorageInfo;
-
-  public AppBalanceSelectStorageStrategy() {
-    this.appIdToRemoteStorageInfo = Maps.newConcurrentMap();
-    this.remoteStoragePathCounter = Maps.newConcurrentMap();
-    this.availableRemoteStorageInfo = Maps.newHashMap();
+  private final Configuration hdfsConf;
+  private final int fileSize;
+  private final int readAndWriteTimes;
+  private boolean remotePathIsHealthy = true;

Review Comment:
   I know that there are many paths, but this attribute is applied to each 
path. The healthy path is processed by `sortPathByRankValue` according to 
`remotePathIsHealthy` as true, and corresponding logic is processed when it is 
false.



-- 
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]

Reply via email to