It'll probably OK to remain in the class (makes life easier for Java
developers not that familiar with Mongo) - I'll have a go at tidying later
(we use Mongo at jClarity, so I'm curious to see what happens in error
scenarios)

Cheers,
Martijn


On 17 February 2014 17:59, Alex Theedom <notifications@github.com> wrote:

> In
> javacountdown-ee6/src/main/java/org/adoptopenjdk/javacountdown/ImportGeoData.java:
>
> > +	
> > +	
> > +	/**
> > +	 * This method performs the import into the Mongo database.
> > +	 */
> > +	public void execute() {
> > +
> > +		String csvFile 		= CSV_FILE_LOCATION;
> > +		BufferedReader br 	= null;
> > +		String line 		= "";
> > +		String delimiter 	= ",";
> > +		
> > +		JSONUtility jsonUtility = new JSONUtility();
> > +		DBCollection coll 		= createDBConnection();
> > +
> > +		try {
>
> I assume that if something goes wrong it will throw some exception and
> therefore will be clear that something went wrong. So delete the partial
> collection and start again. Only takes 5mins or so to run. Perhaps better
> to remove the option of importing the CSV and let MongoDB handle to import
> of the JSON directly.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/AdoptOpenJDK/javacountdown/pull/67/files#r9799584>
> .
>