-
Notifications
You must be signed in to change notification settings - Fork 602
FAQ
Frequently Asked questions:
- What types of shard keys are supported by the
ShardChunkMongoSplitter
? java.lang.IncompatibleClassChangeError: Found class XXX, but interface was expected
- Are UUIDs supported by the connector?
The ShardChunkMongoSplitter
does not support a hashed _id
index, since MongoDB will instead use the unhashed _id
index to create the splits, resulting in all data on one split. All other index types are supported, including hashed indexes on fields that are not _id
.
There are two common causes of this Exception:
-
The version of the Hadoop Connector that you're running isn't compatible with your version of Hadoop. Since version 1.3, the Hadoop Connector is compatible with all versions of Hadoop, but this isn't true for versions prior to 1.3. Make sure you have the right version.
-
You're using a different version of the MongoDB Java Driver than what the connector expects. You either need to switch to the version that the connector expects (in either
build.gradle
orproject/MongoHadoopBuild.scala
, depending on the version of the connector that you have), or change the version in that file to match the one you have.
As of 1.3.3, the Hadoop Connector supports UUIDs generated by the MongoDB Java Driver, or any UUID made to be compatible with the Java driver (an example in the Python driver). For more details, see JAVA-403 in the MongoDB Jira project.