test_class.declarator: hashPartitioner
test_class.modifier: private
test_class.original_string: private HashPartitioner<Tuple2<String, Integer>> hashPartitioner;
test_class.type: HashPartitioner<Tuple2<String, Integer>>
test_class.var_name: hashPartitioner
test_class.declarator: streamRecord1 = new StreamRecord<Tuple2<String, Integer>>(new Tuple2<String, Integer>("test", 0))
test_class.modifier: private
test_class.original_string: private StreamRecord<Tuple2<String, Integer>> streamRecord1 = new StreamRecord<Tuple2<String, Integer>>(new Tuple2<String, Integer>("test", 0));
test_class.type: StreamRecord<Tuple2<String, Integer>>
test_class.var_name: streamRecord1
test_class.declarator: streamRecord2 = new StreamRecord<Tuple2<String, Integer>>(new Tuple2<String, Integer>("test", 42))
test_class.modifier: private
test_class.original_string: private StreamRecord<Tuple2<String, Integer>> streamRecord2 = new StreamRecord<Tuple2<String, Integer>>(new Tuple2<String, Integer>("test", 42));
test_class.type: StreamRecord<Tuple2<String, Integer>>
test_class.var_name: streamRecord2
test_class.declarator: sd1 = new SerializationDelegate<StreamRecord<Tuple2<String, Integer>>>(null)
test_class.modifier: private
test_class.original_string: private SerializationDelegate<StreamRecord<Tuple2<String, Integer>>> sd1 = new SerializationDelegate<StreamRecord<Tuple2<String, Integer>>>(null);
test_class.type: SerializationDelegate<StreamRecord<Tuple2<String, Integer>>>
test_class.var_name: sd1
test_class.declarator: sd2 = new SerializationDelegate<StreamRecord<Tuple2<String, Integer>>>(null)
test_class.modifier: private
test_class.original_string: private SerializationDelegate<StreamRecord<Tuple2<String, Integer>>> sd2 = new SerializationDelegate<StreamRecord<Tuple2<String, Integer>>>(null);
test_class.type: SerializationDelegate<StreamRecord<Tuple2<String, Integer>>>
test_class.var_name: sd2
test_class.file: flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/partitioner/HashPartitionerTest.java
test_class.identifier: HashPartitionerTest
test_case.body: @Test
  	public void testSelectChannelsGrouping() {
  		sd1.setInstance(streamRecord1);
  		sd2.setInstance(streamRecord2);
  
  		assertArrayEquals(hashPartitioner.selectChannels(sd1, 1),
  				hashPartitioner.selectChannels(sd2, 1));
  		assertArrayEquals(hashPartitioner.selectChannels(sd1, 2),
  				hashPartitioner.selectChannels(sd2, 2));
  		assertArrayEquals(hashPartitioner.selectChannels(sd1, 1024),
  				hashPartitioner.selectChannels(sd2, 1024));
  	}
test_case.class_method_signature: HashPartitionerTest.testSelectChannelsGrouping()
test_case.full_signature: @Test public void testSelectChannelsGrouping()
test_case.identifier: testSelectChannelsGrouping
test_case.invocations: setInstance setInstance assertArrayEquals selectChannels selectChannels assertArrayEquals selectChannels selectChannels assertArrayEquals selectChannels selectChannels
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSelectChannelsGrouping()
focal_class.declarator: serialVersionUID = 1L
focal_class.modifier: private static final
focal_class.original_string: private static final long serialVersionUID = 1L;
focal_class.type: long
focal_class.var_name: serialVersionUID
focal_class.declarator: returnArray = new int[1]
focal_class.modifier: private
focal_class.original_string: private int[] returnArray = new int[1];
focal_class.type: int[]
focal_class.var_name: returnArray
focal_class.declarator: keySelector
focal_class.original_string: KeySelector<T, ?> keySelector;
focal_class.type: KeySelector<T, ?>
focal_class.var_name: keySelector
focal_class.file: flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/partitioner/HashPartitioner.java
focal_class.identifier: HashPartitioner
focal_class.class_method_signature: HashPartitioner.HashPartitioner(KeySelector<T, ?> keySelector)
focal_class.full_signature: public  HashPartitioner(KeySelector<T, ?> keySelector)
focal_class.identifier: HashPartitioner
focal_class.modifiers: public
focal_class.parameters: (KeySelector<T, ?> keySelector)
focal_class.signature:  HashPartitioner(KeySelector<T, ?> keySelector)
focal_class.class_method_signature: HashPartitioner.selectChannels(SerializationDelegate<StreamRecord<T>> record,
  			int numberOfOutputChannels)
focal_class.full_signature: @Override public int[] selectChannels(SerializationDelegate<StreamRecord<T>> record,
  			int numberOfOutputChannels)
focal_class.identifier: selectChannels
focal_class.modifiers: @Override public
focal_class.parameters: (SerializationDelegate<StreamRecord<T>> record,
  			int numberOfOutputChannels)
focal_class.return: int[]
focal_class.signature: int[] selectChannels(SerializationDelegate<StreamRecord<T>> record,
  			int numberOfOutputChannels)
focal_class.class_method_signature: HashPartitioner.copy()
focal_class.full_signature: @Override public StreamPartitioner<T> copy()
focal_class.identifier: copy
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: StreamPartitioner<T>
focal_class.signature: StreamPartitioner<T> copy()
focal_class.class_method_signature: HashPartitioner.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.superclass: extends StreamPartitioner<T>
focal_method.body: @Override
  	public int[] selectChannels(SerializationDelegate<StreamRecord<T>> record,
  			int numberOfOutputChannels) {
  		Object key;
  		try {
  			key = keySelector.getKey(record.getInstance().getValue());
  		} catch (Exception e) {
  			throw new RuntimeException("Could not extract key from " + record.getInstance().getValue(), e);
  		}
  		returnArray[0] = MathUtils.murmurHash(key.hashCode()) % numberOfOutputChannels;
  
  		return returnArray;
  	}
focal_method.class_method_signature: HashPartitioner.selectChannels(SerializationDelegate<StreamRecord<T>> record,
  			int numberOfOutputChannels)
focal_method.full_signature: @Override public int[] selectChannels(SerializationDelegate<StreamRecord<T>> record,
  			int numberOfOutputChannels)
focal_method.identifier: selectChannels
focal_method.invocations: getKey getValue getInstance getValue getInstance murmurHash hashCode
focal_method.modifiers: @Override public
focal_method.parameters: (SerializationDelegate<StreamRecord<T>> record,
  			int numberOfOutputChannels)
focal_method.return: int[]
focal_method.signature: int[] selectChannels(SerializationDelegate<StreamRecord<T>> record,
  			int numberOfOutputChannels)