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

Redirect server output #12

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ludwigme
Copy link

Added options to redirect output from the started Redis instances.
Usage:

RedisServerBuilder serverBuilder = RedisServer.builder()//
		.outTo(System.out)//
		.errTo(System.err)//
		.redisExecProvider(REDIS_EXEC_PROVIDER);

RedisSentinelBuilder sentinelBuilder = new RedisSentinelBuilder()//
		.outTo(System.out)//
		.errTo(System.err)//
		.redisExecProvider(REDIS_EXEC_PROVIDER);

// creates a cluster with 3 sentinels, quorum size of 2 and 3 replication
// groups, each with one master and one slave
cluster = RedisCluster.builder()//
		.withServerBuilder(serverBuilder)//
		.withSentinelBuilder(sentinelBuilder)//
		.ephemeral().sentinelCount(3).quorumSize(2).replicationGroup("master1", 1)
		.replicationGroup("master2", 1).replicationGroup("master3", 1).build();
cluster.start();

@robertotru
Copy link
Member

I don't have time to test this now. If someone else could peer review the PR I'd be glad to proceed.

@OzWolf
Copy link

OzWolf commented Jul 9, 2020

Reviewed. Both the PrintReaderRunnable jobs for error and output streams are executing on the same single threaded executor. If it was me, I'd be happier with some additions to the tests proving that enabling both the error and output streams at the same time don't cause an executor lock and that future changes don't accidentally cause one either.

@zHaytam
Copy link

zHaytam commented Jul 15, 2020

Any news on this?

martin-mfg pushed a commit to martin-mfg/embedded-redis that referenced this pull request Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants