Skip to content

feat: data loading module code optimization (#227)#228

Merged
szbr9486 merged 5 commits intomainfrom
xuen
Aug 29, 2025
Merged

feat: data loading module code optimization (#227)#228
szbr9486 merged 5 commits intomainfrom
xuen

Conversation

@bigbigxu
Copy link
Copy Markdown
Contributor

No description provided.

# Conflicts:
#	curvine-server/src/master/master_handler.rs
#	curvine-server/src/master/master_server.rs
#	curvine-server/src/worker/handler/worker_handler.rs
#	curvine-server/src/worker/load/worker_load_handler.rs
#	curvine-server/src/worker/mod.rs
#	curvine-server/src/worker/worker_server.rs
#	curvine-server/tests/master_fs_test.rs
import "common.proto";

// job and task status enumeration
enum WorkStateProto {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WorkState->JobState maybe better?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both job and task have state, so a compromise name is used.


// job and task status enumeration
enum WorkStateProto {
WORK_STATE_PROTO_PENDING = 0;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PENDING is Ok

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

State enum number start with 1 maybe better? Zero means abnormal state.

// job and task status enumeration
enum WorkStateProto {
WORK_STATE_PROTO_PENDING = 0;
WORK_STATE_PROTO_LOADING = 1;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto. LOADING is Ok

job_cleanup_ttl: Default::default(),
job_cleanup_ttl_str: "10m".to_string(),

job_max_files: 100000,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

100000 define as a constant variable

task_report_interval: Default::default(),
task_report_interval_str: "5s".to_string(),

worker_max_concurrent_tasks: 1000,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As before

use crate::worker::task::TaskContext;

#[derive(Clone)]
pub struct TaskStore {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the difference between job and task?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The job will be split into multiple tasks and distributed to different workers for execution.

@szbr9486 szbr9486 merged commit e1ec2b8 into main Aug 29, 2025
3 checks passed
szbr9486 pushed a commit that referenced this pull request Sep 11, 2025
* fix: fix the bug that FsWriter pos, pos_mut return values are incorrect

* fix: ufs path parsing bug fix

* feat: data loading module code optimization (#227)

* style: improve code readability while maintaining functionality"
@lzjqsdd lzjqsdd added the enhancement New feature or request label Sep 22, 2025
Coderlxl pushed a commit to Coderlxl/curvine that referenced this pull request Dec 25, 2025
…O#228)

* fix: fix the bug that FsWriter pos, pos_mut return values are incorrect

* fix: ufs path parsing bug fix

* feat: data loading module code optimization (CurvineIO#227)

* style: improve code readability while maintaining functionality"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants