Skip to content
This repository has been archived by the owner on Jan 29, 2022. It is now read-only.

Descending split key #121

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

Conversation

inpursuit
Copy link

Support specifying "min" and "max" values for the "splitVector" command. Support descending split keys. If a split key is using an index with a descending values, then the key specified for "min" will be greater than the key specified for "max". We need to swap the min and max values when creating the InputSplits.

@llvtt llvtt added the core label Mar 13, 2015
@inpursuit
Copy link
Author

The mongo-hadoop adapter does not need to know if the split keys are descending or not, as long as the min and max split keys are reversed when using descending keys. The original issue that caused me to make this modification was that the max key of the last split bounds was null and for my descending split key this caused the last split to be significantly larger and include a lot of items that should not have been included.

Conflicts:
	core/src/main/java/com/mongodb/hadoop/splitter/StandaloneMongoSplitter.java
	core/src/main/java/com/mongodb/hadoop/util/MongoConfigUtil.java
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants