flink-instrumentation/workspace/flink-1.4.1-instrumented/flink-1.4.1/flink-runtime/src/main/java/org/apache/flink/runtime/state/heap/CopyOnWriteStateTable.java
/**
	 * Allocate a table of the given capacity and set the threshold accordingly.
	 *
	 * @param newCapacity must be a power of two
	 */
Allocate a table of the given capacity and set the threshold accordingly.
@param newCapacity must be a power of two
Allocate a table of the given capacity and set the threshold accordingly . @param newCapacity must be a power of two
private StateTableEntry<K, N, S>[] makeTable(int newCapacity) {
		if (MAXIMUM_CAPACITY == newCapacity) {
			LOG.warn("Maximum capacity of 2^30 in StateTable reached. Cannot increase hash table size. This can lead " +
					"to more collisions and lower performance. Please consider scaling-out your job or using a " +
					"different keyed state backend implementation!");
		}
		threshold = (newCapacity >> 1) + (newCapacity >> 2); 
		@SuppressWarnings("unchecked") StateTableEntry<K, N, S>[] newTable
				= (StateTableEntry<K, N, S>[]) new StateTableEntry[newCapacity];
		return newTable;
	}
private StateTableEntry < K , N , S > [ ] makeTable ( int newCapacity ) { if ( MAXIMUM_CAPACITY == newCapacity ) { LOG . warn ( "Maximum capacity of 2^30 in StateTable reached. Cannot increase hash table size. This can lead " + "to more collisions and lower performance. Please consider scaling-out your job or using a " + "different keyed state backend implementation!" ) ; } threshold = ( newCapacity >> 1 ) + ( newCapacity >> 2 ) ; @ SuppressWarnings ( "unchecked" ) StateTableEntry < K , N , S > [ ] newTable = ( StateTableEntry < K , N , S > [ ] ) new StateTableEntry [ newCapacity ] ; return newTable ; }
Allocate a table of the given capacity and set the threshold accordingly.
Allocate a table of the given capacity and set the threshold accordingly .
// 3/4 capacity