forked from TencentBlueKing/bk-repo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: 支持系统GC和优化归档代码 TencentBlueKing#1483 * feat: 支持系统GC和优化归档代码 TencentBlueKing#1483 * feat: 修改metrics指标 TencentBlueKing#1483
- Loading branch information
1 parent
1f16a30
commit 9659fdf
Showing
114 changed files
with
3,310 additions
and
466 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
src/backend/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/CompressStatus.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package com.tencent.bkrepo.archive | ||
|
||
enum class CompressStatus { | ||
/** | ||
* 已创建 | ||
* */ | ||
CREATED, | ||
|
||
/** | ||
* 压缩中 | ||
* */ | ||
COMPRESSING, | ||
|
||
/** | ||
* 已压缩 | ||
* */ | ||
COMPRESSED, | ||
|
||
/** | ||
* 已完成 | ||
* */ | ||
COMPLETED, | ||
|
||
/** | ||
* 等待解压 | ||
* */ | ||
WAIT_TO_UNCOMPRESS, | ||
|
||
/** | ||
* 正在解压 | ||
* */ | ||
UNCOMPRESSING, | ||
|
||
/** | ||
* 已解压 | ||
* */ | ||
UNCOMPRESSED, | ||
|
||
/** | ||
* 表示链头 | ||
* */ | ||
NONE, | ||
|
||
/** | ||
* 压缩失败 | ||
* */ | ||
COMPRESS_FAILED, | ||
|
||
/** | ||
* 解压失败 | ||
* */ | ||
UNCOMPRESS_FAILED, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
...end/archive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/pojo/CompressedInfo.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.tencent.bkrepo.archive.pojo | ||
|
||
import com.tencent.bkrepo.common.api.constant.StringPool | ||
|
||
class CompressedInfo( | ||
val status: Int, // 0 压缩中, 1 压缩成功 | ||
val uncompressedSize: Long, | ||
val compressedSize: Long, | ||
val ratio: String = StringPool.calculateRatio(uncompressedSize, compressedSize), | ||
) |
9 changes: 9 additions & 0 deletions
9
...api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/CompleteCompressRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.tencent.bkrepo.archive.request | ||
|
||
import com.tencent.bkrepo.repository.constant.SYSTEM_USER | ||
|
||
data class CompleteCompressRequest( | ||
val sha256: String, | ||
val storageCredentialsKey: String?, | ||
val operator: String = SYSTEM_USER, | ||
) |
11 changes: 11 additions & 0 deletions
11
...ive/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/CompressFileRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.tencent.bkrepo.archive.request | ||
|
||
import com.tencent.bkrepo.repository.constant.SYSTEM_USER | ||
|
||
data class CompressFileRequest( | ||
val sha256: String, | ||
val size: Long, | ||
val baseSha256: String, | ||
val storageCredentialsKey: String?, | ||
val operator: String = SYSTEM_USER, | ||
) |
9 changes: 9 additions & 0 deletions
9
...e/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/DeleteCompressRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.tencent.bkrepo.archive.request | ||
|
||
import com.tencent.bkrepo.repository.constant.SYSTEM_USER | ||
|
||
data class DeleteCompressRequest( | ||
val sha256: String, | ||
val storageCredentialsKey: String?, | ||
val operator: String = SYSTEM_USER, | ||
) |
9 changes: 9 additions & 0 deletions
9
...e/api-archive/src/main/kotlin/com/tencent/bkrepo/archive/request/UncompressFileRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.tencent.bkrepo.archive.request | ||
|
||
import com.tencent.bkrepo.repository.constant.SYSTEM_USER | ||
|
||
data class UncompressFileRequest( | ||
val sha256: String, | ||
val storageCredentialsKey: String?, | ||
val operator: String = SYSTEM_USER, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...iz-archive/src/main/kotlin/com/tencent/bkrepo/archive/event/StorageFileCompressedEvent.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.tencent.bkrepo.archive.event | ||
|
||
import com.tencent.bkrepo.common.storage.monitor.Throughput | ||
|
||
/** | ||
* 存储文件压缩事件 | ||
* */ | ||
data class StorageFileCompressedEvent( | ||
val sha256: String, | ||
val baseSha256: String, | ||
val uncompressed: Long, | ||
val compressed: Long, | ||
val storageCredentialsKey: String?, | ||
val throughput: Throughput, | ||
) |
14 changes: 14 additions & 0 deletions
14
...-archive/src/main/kotlin/com/tencent/bkrepo/archive/event/StorageFileUncompressedEvent.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.tencent.bkrepo.archive.event | ||
|
||
import com.tencent.bkrepo.common.storage.monitor.Throughput | ||
|
||
/** | ||
* 存储文件解压事件 | ||
* */ | ||
data class StorageFileUncompressedEvent( | ||
val sha256: String, | ||
val uncompressed: Long, | ||
val compressed: Long, | ||
val storageCredentialsKey: String?, | ||
val throughput: Throughput, | ||
) |
98 changes: 0 additions & 98 deletions
98
...d/archive/biz-archive/src/main/kotlin/com/tencent/bkrepo/archive/job/ArchiveSubscriber.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.