Skip to content
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

[New Scheduler] Implement FCPSchedulerServer #5030

Merged
merged 1 commit into from
Feb 2, 2021

Conversation

ningyougang
Copy link
Contributor

@ningyougang ningyougang commented Nov 20, 2020

Description

This is the document for new Scheduler: https://cwiki.apache.org/confluence/display/OPENWHISK/New+architecture+proposal

Regarding FPCSchedulerServer, it provides some APIs to access the concrete info for scheduler node. including

  • /state
curl -u xxx:'xxx' http://xxx.xxx.xxx.xxx:13001/state
{"0":"104","creationCount":"0"}    # it means  current scheduler node: `scheduler0` includes `104`  total queue,  has no creating queues 
  • /queue/total
curl -u xxx:'xxx' http://xxx.xxx.xxx.xxx:13001/queue/total
104 # it means includes 104 total queues
  • /queue/status
curl -u xxx:'xxx' http://xxx.xxx.xxx.xxx:13001/queue/status
[{
		"data": "RunningData(Actor[akka://scheduler-actor-system/user/$Qd#905522799],Actor[akka://scheduler-actor-system/user/$Pd#-785916053])",
		"fqn": "xxx@0.0.19",
		"invocationNamespace": "xxx",
		"status": "Running",
		"waitingActivation": 0
	}, {
		"data": "RunningData(Actor[akka://scheduler-actor-system/user/$Y#-32044316],Actor[akka://scheduler-actor-system/user/$X#-359037829])",
		"fqn": "xxx@0.0.4",
		"invocationNamespace": "xxx",
		"status": "Running",
		"waitingActivation": 0
	}
 ...
 ]
  • disable
    When want to gracefully shutdown the scheduler, can invoke /disable
curl -u xxx:'xxx' -X POST http://xxx.xxx.xxx.xxx:13001/disable

Related issue and scope

  • I opened an issue to propose and discuss this change (#????)

My changes affect the following components

  • API
  • Controller
  • Message Bus (e.g., Kafka)
  • Loadbalancer
  • Invoker
  • Intrinsic actions (e.g., sequences, conductors)
  • Data stores (e.g., CouchDB)
  • Tests
  • Deployment
  • CLI
  • General tooling
  • Documentation

Types of changes

  • Bug fix (generally a non-breaking change which closes an issue).
  • Enhancement or new feature (adds new functionality).
  • Breaking change (a bug fix or enhancement which changes existing behavior).

Checklist:

  • I signed an Apache CLA.
  • I reviewed the style guides and followed the recommendations (Travis CI will check :).
  • I added tests to cover my changes.
  • My changes require further changes to the documentation.
  • I updated the documentation where necessary.

logger.warn(this, "Scheduler is disabled")
scheduler.disable()
complete("scheduler disabled")
} ~ (path("queue" / "total") & get) {
Copy link
Contributor

Choose a reason for hiding this comment

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

let's put queue in a constant as it will likely be reused as new api's are added

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated accordingly, thanks for your review!

@codecov-io
Copy link

codecov-io commented Nov 20, 2020

Codecov Report

Merging #5030 (a8a1f83) into master (faae555) will decrease coverage by 6.34%.
The diff coverage is 76.19%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5030      +/-   ##
==========================================
- Coverage   82.10%   75.75%   -6.35%     
==========================================
  Files         200      207       +7     
  Lines        9760    10034     +274     
  Branches      447      444       -3     
==========================================
- Hits         8013     7601     -412     
- Misses       1747     2433     +686     
Impacted Files Coverage Δ
...rg/apache/openwhisk/core/scheduler/Scheduler.scala 0.00% <0.00%> (ø)
.../openwhisk/core/scheduler/FPCSchedulerServer.scala 95.83% <94.11%> (ø)
...core/database/cosmosdb/RxObservableImplicits.scala 0.00% <0.00%> (-100.00%) ⬇️
...ore/database/cosmosdb/cache/CacheInvalidator.scala 0.00% <0.00%> (-100.00%) ⬇️
...e/database/cosmosdb/cache/ChangeFeedConsumer.scala 0.00% <0.00%> (-100.00%) ⬇️
...core/database/cosmosdb/CosmosDBArtifactStore.scala 0.00% <0.00%> (-95.85%) ⬇️
...sk/core/database/cosmosdb/CosmosDBViewMapper.scala 0.00% <0.00%> (-93.90%) ⬇️
...tabase/cosmosdb/cache/CacheInvalidatorConfig.scala 0.00% <0.00%> (-92.31%) ⬇️
...enwhisk/connector/kafka/KamonMetricsReporter.scala 0.00% <0.00%> (-83.34%) ⬇️
...e/database/cosmosdb/cache/KafkaEventProducer.scala 0.00% <0.00%> (-78.58%) ⬇️
... and 26 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update faae555...a8a1f83. Read the comment docs.

@bdoyle0182
Copy link
Contributor

LGTM

@ningyougang
Copy link
Contributor Author

Have any comment?

@style95
Copy link
Member

style95 commented Jan 28, 2021

I think @bdoyle0182 already approved this PR and it has been so long so we can merge this if it passes all CI tests.

@ningyougang ningyougang merged commit 1753946 into apache:master Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants