Java Code Examples for org.apache.flink.api.java.tuple.Tuple3#getField()

The following examples show how to use org.apache.flink.api.java.tuple.Tuple3#getField() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TupleComparatorTTT3Test.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
@Override
protected void deepEquals(
		String message,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> should,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> is) {
	
	for (int x = 0; x < should.getArity(); x++) {
		// Check whether field is of type Tuple2 because assertEquals must be called on the non Tuple2 fields.
		if(should.getField(x) instanceof Tuple2) {
			this.deepEquals(message, (Tuple2<?,?>) should.getField(x), (Tuple2<?,?>)is.getField(x));
		}
		else {
			assertEquals(message, should.getField(x), is.getField(x));
		}
	}// For
}
 
Example 2
Source File: TupleComparatorTTT1Test.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
@Override
protected void deepEquals(
		String message,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> should,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> is) {
	
	for (int x = 0; x < should.getArity(); x++) {
		// Check whether field is of type Tuple2 because assertEquals must be called on the non Tuple2 fields.
		if(should.getField(x) instanceof Tuple2) {
			this.deepEquals(message, (Tuple2<?,?>) should.getField(x), (Tuple2<?,?>)is.getField(x));
		}
		else {
			assertEquals(message, should.getField(x), is.getField(x));
		}
	}// For
}
 
Example 3
Source File: TupleComparatorTTT2Test.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
@Override
protected void deepEquals(
		String message,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> should,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> is) {
	
	for (int x = 0; x < should.getArity(); x++) {
		// Check whether field is of type Tuple2 because assertEquals must be called on the non Tuple2 fields.
		if(should.getField(x) instanceof Tuple2) {
			this.deepEquals(message, (Tuple2<?,?>) should.getField(x), (Tuple2<?,?>)is.getField(x));
		}
		else {
			assertEquals(message, should.getField(x), is.getField(x));
		}
	}// For
}
 
Example 4
Source File: TupleComparatorTTT3Test.java    From flink with Apache License 2.0 6 votes vote down vote up
@Override
protected void deepEquals(
		String message,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> should,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> is) {
	
	for (int x = 0; x < should.getArity(); x++) {
		// Check whether field is of type Tuple2 because assertEquals must be called on the non Tuple2 fields.
		if(should.getField(x) instanceof Tuple2) {
			this.deepEquals(message, (Tuple2<?,?>) should.getField(x), (Tuple2<?,?>)is.getField(x));
		}
		else {
			assertEquals(message, should.getField(x), is.getField(x));
		}
	}// For
}
 
Example 5
Source File: TupleComparatorTTT1Test.java    From flink with Apache License 2.0 6 votes vote down vote up
@Override
protected void deepEquals(
		String message,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> should,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> is) {
	
	for (int x = 0; x < should.getArity(); x++) {
		// Check whether field is of type Tuple2 because assertEquals must be called on the non Tuple2 fields.
		if(should.getField(x) instanceof Tuple2) {
			this.deepEquals(message, (Tuple2<?,?>) should.getField(x), (Tuple2<?,?>)is.getField(x));
		}
		else {
			assertEquals(message, should.getField(x), is.getField(x));
		}
	}// For
}
 
Example 6
Source File: TupleComparatorTTT2Test.java    From flink with Apache License 2.0 6 votes vote down vote up
@Override
protected void deepEquals(
		String message,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> should,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> is) {
	
	for (int x = 0; x < should.getArity(); x++) {
		// Check whether field is of type Tuple2 because assertEquals must be called on the non Tuple2 fields.
		if(should.getField(x) instanceof Tuple2) {
			this.deepEquals(message, (Tuple2<?,?>) should.getField(x), (Tuple2<?,?>)is.getField(x));
		}
		else {
			assertEquals(message, should.getField(x), is.getField(x));
		}
	}// For
}
 
Example 7
Source File: TupleComparatorTTT3Test.java    From flink with Apache License 2.0 6 votes vote down vote up
@Override
protected void deepEquals(
		String message,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> should,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> is) {
	
	for (int x = 0; x < should.getArity(); x++) {
		// Check whether field is of type Tuple2 because assertEquals must be called on the non Tuple2 fields.
		if(should.getField(x) instanceof Tuple2) {
			this.deepEquals(message, (Tuple2<?,?>) should.getField(x), (Tuple2<?,?>)is.getField(x));
		}
		else {
			assertEquals(message, should.getField(x), is.getField(x));
		}
	}// For
}
 
Example 8
Source File: TupleComparatorTTT1Test.java    From flink with Apache License 2.0 6 votes vote down vote up
@Override
protected void deepEquals(
		String message,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> should,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> is) {
	
	for (int x = 0; x < should.getArity(); x++) {
		// Check whether field is of type Tuple2 because assertEquals must be called on the non Tuple2 fields.
		if(should.getField(x) instanceof Tuple2) {
			this.deepEquals(message, (Tuple2<?,?>) should.getField(x), (Tuple2<?,?>)is.getField(x));
		}
		else {
			assertEquals(message, should.getField(x), is.getField(x));
		}
	}// For
}
 
Example 9
Source File: TupleComparatorTTT2Test.java    From flink with Apache License 2.0 6 votes vote down vote up
@Override
protected void deepEquals(
		String message,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> should,
		Tuple3<Tuple2<String, Double>, Tuple2<Long, Long>, Tuple2<Integer, Long>> is) {
	
	for (int x = 0; x < should.getArity(); x++) {
		// Check whether field is of type Tuple2 because assertEquals must be called on the non Tuple2 fields.
		if(should.getField(x) instanceof Tuple2) {
			this.deepEquals(message, (Tuple2<?,?>) should.getField(x), (Tuple2<?,?>)is.getField(x));
		}
		else {
			assertEquals(message, should.getField(x), is.getField(x));
		}
	}// For
}
 
Example 10
Source File: AdvertisingTopologyNative.java    From yahoo-streaming-benchmark with Apache License 2.0 5 votes vote down vote up
@Override
public void flatMap(Tuple3<String, String, String> tuple, Collector<String> out) throws Exception {

  String campaign_id = tuple.getField(0);
  String event_time = tuple.getField(2);
  this.campaignProcessorCommon.execute(campaign_id, event_time);
}
 
Example 11
Source File: AdvertisingTopologyNative.java    From streaming-benchmarks with Apache License 2.0 5 votes vote down vote up
@Override
public void flatMap(Tuple3<String, String, String> tuple, Collector<String> out) throws Exception {

    String campaign_id = tuple.getField(0);
    String event_time =  tuple.getField(2);
    this.campaignProcessorCommon.execute(campaign_id, event_time);
}
 
Example 12
Source File: MapITCase.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
@Override
public String map(Tuple3<Integer, Long, String> value) throws Exception {
	return value.getField(2);
}
 
Example 13
Source File: MapITCase.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public String map(Tuple3<Integer, Long, String> value) throws Exception {
	return value.getField(2);
}
 
Example 14
Source File: MapITCase.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public String map(Tuple3<Integer, Long, String> value) throws Exception {
	return value.getField(2);
}