question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Why does Mgr mode only support cluster mode ?I want use it in memory mode !

See original GitHub issue

// when i use mgr in memory mode ,it,conn`t work initHeartBeatJobs ! private void initHeartBeatJobs(final String databaseName, final Map<String, DataSource> dataSourceMap) { //when I use Mgr modeScheduleContext.isPresent() is false Optional<ModeScheduleContext> modeScheduleContext = ModeScheduleContextFactory.getInstance().get(); if (modeScheduleContext.isPresent()) { for (Entry<String, DatabaseDiscoveryDataSourceRule> entry : dataSourceRules.entrySet()) { DatabaseDiscoveryDataSourceRule rule = entry.getValue(); Map<String, DataSource> dataSources = dataSourceMap.entrySet().stream().filter(each -> !rule.getDisabledDataSourceNames().contains(each.getKey())) .collect(Collectors.toMap(Entry::getKey, Entry::getValue)); String jobName = rule.getDatabaseDiscoveryProviderAlgorithm().getType() + “-” + databaseName + “-” + rule.getGroupName(); CronJob job = new CronJob(jobName, each -> new HeartbeatJob(databaseName, rule.getGroupName(), rule.getPrimaryDataSourceName(), dataSources, rule.getDatabaseDiscoveryProviderAlgorithm(), rule.getDisabledDataSourceNames()).execute(null), rule.getHeartbeatProps().getProperty(“keep-alive-cron”)); modeScheduleContext.get().startCronJob(job); } } }

Fixes https://github.com/apache/shardingsphere/issues/13875 part 7.

Changes proposed in this pull request:

Add ModeScheduleContext and integrate with ContextManager. Design for MGR scheduling requirement for now. Currently, not all mode type is supported:

Supported : “Cluster” mode type, “ZooKeeper” repository type Unsupported : “Standalone” mode type, “Memory” mode type and other repository type in “Cluster” mode Sharing registry center API of ShardingSphere and ElasticJob is considerred, API:

ShardingSphere : PersistRepository, ClusterPersistRepository, StandalonePersistRepository ElasticJob : CoordinatorRegistryCenter They are so different to use adapter design pattern.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
github-actions[bot]commented, Oct 8, 2022

Hello , this issue has not received a reply for several days. This issue is supposed to be closed.

0reactions
laynotescommented, Jun 23, 2022

yes, i can fix it !

---- Replied Message ---- | From | Liang @.> | | Date | 06/23/2022 22:03 | | To | @.> | | Cc | @.@.> | | Subject | Re: [apache/shardingsphere] Why does Mgr mode only support cluster mode ?I want use it in memory mode ! (Issue #17791) |

@laynotes Do you wanna to fix it?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cluster Mode Overview - Spark 3.3.1 Documentation
Cluster Mode Overview. This document gives a short overview of how Spark runs on clusters, to make it easier to understand the components...
Read more >
Cluster Mode - Single Cell Gene Expression - Support
Cell Ranger can be run in cluster mode, using SGE or LSF to run the stages on multiple nodes via batch scheduling. This...
Read more >
Best practices: Cluster configuration | Databricks on AWS
Databricks supports three cluster modes: Standard, High Concurrency, and Single Node. Most regular users use Standard or Single Node clusters.
Read more >
Best practices: Cluster configuration - Azure Databricks
Azure Databricks supports three cluster modes: Standard, ... Single Node clusters are intended for jobs that use small amounts of data or ...
Read more >
Mule Runtime High Availability (HA) Cluster Overview
Compared to a single node instance, clusters can support more users or improve ... In cluster mode, Mule always distributes and shares the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found