code: public void init(Partition partition) {
          try {
  
              List<ServerAddress> addressList = new ArrayList<>();
  
              for (String s : (List<String>) ((DeepPartition) partition).splitWrapper().getReplicas()) {
                  addressList.add(new ServerAddress(s));
              }
  
              //Credentials
              List<MongoCredential> mongoCredentials = new ArrayList<>();
  
              if (mongoDeepJobConfig.getUsername() != null && mongoDeepJobConfig.getPassword() != null) {
                  MongoCredential credential = MongoCredential.createMongoCRCredential(mongoDeepJobConfig.getUsername(),
                          mongoDeepJobConfig.getDatabase(),
                          mongoDeepJobConfig.getPassword().toCharArray());
                  mongoCredentials.add(credential);
  
              }
  
              mongoClient = new MongoClient(addressList, mongoCredentials);
              mongoClient.setReadPreference(ReadPreference.valueOf(mongoDeepJobConfig.getReadPreference()));
              db = mongoClient.getDB(mongoDeepJobConfig.getDatabase());
              collection = db.getCollection(mongoDeepJobConfig.getCollection());
  
              dbCursor = collection.find(generateFilterQuery((MongoPartition) partition),
                      mongoDeepJobConfig.getDBFields());
  
          } catch (UnknownHostException e) {
              throw new DeepExtractorInitializationException(e);
          }
      }
docs: Init void.
  
  @param partition the partition