flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/savepoint/CheckpointTestUtils.java
/**
	 * Creates a bunch of random master states.
	 */
Creates a bunch of random master states.
Creates a bunch of random master states .
public static Collection<MasterState> createRandomMasterStates(Random random, int num) {
		final ArrayList<MasterState> states = new ArrayList<>(num);
		for (int i = 0; i < num; i++) {
			int version = random.nextInt(10);
			String name = StringUtils.getRandomString(random, 5, 500);
			byte[] bytes = new byte[random.nextInt(5000) + 1];
			random.nextBytes(bytes);
			states.add(new MasterState(name, bytes, version));
		}
		return states;
	}
public static Collection < MasterState > createRandomMasterStates ( Random random , int num ) { final ArrayList < MasterState > states = new ArrayList < > ( num ) ; for ( int i = 0 ; i < num ; i ++ ) { int version = random . nextInt ( 10 ) ; String name = StringUtils . getRandomString ( random , 5 , 500 ) ; byte [ ] bytes = new byte [ random . nextInt ( 5000 ) + 1 ] ; random . nextBytes ( bytes ) ; states . add ( new MasterState ( name , bytes , version ) ) ; } return states ; }
Creates a bunch of random master states.
Creates a bunch of random master states .