Skip to content

Commit

Permalink
[FOLLOWUP] Remove unused methods in Storage interface (#431)
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?
1. Remove unused methods in Storage interface

### Why are the changes needed?

1. Remove it to make more clear.

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Don't need
  • Loading branch information
zuston authored Dec 16, 2022
1 parent 4bd3af6 commit d897059
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,6 @@ public boolean containsWriteHandler(String appId, int shuffleId, int partition)
return map.containsKey(partitionKey);
}

@Override
public CreateShuffleWriteHandlerRequest getCreateWriterHandlerRequest(
String appId,
int shuffleId,
int partition) {
Map<String, CreateShuffleWriteHandlerRequest> requestMap = requests.get(appId);
if (requestMap != null) {
return requestMap.get(RssUtils.generatePartitionKey(appId, shuffleId, partition));
}
return null;
}

@Override
public void removeHandlers(String appId) {
writerHandlers.remove(appId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,6 @@ public boolean unlockShuffleShared(String shuffleKey) {
return true;
}

@Override
public boolean lockShuffleExcluded(String shuffleKey) {
return true;
}

@Override
public boolean unlockShuffleExcluded(String shuffleKey) {
return true;
}

@Override
public void updateReadMetrics(StorageReadMetrics metrics) {
// do nothing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,25 +121,6 @@ public boolean unlockShuffleShared(String shuffleKey) {
return true;
}

@Override
public boolean lockShuffleExcluded(String shuffleKey) {
ReadWriteLock lock = getLock(shuffleKey);
if (lock == null) {
return false;
}
return lock.writeLock().tryLock();
}

@Override
public boolean unlockShuffleExcluded(String shuffleKey) {
ReadWriteLock lock = getLock(shuffleKey);
if (lock == null) {
return false;
}
lock.writeLock().unlock();
return true;
}

@Override
public void updateWriteMetrics(StorageWriteMetrics metrics) {
updateWrite(RssUtils.generateShuffleKey(metrics.getAppId(), metrics.getShuffleId()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ public interface Storage {

boolean unlockShuffleShared(String shuffleKey);

boolean lockShuffleExcluded(String shuffleKey);

boolean unlockShuffleExcluded(String shuffleKey);

void updateWriteMetrics(StorageWriteMetrics metrics);

void updateReadMetrics(StorageReadMetrics metrics);
Expand All @@ -45,8 +41,6 @@ public interface Storage {

ServerReadHandler getOrCreateReadHandler(CreateShuffleReadHandlerRequest request);

CreateShuffleWriteHandlerRequest getCreateWriterHandlerRequest(String appId, int shuffleId, int partition);

void removeHandlers(String appId);

void createMetadataIfNotExist(String shuffleKey);
Expand Down

0 comments on commit d897059

Please sign in to comment.