com.mongodb.spark.PySparkMongoInputFormat Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mongo-hadoop-spark Show documentation
Show all versions of mongo-hadoop-spark Show documentation
The MongoDB Connector for Hadoop is a plugin for Hadoop that provides the ability to use MongoDB as an input source and/or an output destination.
package com.mongodb.spark;
import com.mongodb.hadoop.MongoInputFormat;
import com.mongodb.spark.pickle.RegisterConstructors;
import com.mongodb.spark.pickle.RegisterPickles;
/**
* InputFormat that attaches custom Picklers and IObjectConstructors for
* reading and writing BSON types with PyMongo.
*/
public class PySparkMongoInputFormat extends MongoInputFormat {
private static final RegisterPickles PICKLES = new RegisterPickles();
private static final RegisterConstructors CONSTRUCTORS =
new RegisterConstructors();
static {
PICKLES.register();
CONSTRUCTORS.register();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy