Skip to content
This repository has been archived by the owner on May 27, 2020. It is now read-only.

add readPreferenceTags config #90

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ethanliou
Copy link

We need to assign the specific mongod to serve spark request. So I add this config to control it.

case "SECONDARY" => com.mongodb.casbah.ReadPreference.Secondary
case "NEAREST" => com.mongodb.casbah.ReadPreference.Nearest
case "PRIMARYPREFERRED" => com.mongodb.casbah.ReadPreference.primaryPreferred
case "SECONDARY" => com.mongodb.casbah.ReadPreference.secondary(parseReadPreferenceTags(readPreferenceTags))
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you import these values so you don't have to repeat its package path 5 times?
Something like import com.mongodb.casbah.ReadPreference.{Primary, Secondary, SecondaryPreferred, Nearest}

@pfcoperez
Copy link
Contributor

Is it possible for you to provide a test for configured read preferences?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants