Skip to content

Redirect server output#12

Open
ludwigme wants to merge 3 commits into
ozimov:masterfrom
ludwigme:redirect-server-output
Open

Redirect server output#12
ludwigme wants to merge 3 commits into
ozimov:masterfrom
ludwigme:redirect-server-output

Conversation

@ludwigme

Copy link
Copy Markdown

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
Copy Markdown
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

OzWolf commented Jul 9, 2020

Copy link
Copy Markdown

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

zHaytam commented Jul 15, 2020

Copy link
Copy Markdown

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