in bigtop-data-generators/bigtop-name-generator/src/main/java/org/apache/bigtop/datagenerators/namegenerator/NameReader.java [42:67]
public Names readData() throws FileNotFoundException
{
Scanner scanner = new Scanner(path);
Map<String, Double> firstNames = Maps.newHashMap();
Map<String, Double> lastNames = Maps.newHashMap();
while(scanner.hasNextLine())
{
String line = scanner.nextLine();
String[] cols = line.trim().split(",");
String name = cols[0];
double weight = 1.0 / (Double.parseDouble(cols[5]) + 1.0);
if(cols[4].equals("1"))
firstNames.put(name, weight);
if(cols[3].equals("1"))
lastNames.put(name, weight);
}
scanner.close();
return new Names(firstNames, lastNames);
}