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

Make ES number of shards and replicas configurable #303

Merged
merged 5 commits into from
Aug 2, 2017
Merged

Conversation

mh-park
Copy link
Contributor

@mh-park mh-park commented Aug 2, 2017

Resolves #300

@@ -31,11 +31,13 @@ import (

// Configuration describes the configuration properties needed to connect to a ElasticSearch cluster
Copy link
Contributor

Choose a reason for hiding this comment

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

an

ctx := context.Background()
if numShards == 0 {
numShards = 5
Copy link
Contributor

Choose a reason for hiding this comment

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

consts

@@ -178,10 +179,16 @@ func TestSpanWriter_WriteSpan(t *testing.T) {
spanExistsService.On("Do", mock.AnythingOfType("*context.emptyCtx")).Return(testCase.spanIndexExists, nil)

serviceCreateService := &mocks.IndicesCreateService{}
serviceMapping = strings.Replace(serviceMapping, "${__NUMBER_OF_SHARDS__}", strconv.FormatInt(w.writer.numShards, 10), 1)
Copy link
Contributor

Choose a reason for hiding this comment

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

any better way to test this? right now you're using the same replace logic in the code and in the test to ensure the mapping was replaced.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 6707a4c on es-custom-shard into 77dc8bd on master.

@mh-park mh-park merged commit 464471d into master Aug 2, 2017
@mh-park mh-park deleted the es-custom-shard branch August 2, 2017 20:33
ideepika pushed a commit to ideepika/jaeger that referenced this pull request Oct 22, 2017
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.

3 participants