@Override
 public List<InputSplit> calculateSplits() {
   final List<InputSplit> splits = new ArrayList<InputSplit>();
   MongoInputSplit mongoSplit = new MongoInputSplit();
   mongoSplit.setInputURI(this.inputURI);
   mongoSplit.setQuery(this.query);
   mongoSplit.setFields(this.fields);
   mongoSplit.setSort(this.sort);
   mongoSplit.setNoTimeout(this.noTimeout);
   splits.add(mongoSplit);
   return splits;
 }
 private static ServerAddress _checkAddress(List<ServerAddress> addrs) {
   if (addrs == null) throw new NullPointerException("addresses can't be null");
   if (addrs.size() == 0) throw new IllegalArgumentException("need to specify at least 1 address");
   return addrs.get(0);
 }