diff --git a/pom.xml b/pom.xml
index b81e7b74..b4e231e5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
com.qcloud.cos
hadoop-cos
- 8.2.1
+ 8.2.2
jar
Apache Hadoop Tencent Cloud COS Support
diff --git a/src/main/java/org/apache/hadoop/fs/CosNExtendedFSDataOutputStream.java b/src/main/java/org/apache/hadoop/fs/CosNExtendedFSDataOutputStream.java
index 7350d6b0..3246e53c 100644
--- a/src/main/java/org/apache/hadoop/fs/CosNExtendedFSDataOutputStream.java
+++ b/src/main/java/org/apache/hadoop/fs/CosNExtendedFSDataOutputStream.java
@@ -117,7 +117,7 @@ private void resumeForWrite() throws IOException {
}
} catch (Exception e) {
LOG.error("Failed to resume for writing. Abort it.", e);
- super.abort();
+ super.doAbort();
throw new IOException(e);
}
}
diff --git a/src/main/java/org/apache/hadoop/fs/CosNFSDataOutputStream.java b/src/main/java/org/apache/hadoop/fs/CosNFSDataOutputStream.java
index 0840e96e..4a60566c 100644
--- a/src/main/java/org/apache/hadoop/fs/CosNFSDataOutputStream.java
+++ b/src/main/java/org/apache/hadoop/fs/CosNFSDataOutputStream.java
@@ -238,7 +238,7 @@ public synchronized void close() throws IOException {
}
@Override
- public synchronized void abort() throws IOException {
+ public synchronized void doAbort() throws IOException {
if (this.closed) {
return;
}
@@ -652,7 +652,7 @@ protected void complete() throws IOException {
PartETagList = this.partETags;
}
if (null == PartETagList) {
- throw new IOException("failed to multipart upload to cos, abort it.");
+ throw new IOException("failed to multipart upload to cos, doAbort it.");
}
// notice sometimes complete result may be null
@@ -673,7 +673,7 @@ protected void complete() throws IOException {
protected void abort() throws IOException {
LOG.info("Aborting the MPU [{}].", this.getUploadId());
if (this.isCompleted() || this.isAborted()) {
- throw new IOException(String.format("fail to abort the MPU [%s]. "
+ throw new IOException(String.format("fail to doAbort the MPU [%s]. "
+ "It has been completed or aborted.", this.getUploadId()));
}
nativeStore.abortMultipartUpload(cosKey, this.uploadId);
diff --git a/src/main/java/org/apache/hadoop/fs/CosNSeekableFSDataOutputStream.java b/src/main/java/org/apache/hadoop/fs/CosNSeekableFSDataOutputStream.java
index c1d47dc4..4cbacad8 100644
--- a/src/main/java/org/apache/hadoop/fs/CosNSeekableFSDataOutputStream.java
+++ b/src/main/java/org/apache/hadoop/fs/CosNSeekableFSDataOutputStream.java
@@ -49,8 +49,8 @@ public boolean seekToNewSource(long pos) throws IOException {
}
@Override
- public void abort() {
- this.seekableOutputStream.abort();
+ public void doAbort() {
+ this.seekableOutputStream.doAbort();
}
@Override
@@ -170,9 +170,9 @@ public synchronized boolean seekToNewSource(long l) throws IOException {
}
@Override
- public synchronized void abort() {
+ public synchronized void doAbort() {
if (this.closed) {
- // 已经关闭了,无需额外 abort
+ // 已经关闭了,无需额外 doAbort
return;
}
diff --git a/src/main/java/org/apache/hadoop/fs/CosNativeFileSystemStore.java b/src/main/java/org/apache/hadoop/fs/CosNativeFileSystemStore.java
index 3911d8fe..f586c35a 100644
--- a/src/main/java/org/apache/hadoop/fs/CosNativeFileSystemStore.java
+++ b/src/main/java/org/apache/hadoop/fs/CosNativeFileSystemStore.java
@@ -612,7 +612,7 @@ public PartETag uploadPartCopy(String uploadId, String srcKey, String destKey,
}
public void abortMultipartUpload(String key, String uploadId) throws IOException {
- LOG.info("Ready to abort the multipart upload. cos key: {}, upload id: {}.", key, uploadId);
+ LOG.info("Ready to doAbort the multipart upload. cos key: {}, upload id: {}.", key, uploadId);
try {
AbortMultipartUploadRequest abortMultipartUploadRequest =
diff --git a/src/main/java/org/apache/hadoop/fs/cosn/Abortable.java b/src/main/java/org/apache/hadoop/fs/cosn/Abortable.java
index 99ea1993..95e3b567 100644
--- a/src/main/java/org/apache/hadoop/fs/cosn/Abortable.java
+++ b/src/main/java/org/apache/hadoop/fs/cosn/Abortable.java
@@ -3,5 +3,5 @@
import java.io.IOException;
public interface Abortable {
- void abort() throws IOException;
+ void doAbort() throws IOException;
}
diff --git a/src/main/java/org/apache/hadoop/fs/cosn/multipart/upload/MultipartManager.java b/src/main/java/org/apache/hadoop/fs/cosn/multipart/upload/MultipartManager.java
index 3da9592d..f6c3c508 100644
--- a/src/main/java/org/apache/hadoop/fs/cosn/multipart/upload/MultipartManager.java
+++ b/src/main/java/org/apache/hadoop/fs/cosn/multipart/upload/MultipartManager.java
@@ -550,10 +550,10 @@ private void releaseRemoteParts() {
LOG.info("Begin to release remote parts for the cos key [{}]. upload id: {}.",
cosKey, this.uploadId);
try {
- // abort 掉远程块,就相当于清理掉云端的 parts 了。
+ // doAbort 掉远程块,就相当于清理掉云端的 parts 了。
nativeStore.abortMultipartUpload(cosKey, this.uploadId);
} catch (IOException e) {
- // 如果 abort 发生异常,则原先的 partCopy 块就残留在云端了。不影响当前使用,只需要用户手动去存储桶清理一下即可。
+ // 如果 doAbort 发生异常,则原先的 partCopy 块就残留在云端了。不影响当前使用,只需要用户手动去存储桶清理一下即可。
LOG.warn("Abort the MPU [{}] for the cos key [{}].", this.uploadId, cosKey, e);
}
}