This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example; | |
import java.util.HashMap; | |
import org.apache.spark.SparkConf; | |
import org.apache.spark.api.java.JavaSparkContext; | |
import org.apache.spark.api.java.JavaRDD; | |
import org.apache.spark.broadcast.Broadcast; | |
import org.bson.Document; | |
import com.mongodb.spark.api.java.MongoSpark; | |
public class App |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.example</groupId> | |
<artifactId>spark-demo</artifactId> | |
<packaging>jar</packaging> | |
<version>1.0-SNAPSHOT</version> | |
<name>spark-demo</name> | |
<url>http://maven.apache.org</url> | |
<dependencies> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### https://github.com/tjworks/mongoscripts/tree/master/x509 ### | |
# Prerequisites: | |
# a. Make sure you have MongoDB Enterprise installed. | |
# b. Make sure mongod/mongo are in the executable path | |
# c. Make sure no mongod running on 27017 port, or change the port below | |
# d. Run this script in a clean directory | |
##### Feel free to change following section values #### | |
# Changing this to include: country, province, city, company | |
dn_prefix="/C=CN/ST=GD/L=Shenzhen/O=MongoDB China" |