You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@uniffle.apache.org by GitBox <gi...@apache.org> on 2022/12/01 12:22:35 UTC
[GitHub] [incubator-uniffle] LuciferYang commented on a diff in pull request #235: [ISSUE-163][FEATURE] Write to hdfs when local disk can't be write
LuciferYang commented on code in PR #235:
URL: https://github.com/apache/incubator-uniffle/pull/235#discussion_r1037044436
##########
server/src/main/java/org/apache/uniffle/server/storage/MultiStorageManager.java:
##########
@@ -65,39 +95,52 @@ public Storage selectStorage(ShuffleDataReadEvent event) {
@Override
public void updateWriteMetrics(ShuffleDataFlushEvent event, long writeTime) {
- selectStorageManager(event).updateWriteMetrics(event, writeTime);
+ throw new UnsupportedOperationException();
}
@Override
public boolean write(Storage storage, ShuffleWriteHandler handler, ShuffleDataFlushEvent event) {
StorageManager storageManager = selectStorageManager(event);
- if (storageManager == coldStorageManager && event.getRetryTimes() > fallBackTimes) {
+ if (event.getRetryTimes() > 0) {
try {
- CreateShuffleWriteHandlerRequest request = storage.getCreateWriterHandlerRequest(
- event.getAppId(),
- event.getShuffleId(),
- event.getStartPartition());
- if (request == null) {
- return false;
+ StorageManager newStorageManager = storageManagerFallbackStrategy.tryFallback(
+ storageManager, event, warmStorageManager, coldStorageManager);
+ if (newStorageManager != storageManager) {
+ storageManager = newStorageManager;
+ storageManagerCache.put(event, storageManager);
+ CreateShuffleWriteHandlerRequest request = storage.getCreateWriterHandlerRequest(
+ event.getAppId(), event.getShuffleId(), event.getStartPartition());
+ storage = storageManager.selectStorage(event);
+ handler = storage.getOrCreateWriteHandler(request);
Review Comment:
@jerqi Busy at the end of the year. I'll think this on the weekend
--
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: issues-unsubscribe@uniffle.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org