Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc0cea82

Browse files
authored
Release BlockReader in CRC check
### What changes are proposed in this pull request?Please outline the changes and how this PR fixes the issue.### Why are the changes needed?Please clarify why the changes are needed. For instance, 1. If you propose a new API, clarify the use case for a new API. 2. If you fix a bug, describe the bug.### Does this PR introduce any user facing changes?Please list the user-facing changes introduced by your change, including 1. change in user-facing APIs 2. addition or removal of property keys 3. webuipr-link:#18695change-id: cid-fba7d00da83719d31df0d917e1419ed049adeed8
1 parentae64e71 commitc0cea82

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

‎core/common/src/main/java/alluxio/Sessions.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@ public class Sessions {
3636
publicstaticfinalintCACHE_UFS_SESSION_ID = -8;
3737

3838
publicstaticfinalintLOAD_SESSION_ID = -9;
39+
publicstaticfinalintWORKER_CHECKSUM_CHECK_SESSION_ID = -10;
3940

4041
// internal session id base should be smaller than all predefined session ids
41-
publicstaticfinallongINTERNAL_SESSION_ID_BASE = -8;
42+
publicstaticfinallongINTERNAL_SESSION_ID_BASE = -11;
4243

4344
/** Map from SessionId to {@link alluxio.SessionInfo} object. */
4445
privatefinalMap<Long,SessionInfo>mSessions;

‎core/server/worker/src/main/java/alluxio/worker/block/DefaultBlockWorker.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -637,10 +637,10 @@ public Map<Long, BlockChecksum> calculateBlockChecksum(List<Long> blockIds) {
637637
for (longblockId :blockIds) {
638638
Future<?>future =mChecksumCalculationThreadPool.submit(() -> {
639639
ByteBufferbf =null;
640-
try {
640+
try (BlockReaderbr =mBlockStore.createBlockReader(
641+
Sessions.WORKER_CHECKSUM_CHECK_SESSION_ID,
642+
blockId,0,false,Protocol.OpenUfsBlockOptions.getDefaultInstance())) {
641643
CRC64crc64 =newCRC64();
642-
BlockReaderbr =mBlockStore.createBlockReader(
643-
-1,blockId,0,false,Protocol.OpenUfsBlockOptions.getDefaultInstance());
644644
if (mChecksumCalculationUsingBufferPool) {
645645
bf =NioHeapBufferPool.acquire(chunkSize);
646646
}else {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp