Skip to content

Conversation

Radeity
Copy link
Member

@Radeity Radeity commented Jun 3, 2023

Purpose of the PR

Main Changes

  • Introduce new computer option JOB_NAMESPACE, and modify ETCD namespace to {JOB_NAMESPACE}/{JOB_ID}
  • Modify method constructPath which can be reused to construct a path generously.

Verifying these changes

  • This change is already covered by existing tests, such as (please describe tests).

Does this PR potentially affect the following parts?

  • Nope
  • Dependencies (add/update license info)
  • Modify configurations
  • The public API
  • Other affects (typed here)

Documentation Status

  • Doc - TODO
  • Doc - Done
  • Doc - NO Need
Copy link
Contributor

@javeme javeme left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution.

Copy link
Contributor

@javeme javeme left a comment

Choose a reason for hiding this comment

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

tiny comment

@codecov
Copy link

codecov bot commented Jun 3, 2023

Codecov Report

Merging #252 (a313444) into master (7df3b43) will increase coverage by 0.00%.
The diff coverage is 87.50%.

❗ Current head a313444 differs from pull request most recent head 7057b5d. Consider uploading reports for the commit 7057b5d to get more accurate results

@@ Coverage Diff @@ ## master #252 +/- ## ========================================= Coverage 85.79% 85.79% Complexity 3238 3238 ========================================= Files 344 344 Lines 12105 12111 +6 Branches 1090 1092 +2 ========================================= + Hits 10385 10391 +6  + Misses 1194 1192 -2  - Partials 526 528 +2 
Impacted Files Coverage Δ
...rg/apache/hugegraph/computer/core/bsp/BspBase.java 90.69% <83.33%> (-1.62%) ⬇️
...ugegraph/computer/core/config/ComputerOptions.java 98.89% <100.00%> (+<0.01%) ⬆️

... and 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Radeity Radeity marked this pull request as draft June 5, 2023 14:37
javeme
javeme previously approved these changes Jun 6, 2023
Copy link
Contributor

@javeme javeme left a comment

Choose a reason for hiding this comment

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

LGTM

@Radeity
Copy link
Member Author

Radeity commented Jun 6, 2023

Hi, @javeme , I drafted this PR yesterday, cuz maybe we don't have to add this jobNamespace. We can directly use {namespace}-{name} from metadata of HugeGraphComputerJob as jobId, and users don't have to define jobId additionally. In this way, we can make sure the etcd namespace will not conflict.

If user submit a job with the same namespace and name, the existed job(resource) will be updated, for this, we should disable update operation to avoid interrupting running jobs. I'll create another issue to finish this work, WDYT?

@javeme
Copy link
Contributor

javeme commented Jun 6, 2023

I think it's OK to disable the update operation.
And we can also merge this PR as someone may run into a scenario of having multiple computer clusters with different namespaces.

@Radeity
Copy link
Member Author

Radeity commented Jun 6, 2023

And we can also merge this PR as someone may run into a scenario of having multiple computer clusters with different namespaces.

Get your point, do you mean in the scenario they share the same ETCD?

@Radeity Radeity marked this pull request as ready for review June 6, 2023 14:50
@javeme
Copy link
Contributor

javeme commented Jun 6, 2023

Get your point, do you mean in the scenario they share the same ETCD?

Yes, one etcd for multi clusters.

@imbajin imbajin changed the title feat: isolate namespace for different input data source feat(core): isolate namespace for different input data source Jun 8, 2023
@imbajin imbajin merged commit 0b3c0b4 into apache:master Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants