-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sync write through worker #17502
Sync write through worker #17502
Conversation
a405189
to
2e4d3b8
Compare
… sync-write-through-worker
Signed-off-by: Huang Hua <huanghua78@msn.com>
dora/core/client/fs/src/main/java/alluxio/client/file/DoraFileOutStream.java
Outdated
Show resolved
Hide resolved
dora/core/server/worker/src/main/java/alluxio/worker/dora/PagedFileWriter.java
Show resolved
Hide resolved
dora/core/server/worker/src/main/java/alluxio/worker/dora/PagedFileWriter.java
Outdated
Show resolved
Hide resolved
dora/core/client/fs/src/main/java/alluxio/client/file/dora/netty/NettyDataWriter.java
Outdated
Show resolved
Hide resolved
dora/core/client/fs/src/main/java/alluxio/client/file/dora/netty/NettyDataWriter.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a few comments, PTAL thanks!
dora/core/client/fs/src/main/java/alluxio/client/file/DoraFileOutStream.java
Outdated
Show resolved
Hide resolved
dora/core/client/fs/src/main/java/alluxio/client/file/DoraFileOutStream.java
Outdated
Show resolved
Hide resolved
dora/core/client/fs/src/main/java/alluxio/client/file/DoraFileOutStream.java
Show resolved
Hide resolved
dora/core/client/fs/src/main/java/alluxio/client/file/DoraFileOutStreamBak.java
Outdated
Show resolved
Hide resolved
dora/core/client/fs/src/main/java/alluxio/client/file/DoraFileOutStreamBak.java
Outdated
Show resolved
Hide resolved
dora/core/client/fs/src/main/java/alluxio/client/file/dora/netty/NettyDataWriter.java
Outdated
Show resolved
Hide resolved
dora/core/client/fs/src/main/java/alluxio/client/file/dora/netty/NettyDataWriter.java
Outdated
Show resolved
Hide resolved
dora/core/server/worker/src/main/java/alluxio/worker/netty/FileWriteHandler.java
Outdated
Show resolved
Hide resolved
dora/core/server/worker/src/main/java/alluxio/worker/netty/PacketReadTaskStateMachine.java
Outdated
Show resolved
Hide resolved
dora/core/server/worker/src/main/java/alluxio/worker/page/PagedBlockMetaStore.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a few comments, PTAL thanks!
dora/core/client/fs/src/main/java/alluxio/client/file/DoraFileOutStream.java
Outdated
Show resolved
Hide resolved
dora/core/client/fs/src/main/java/alluxio/client/file/DoraFileOutStream.java
Outdated
Show resolved
Hide resolved
if (!mUnderStorageType.isSyncPersist()) { | ||
mUnderStorageOutputStream = null; | ||
} else { // Write is through to the under storage, create mUnderStorageOutputStream. | ||
mUnderStorageOutputStream = ufsOutStream; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We only deal with syncPersist
writes currently, so this check is unnecessary, and mUnderStorageOutputStream
must be non-null.
dora/core/client/fs/src/main/java/alluxio/client/file/DoraFileOutStream.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Huang Hua <huanghua78@msn.com>
@JiamingMai Does DoraFileOutStream has some simple tests? |
Some high level suggestions
|
Signed-off-by: Huang Hua <huanghua78@msn.com>
Signed-off-by: Huang Hua <huanghua78@msn.com>
Good idea! |
…t master any more
FIXME: the mNettyDataWriter.close() is stuck if no data is written. Signed-off-by: Huang Hua <huanghua78@msn.com>
I think the existing tests have already covered this class. |
alluxio-bot, merge this please. |
This PR implements the "sync write through worker" feature that supports writing data to Alluxio DORA and UFS in "sync" way.