public void setSystemNameForStreams(Set<Stream> streams) {
		Map<Integer, String> batchSizeMap = new HashMap<Integer, String>();
		batchSizeMap.put(1, "kafka0"); // default system with sync producer
		int counter = 0;
		for (Stream stream:streams) {
			SamzaStream samzaStream = (SamzaStream) stream;
			String systemName = batchSizeMap.get(samzaStream.getBatchSize());
			if (systemName == null) {
				counter++;
				// Add new system
				systemName = "kafka"+Integer.toString(counter);
				batchSizeMap.put(samzaStream.getBatchSize(), systemName);
			}
			samzaStream.setSystemName(systemName);
		}

}
public void setSystemNameForStreams ( Set < Stream > streams ) { Map < Integer , String > batchSizeMap = new HashMap < Integer , String > ( ) ; batchSizeMap . put ( 1 , "kafka0" ) ; int counter = 0 ; for ( Stream stream : streams ) { SamzaStream samzaStream = ( SamzaStream ) stream ; String systemName = batchSizeMap . get ( samzaStream . getBatchSize ( ) ) ; if ( systemName == null ) { counter ++ ; systemName = "kafka" + Integer . toString ( counter ) ; batchSizeMap . put ( samzaStream . getBatchSize ( ) , systemName ) ; } samzaStream . setSystemName ( systemName ) ; } }
/*