Skip to content

Instantly share code, notes, and snippets.

@yelcat
Created January 26, 2013 06:18
Show Gist options
  • Save yelcat/4640523 to your computer and use it in GitHub Desktop.
Save yelcat/4640523 to your computer and use it in GitHub Desktop.
private final static String[] ipAddress = new String[]
{"10.13.43.154", "10.112.43.12", "10.13.45.123", "10.113.43.4"};
public void nextTuple() {
Utils.sleep(4000);
final Random rand = new Random();
collector.emit(new Values(ipAddress[rand.nextInt(ipAddress.length)], Math.abs(rand.nextLong())));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment