Skip to content

Commit 1631542

Browse files
jschwinger233CMGS
authored andcommitted
Abstract Resources (#256)
* intro scheduler v2: adapter to v1 * cluster: rewrite create and realloc * types: introduce resource interface to unify * scheduler: expose SelectNodes to encap ScheduleV1 * store: new UpdateNodes and Processing interfaces * strategy: adjust to new resource data structure * rpc: create option harness resource interface * utils: minor fix to transaction * pass lint and codacy * fix transactions for realloc and replace
1 parent f2c5f6a commit 1631542

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2024
-1520
lines changed

cluster/calcium/calcium.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,11 @@ func New(config types.Config, embeddedStorage bool) (*Calcium, error) {
3535
}
3636

3737
// set scheduler
38-
scheduler, err := complexscheduler.New(config)
38+
potassium, err := complexscheduler.New(config)
3939
if err != nil {
4040
return nil, err
4141
}
42+
scheduler.InitSchedulerV1(potassium)
4243

4344
// set scm
4445
var scm source.Source
@@ -55,7 +56,7 @@ func New(config types.Config, embeddedStorage bool) (*Calcium, error) {
5556
// set watcher
5657
watcher := helium.New(config.GRPCConfig, store)
5758

58-
return &Calcium{store: store, config: config, scheduler: scheduler, source: scm, watcher: watcher}, err
59+
return &Calcium{store: store, config: config, scheduler: potassium, source: scm, watcher: watcher}, err
5960
}
6061

6162
// Finalizer use for defer

0 commit comments

Comments
 (0)