Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.

Conversation

@ethanliou
Copy link

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

case "PRIMARY" => com.mongodb.casbah.ReadPreference.Primary
case "SECONDARY" => com.mongodb.casbah.ReadPreference.Secondary
case "NEAREST" => com.mongodb.casbah.ReadPreference.Nearest
case "PRIMARYPREFERRED" => com.mongodb.casbah.ReadPreference.primaryPreferred
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