        @Override
         protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {
 
             String cityRecord = value.toString();
             String[] tokens = cityRecord.split(",", -1);
 
             String country = tokens[COUNTRY_CODE_INDEX];
             String populationString = tokens[POPULATION_INDEX];
 
             if(country != null && country.isEmpty() == false){
 
                 if(populationString != null && populationString.isEmpty() == false){
 
                     long population = Long.parseLong(populationString);
                     String countryName = countryCodesTreeMap.get(country);
 
                     if(countryName == null) countryName = country;
 
                     countryKey.set(countryName);
                     populationValue.set(population);
                     context.write(countryKey, populationValue);
 
                 }
 
             }
        }
     }
 
 
