Skip to content

Commit 50cbea2

Browse files
committed
refine
1 parent 15e0a54 commit 50cbea2

File tree

2 files changed

+4
-18
lines changed

2 files changed

+4
-18
lines changed

worker/src/main/java/org/apache/celeborn/service/deploy/worker/storage/PartitionDataWriter.java

-14
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ public class PartitionDataWriter implements DeviceObserver {
4848
protected final DeviceMonitor deviceMonitor;
4949
private final long splitThreshold;
5050
private final PartitionSplitMode splitMode;
51-
protected boolean deleted = false;
5251
protected final FlushNotifier notifier = new FlushNotifier();
5352
// It's only needed when graceful shutdown is enabled
5453
protected final StorageManager storageManager;
@@ -147,23 +146,10 @@ public long close() {
147146
return tierWriterProxy.close();
148147
}
149148

150-
@FunctionalInterface
151-
public interface RunnableWithIOException {
152-
void run() throws IOException;
153-
}
154-
155149
public boolean isClosed() {
156150
return tierWriterProxy.isClosed();
157151
}
158152

159-
protected synchronized long close(
160-
RunnableWithIOException tryClose,
161-
RunnableWithIOException streamClose,
162-
RunnableWithIOException finalClose)
163-
throws IOException {
164-
return tierWriterProxy.close();
165-
}
166-
167153
public void evict(boolean checkClose) throws IOException {
168154
// this lock is used to make sure that
169155
// memory manager won't evict with writer thread concurrently

worker/src/main/scala/org/apache/celeborn/service/deploy/worker/storage/StoragePolicy.scala

+4-4
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class StoragePolicy(conf: CelebornConf, storageManager: StorageManager, source:
5151
orderList)
5252
}
5353
}
54-
logError(s"Create evict file filaed for ${partitionDataWriterContext.getPartitionLocation}")
54+
logError(s"Create evict file failed for ${partitionDataWriterContext.getPartitionLocation}")
5555
null
5656
}
5757

@@ -69,7 +69,7 @@ class StoragePolicy(conf: CelebornConf, storageManager: StorageManager, source:
6969
"Partition data writer context can not have null partition location")
7070
}
7171

72-
def getPartitionMetahandler(fileInfo: FileInfo) = {
72+
def getPartitionMetaHandler(fileInfo: FileInfo) = {
7373
partitionType match {
7474
case PartitionType.REDUCE =>
7575
new ReducePartitionMetaHandler(partitionDataWriterContext.isRangeReadFilter, fileInfo)
@@ -98,7 +98,7 @@ class StoragePolicy(conf: CelebornConf, storageManager: StorageManager, source:
9898
partitionDataWriterContext.getUserIdentifier,
9999
partitionDataWriterContext.getPartitionType,
100100
partitionDataWriterContext.isPartitionSplitEnabled)
101-
val metaHandler = getPartitionMetahandler(memoryFileInfo)
101+
val metaHandler = getPartitionMetaHandler(memoryFileInfo)
102102
new MemoryTierWriter(
103103
conf,
104104
metaHandler,
@@ -120,7 +120,7 @@ class StoragePolicy(conf: CelebornConf, storageManager: StorageManager, source:
120120
partitionDataWriterContext.getPartitionType,
121121
partitionDataWriterContext.isPartitionSplitEnabled)
122122
partitionDataWriterContext.setWorkingDir(workingDir)
123-
val metaHandler = getPartitionMetahandler(diskFileInfo)
123+
val metaHandler = getPartitionMetaHandler(diskFileInfo)
124124
if (storageInfoType == StorageInfo.Type.HDD || storageInfoType == StorageInfo.Type.SSD) {
125125
new LocalTierWriter(
126126
conf,

0 commit comments

Comments
 (0)