• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java Tuple6类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.flink.api.java.tuple.Tuple6的典型用法代码示例。如果您正苦于以下问题:Java Tuple6类的具体用法?Java Tuple6怎么用?Java Tuple6使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Tuple6类属于org.apache.flink.api.java.tuple包,在下文中一共展示了Tuple6类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: testNumericAutocastInComparison

import org.apache.flink.api.java.tuple.Tuple6; //导入依赖的package包/类
@Test
public void testNumericAutocastInComparison() throws Exception {
	ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
	BatchTableEnvironment tableEnv = TableEnvironment.getTableEnvironment(env, config());

	DataSource<Tuple6<Byte, Short, Integer, Long, Float, Double>> input =
			env.fromElements(
					new Tuple6<>((byte) 1, (short) 1, 1, 1L, 1.0f, 1.0d),
					new Tuple6<>((byte) 2, (short) 2, 2, 2L, 2.0f, 2.0d));

	Table table =
			tableEnv.fromDataSet(input, "a,b,c,d,e,f");

	Table result = table
			.filter("a > 1 && b > 1 && c > 1L && d > 1.0f && e > 1.0d && f > 1");

	DataSet<Row> ds = tableEnv.toDataSet(result, Row.class);
	List<Row> results = ds.collect();
	String expected = "2,2,2,2,2.0,2.0";
	compareResultAsText(results, expected);
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:22,代码来源:CastingITCase.java


示例2: main

import org.apache.flink.api.java.tuple.Tuple6; //导入依赖的package包/类
public static void main(String[] args) throws Exception {

		// parse parameters
		ParameterTool params = ParameterTool.fromArgs(args);
		String input = params.getRequired("input");
		String output = params.getRequired("output");

		// obtain execution environment
		ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();

		// read the raw mail data, each mail is a String
		DataSet<String> rawMails =
				env.readFile(new MBoxMailFormat(MAIL_DAEMON_PREFIX), input);

		// parse mail String into record with six fields
		DataSet<Tuple6<String, String, String, String, String, String>> mails = rawMails
				// parse mails
				.flatMap(new MBoxMailParser(MAIL_DAEMON_PREFIX))
				// filter out mails with duplicate messageIds
				.distinct(0);

		// write mail records as delimited files
		mails.writeAsCsv(output, MAIL_RECORD_DELIM, MAIL_FIELD_DELIM);
		env.execute();
	}
 
开发者ID:dataArtisans,项目名称:flink-training-exercises,代码行数:26,代码来源:MBoxParser.java


示例3: testProjectOnATuple1Input

import org.apache.flink.api.java.tuple.Tuple6; //导入依赖的package包/类
@Test
public void testProjectOnATuple1Input() throws Exception {
	/*
	 * Project join on a tuple input 1
	 */

	final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();

	DataSet<Tuple3<Integer, Long, String>> ds1 = CollectionDataSets.getSmall3TupleDataSet(env);
	DataSet<Tuple5<Integer, Long, Integer, String, Long>> ds2 = CollectionDataSets.get5TupleDataSet(env);
	DataSet<Tuple6<String, Long, String, Integer, Long, Long>> joinDs =
			ds1.join(ds2)
					.where(1)
					.equalTo(1)
					.projectFirst(2, 1)
					.projectSecond(3)
					.projectFirst(0)
					.projectSecond(4, 1);

	List<Tuple6<String, Long, String, Integer, Long, Long>> result = joinDs.collect();

	String expected = "Hi,1,Hallo,1,1,1\n" +
			"Hello,2,Hallo Welt,2,2,2\n" +
			"Hello world,2,Hallo Welt,3,2,2\n";

	compareResultAsTuples(result, expected);
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:28,代码来源:JoinITCase.java


示例4: testProjectJoinOnATuple2Input

import org.apache.flink.api.java.tuple.Tuple6; //导入依赖的package包/类
@Test
public void testProjectJoinOnATuple2Input() throws Exception {
	/*
	 * Project join on a tuple input 2
	 */

	final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();

	DataSet<Tuple3<Integer, Long, String>> ds1 = CollectionDataSets.getSmall3TupleDataSet(env);
	DataSet<Tuple5<Integer, Long, Integer, String, Long>> ds2 = CollectionDataSets.get5TupleDataSet(env);
	DataSet<Tuple6<String, String, Long, Long, Long, Integer>> joinDs =
			ds1.join(ds2)
					.where(1)
					.equalTo(1)
					.projectSecond(3)
					.projectFirst(2, 1)
					.projectSecond(4, 1)
					.projectFirst(0);

	List<Tuple6<String, String, Long, Long, Long, Integer>> result = joinDs.collect();

	String expected = "Hallo,Hi,1,1,1,1\n" +
			"Hallo Welt,Hello,2,2,2,2\n" +
			"Hallo Welt,Hello world,2,2,2,3\n";

	compareResultAsTuples(result, expected);
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:28,代码来源:JoinITCase.java


示例5: testProjectCrossOnATupleInput1

import org.apache.flink.api.java.tuple.Tuple6; //导入依赖的package包/类
@Test
public void testProjectCrossOnATupleInput1() throws Exception{
	/*
	 * project cross on a tuple input 1
	 */

	final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();

	DataSet<Tuple3<Integer, Long, String>> ds = CollectionDataSets.getSmall3TupleDataSet(env);
	DataSet<Tuple5<Integer, Long, Integer, String, Long>> ds2 = CollectionDataSets.getSmall5TupleDataSet(env);
	DataSet<Tuple6<String, Long, String, Integer, Long, Long>> crossDs = ds.cross(ds2)
			.projectFirst(2, 1)
			.projectSecond(3)
			.projectFirst(0)
			.projectSecond(4,1);

	List<Tuple6<String, Long, String, Integer, Long, Long>> result = crossDs.collect();

	String expected = "Hi,1,Hallo,1,1,1\n" +
			"Hi,1,Hallo Welt,1,2,2\n" +
			"Hi,1,Hallo Welt wie,1,1,3\n" +
			"Hello,2,Hallo,2,1,1\n" +
			"Hello,2,Hallo Welt,2,2,2\n" +
			"Hello,2,Hallo Welt wie,2,1,3\n" +
			"Hello world,2,Hallo,3,1,1\n" +
			"Hello world,2,Hallo Welt,3,2,2\n" +
			"Hello world,2,Hallo Welt wie,3,1,3\n";

	compareResultAsTuples(result, expected);
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:31,代码来源:CrossITCase.java


示例6: testProjectCrossOnATupleInput2

import org.apache.flink.api.java.tuple.Tuple6; //导入依赖的package包/类
@Test
public void testProjectCrossOnATupleInput2() throws Exception {
	/*
	 * project cross on a tuple input 2
	 */

	final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();

	DataSet<Tuple3<Integer, Long, String>> ds = CollectionDataSets.getSmall3TupleDataSet(env);
	DataSet<Tuple5<Integer, Long, Integer, String, Long>> ds2 = CollectionDataSets.getSmall5TupleDataSet(env);
	DataSet<Tuple6<String, String, Long, Long, Long,Integer>> crossDs = ds.cross(ds2)
			.projectSecond(3)
			.projectFirst(2, 1)
			.projectSecond(4,1)
			.projectFirst(0);

	List<Tuple6<String, String, Long, Long, Long, Integer>> result = crossDs.collect();

	String expected = "Hallo,Hi,1,1,1,1\n" +
			"Hallo Welt,Hi,1,2,2,1\n" +
			"Hallo Welt wie,Hi,1,1,3,1\n" +
			"Hallo,Hello,2,1,1,2\n" +
			"Hallo Welt,Hello,2,2,2,2\n" +
			"Hallo Welt wie,Hello,2,1,3,2\n" +
			"Hallo,Hello world,2,1,1,3\n" +
			"Hallo Welt,Hello world,2,2,2,3\n" +
			"Hallo Welt wie,Hello world,2,1,3,3\n";

	compareResultAsTuples(result, expected);
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:31,代码来源:CrossITCase.java


示例7: testProjectCrossOnATupleInput1

import org.apache.flink.api.java.tuple.Tuple6; //导入依赖的package包/类
@Test
public void testProjectCrossOnATupleInput1() throws Exception{
	/*
	 * project cross on a tuple input 1
	 */

	final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();

	DataSet<Tuple3<Integer, Long, String>> ds = CollectionDataSets.getSmall3TupleDataSet(env);
	DataSet<Tuple5<Integer, Long, Integer, String, Long>> ds2 = CollectionDataSets.getSmall5TupleDataSet(env);
	DataSet<Tuple6<String, Long, String, Integer, Long, Long>> crossDs = ds.cross(ds2)
			.projectFirst(2, 1)
			.projectSecond(3)
			.projectFirst(0)
			.projectSecond(4, 1);

	List<Tuple6<String, Long, String, Integer, Long, Long>> result = crossDs.collect();

	String expected = "Hi,1,Hallo,1,1,1\n" +
			"Hi,1,Hallo Welt,1,2,2\n" +
			"Hi,1,Hallo Welt wie,1,1,3\n" +
			"Hello,2,Hallo,2,1,1\n" +
			"Hello,2,Hallo Welt,2,2,2\n" +
			"Hello,2,Hallo Welt wie,2,1,3\n" +
			"Hello world,2,Hallo,3,1,1\n" +
			"Hello world,2,Hallo Welt,3,2,2\n" +
			"Hello world,2,Hallo Welt wie,3,1,3\n";

	compareResultAsTuples(result, expected);
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:31,代码来源:CrossITCase.java


示例8: testProjectCrossOnATupleInput2

import org.apache.flink.api.java.tuple.Tuple6; //导入依赖的package包/类
@Test
public void testProjectCrossOnATupleInput2() throws Exception {
	/*
	 * project cross on a tuple input 2
	 */

	final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();

	DataSet<Tuple3<Integer, Long, String>> ds = CollectionDataSets.getSmall3TupleDataSet(env);
	DataSet<Tuple5<Integer, Long, Integer, String, Long>> ds2 = CollectionDataSets.getSmall5TupleDataSet(env);
	DataSet<Tuple6<String, String, Long, Long, Long, Integer>> crossDs = ds.cross(ds2)
			.projectSecond(3)
			.projectFirst(2, 1)
			.projectSecond(4, 1)
			.projectFirst(0);

	List<Tuple6<String, String, Long, Long, Long, Integer>> result = crossDs.collect();

	String expected = "Hallo,Hi,1,1,1,1\n" +
			"Hallo Welt,Hi,1,2,2,1\n" +
			"Hallo Welt wie,Hi,1,1,3,1\n" +
			"Hallo,Hello,2,1,1,2\n" +
			"Hallo Welt,Hello,2,2,2,2\n" +
			"Hallo Welt wie,Hello,2,1,3,2\n" +
			"Hallo,Hello world,2,1,1,3\n" +
			"Hallo Welt,Hello world,2,2,2,3\n" +
			"Hallo Welt wie,Hello world,2,1,3,3\n";

	compareResultAsTuples(result, expected);
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:31,代码来源:CrossITCase.java


示例9: extractTimestamp

import org.apache.flink.api.java.tuple.Tuple6; //导入依赖的package包/类
@Override
public long extractTimestamp(Tuple6<String, String, Long, String, Long, Double> element, long previousElementTimestamp) {
    long timestamp = element.f2; // get processing timestamp from current event
    currentMaxTimestamp = Math.max(timestamp, currentMaxTimestamp);
    return timestamp;
}
 
开发者ID:boontadata,项目名称:boontadata-streams,代码行数:7,代码来源:BoundedOutOfOrdernessGenerator.java


示例10: newTuple

import org.apache.flink.api.java.tuple.Tuple6; //导入依赖的package包/类
/**
 * Convert object array to type of Tuple{N} where N is between 0 to 25.
 *
 * @throws IllegalArgumentException if rows's length > 25
 */
public static <T extends Tuple> T newTuple(Object[] row) {
	Preconditions.checkNotNull(row, "Tuple row is null");
	switch (row.length) {
		case 0:
			return setTupleValue(new Tuple0(), row);
		case 1:
			return setTupleValue(new Tuple1(), row);
		case 2:
			return setTupleValue(new Tuple2(), row);
		case 3:
			return setTupleValue(new Tuple3(), row);
		case 4:
			return setTupleValue(new Tuple4(), row);
		case 5:
			return setTupleValue(new Tuple5(), row);
		case 6:
			return setTupleValue(new Tuple6(), row);
		case 7:
			return setTupleValue(new Tuple7(), row);
		case 8:
			return setTupleValue(new Tuple8(), row);
		case 9:
			return setTupleValue(new Tuple9(), row);
		case 10:
			return setTupleValue(new Tuple10(), row);
		case 11:
			return setTupleValue(new Tuple11(), row);
		case 12:
			return setTupleValue(new Tuple12(), row);
		case 13:
			return setTupleValue(new Tuple13(), row);
		case 14:
			return setTupleValue(new Tuple14(), row);
		case 15:
			return setTupleValue(new Tuple15(), row);
		case 16:
			return setTupleValue(new Tuple16(), row);
		case 17:
			return setTupleValue(new Tuple17(), row);
		case 18:
			return setTupleValue(new Tuple18(), row);
		case 19:
			return setTupleValue(new Tuple19(), row);
		case 20:
			return setTupleValue(new Tuple20(), row);
		case 21:
			return setTupleValue(new Tuple21(), row);
		case 22:
			return setTupleValue(new Tuple22(), row);
		case 23:
			return setTupleValue(new Tuple23(), row);
		case 24:
			return setTupleValue(new Tuple24(), row);
		case 25:
			return setTupleValue(new Tuple25(), row);
		default:
			throw new IllegalArgumentException("Too long row: " + row.length + ", unable to convert to Tuple");
	}
}
 
开发者ID:haoch,项目名称:flink-siddhi,代码行数:65,代码来源:SiddhiTupleFactory.java


示例11: newTuple

import org.apache.flink.api.java.tuple.Tuple6; //导入依赖的package包/类
/**
 * Convert object array to type of Tuple{N} where N is between 0 to 25.
 *
 * @throws IllegalArgumentException if rows's length > 25
 */
public static <T extends Tuple> T newTuple(Object[] row) {
    Preconditions.checkNotNull(row, "Tuple row is null");
    switch (row.length) {
        case 0:
            return setTupleValue(new Tuple0(), row);
        case 1:
            return setTupleValue(new Tuple1(), row);
        case 2:
            return setTupleValue(new Tuple2(), row);
        case 3:
            return setTupleValue(new Tuple3(), row);
        case 4:
            return setTupleValue(new Tuple4(), row);
        case 5:
            return setTupleValue(new Tuple5(), row);
        case 6:
            return setTupleValue(new Tuple6(), row);
        case 7:
            return setTupleValue(new Tuple7(), row);
        case 8:
            return setTupleValue(new Tuple8(), row);
        case 9:
            return setTupleValue(new Tuple9(), row);
        case 10:
            return setTupleValue(new Tuple10(), row);
        case 11:
            return setTupleValue(new Tuple11(), row);
        case 12:
            return setTupleValue(new Tuple12(), row);
        case 13:
            return setTupleValue(new Tuple13(), row);
        case 14:
            return setTupleValue(new Tuple14(), row);
        case 15:
            return setTupleValue(new Tuple15(), row);
        case 16:
            return setTupleValue(new Tuple16(), row);
        case 17:
            return setTupleValue(new Tuple17(), row);
        case 18:
            return setTupleValue(new Tuple18(), row);
        case 19:
            return setTupleValue(new Tuple19(), row);
        case 20:
            return setTupleValue(new Tuple20(), row);
        case 21:
            return setTupleValue(new Tuple21(), row);
        case 22:
            return setTupleValue(new Tuple22(), row);
        case 23:
            return setTupleValue(new Tuple23(), row);
        case 24:
            return setTupleValue(new Tuple24(), row);
        case 25:
            return setTupleValue(new Tuple25(), row);
        default:
            throw new IllegalArgumentException("Too long row: " + row.length + ", unable to convert to Tuple");
    }
}
 
开发者ID:apache,项目名称:bahir-flink,代码行数:65,代码来源:SiddhiTupleFactory.java


示例12: main

import org.apache.flink.api.java.tuple.Tuple6; //导入依赖的package包/类
public static void main(String[] args) throws Exception {

		if (!parseParameters(args)) {
			return;
		}

		final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();

		// get customer data set: (custkey, name, address, nationkey, acctbal)
		DataSet<Tuple5<Integer, String, String, Integer, Double>> customers = getCustomerDataSet(env);

		// get orders data set: (orderkey, custkey, orderdate)
		DataSet<Tuple3<Integer, Integer, String>> orders = getOrdersDataSet(env);

		// get lineitem data set: (orderkey, extendedprice, discount, returnflag)
		DataSet<Tuple4<Integer, Double, Double, String>> lineitems = getLineitemDataSet(env);

		// get nation data set: (nationkey, name)
		DataSet<Tuple2<Integer, String>> nations = getNationsDataSet(env);

		// orders filtered by year: (orderkey, custkey)
		DataSet<Tuple2<Integer, Integer>> ordersFilteredByYear =
				// filter by year
				orders.filter(order -> Integer.parseInt(order.f2.substring(0, 4)) > 1990)
				// project fields out that are no longer required
				.project(0, 1);

		// lineitems filtered by flag: (orderkey, extendedprice, discount)
		DataSet<Tuple3<Integer, Double, Double>> lineitemsFilteredByFlag =
				// filter by flag
				lineitems.filter(lineitem -> lineitem.f3.equals("R"))
				// project fields out that are no longer required
				.project(0, 1, 2);

		// join orders with lineitems: (custkey, extendedprice, discount)
		DataSet<Tuple3<Integer, Double, Double>> lineitemsOfCustomerKey =
				ordersFilteredByYear.joinWithHuge(lineitemsFilteredByFlag)
									.where(0).equalTo(0)
									.projectFirst(1).projectSecond(1, 2);

		// aggregate for revenue: (custkey, revenue)
		DataSet<Tuple2<Integer, Double>> revenueOfCustomerKey = lineitemsOfCustomerKey
				// calculate the revenue for each item
				// revenue per item = l_extendedprice * (1 - l_discount)
				.map(i -> new Tuple2<>(i.f0, i.f1 * (1 - i.f2)))
				// aggregate the revenues per item to revenue per customer
				.groupBy(0).sum(1);

		// join customer with nation (custkey, name, address, nationname, acctbal)
		DataSet<Tuple5<Integer, String, String, String, Double>> customerWithNation = customers
						.joinWithTiny(nations)
						.where(3).equalTo(0)
						.projectFirst(0, 1, 2).projectSecond(1).projectFirst(4);

		// join customer (with nation) with revenue (custkey, name, address, nationname, acctbal, revenue)
		DataSet<Tuple6<Integer, String, String, String, Double, Double>> customerWithRevenue =
				customerWithNation.join(revenueOfCustomerKey)
				.where(0).equalTo(0)
				.projectFirst(0, 1, 2, 3, 4).projectSecond(1);

		// emit result
		customerWithRevenue.writeAsCsv(outputPath);

		// execute program
		env.execute("TPCH Query 10 Example");

	}
 
开发者ID:axbaretto,项目名称:flink,代码行数:68,代码来源:TPCHQuery10.java


示例13: add

import org.apache.flink.api.java.tuple.Tuple6; //导入依赖的package包/类
public Tuple6Builder<T0, T1, T2, T3, T4, T5> add(T0 value0, T1 value1, T2 value2, T3 value3, T4 value4, T5 value5){
	tuples.add(new Tuple6<>(value0, value1, value2, value3, value4, value5));
	return this;
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:5,代码来源:Tuple6Builder.java


示例14: build

import org.apache.flink.api.java.tuple.Tuple6; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public Tuple6<T0, T1, T2, T3, T4, T5>[] build(){
	return tuples.toArray(new Tuple6[tuples.size()]);
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:5,代码来源:Tuple6Builder.java


示例15: main

import org.apache.flink.api.java.tuple.Tuple6; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
	
	if(!parseParameters(args)) {
		return;
	}
	
	final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();

	// get customer data set: (custkey, name, address, nationkey, acctbal) 
	DataSet<Tuple5<Integer, String, String, Integer, Double>> customers = getCustomerDataSet(env);

	// get orders data set: (orderkey, custkey, orderdate)
	DataSet<Tuple3<Integer, Integer, String>> orders = getOrdersDataSet(env);

	// get lineitem data set: (orderkey, extendedprice, discount, returnflag)
	DataSet<Tuple4<Integer, Double, Double, String>> lineitems = getLineitemDataSet(env);

	// get nation data set: (nationkey, name)
	DataSet<Tuple2<Integer, String>> nations = getNationsDataSet(env);

	// orders filtered by year: (orderkey, custkey)
	DataSet<Tuple2<Integer, Integer>> ordersFilteredByYear =
			// filter by year
			orders.filter(order -> Integer.parseInt(order.f2.substring(0, 4)) > 1990)
			// project fields out that are no longer required
			.project(0,1).types(Integer.class, Integer.class);

	// lineitems filtered by flag: (orderkey, extendedprice, discount)
	DataSet<Tuple3<Integer, Double, Double>> lineitemsFilteredByFlag = 
			// filter by flag
			lineitems.filter(lineitem -> lineitem.f3.equals("R"))
			// project fields out that are no longer required
			.project(0,1,2).types(Integer.class, Double.class, Double.class);

	// join orders with lineitems: (custkey, extendedprice, discount)
	DataSet<Tuple3<Integer, Double, Double>> lineitemsOfCustomerKey = 
			ordersFilteredByYear.joinWithHuge(lineitemsFilteredByFlag)
								.where(0).equalTo(0)
								.projectFirst(1).projectSecond(1,2)
								.types(Integer.class, Double.class, Double.class);

	// aggregate for revenue: (custkey, revenue)
	DataSet<Tuple2<Integer, Double>> revenueOfCustomerKey = lineitemsOfCustomerKey
			// calculate the revenue for each item
			// revenue per item = l_extendedprice * (1 - l_discount)
			.map(i -> new Tuple2<>(i.f0, i.f1 * (1 - i.f2)))
			// aggregate the revenues per item to revenue per customer
			.groupBy(0).sum(1);

	// join customer with nation (custkey, name, address, nationname, acctbal)
	DataSet<Tuple5<Integer, String, String, String, Double>> customerWithNation = customers
					.joinWithTiny(nations)
					.where(3).equalTo(0)
					.projectFirst(0,1,2).projectSecond(1).projectFirst(4)
					.types(Integer.class, String.class, String.class, String.class, Double.class);

	// join customer (with nation) with revenue (custkey, name, address, nationname, acctbal, revenue)
	DataSet<Tuple6<Integer, String, String, String, Double, Double>> customerWithRevenue = 
			customerWithNation.join(revenueOfCustomerKey)
			.where(0).equalTo(0)
			.projectFirst(0,1,2,3,4).projectSecond(1)
			.types(Integer.class, String.class, String.class, String.class, Double.class, Double.class);

	// emit result
	customerWithRevenue.writeAsCsv(outputPath);
	
	// execute program
	env.execute("TPCH Query 10 Example");
	
}
 
开发者ID:citlab,项目名称:vs.msc.ws14,代码行数:71,代码来源:TPCHQuery10.java


示例16: add

import org.apache.flink.api.java.tuple.Tuple6; //导入依赖的package包/类
public Tuple6Builder<T0, T1, T2, T3, T4, T5> add(T0 value0, T1 value1, T2 value2, T3 value3, T4 value4, T5 value5){
	tuples.add(new Tuple6<T0, T1, T2, T3, T4, T5>(value0, value1, value2, value3, value4, value5));
	return this;
}
 
开发者ID:citlab,项目名称:vs.msc.ws14,代码行数:5,代码来源:Tuple6Builder.java


示例17: projectTuple6

import org.apache.flink.api.java.tuple.Tuple6; //导入依赖的package包/类
/**
 * Projects a pair of joined elements to a {@link Tuple} with the previously selected fields.
 * Requires the classes of the fields of the resulting tuples.
 *
 * @return The projected data set.
 *
 * @see Tuple
 * @see DataSet
 */
public <T0, T1, T2, T3, T4, T5> ProjectJoin<I1, I2, Tuple6<T0, T1, T2, T3, T4, T5>> projectTuple6() {
	TypeInformation<?>[] fTypes = extractFieldTypes(fieldIndexes);
	TupleTypeInfo<Tuple6<T0, T1, T2, T3, T4, T5>> tType = new TupleTypeInfo<Tuple6<T0, T1, T2, T3, T4, T5>>(fTypes);

	return new ProjectJoin<I1, I2, Tuple6<T0, T1, T2, T3, T4, T5>>(this.ds1, this.ds2, this.keys1, this.keys2, this.hint, this.fieldIndexes, this.isFieldInFirst, tType, this);
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:16,代码来源:JoinOperator.java


示例18: projectTuple6

import org.apache.flink.api.java.tuple.Tuple6; //导入依赖的package包/类
/**
 * Projects a {@link Tuple} {@link DataSet} to the previously selected fields.
 *
 * @return The projected DataSet.
 * @see Tuple
 * @see DataSet
 */
public <T0, T1, T2, T3, T4, T5> ProjectOperator<T, Tuple6<T0, T1, T2, T3, T4, T5>> projectTuple6() {
	TypeInformation<?>[] fTypes = extractFieldTypes(fieldIndexes, ds.getType());
	TupleTypeInfo<Tuple6<T0, T1, T2, T3, T4, T5>> tType = new TupleTypeInfo<Tuple6<T0, T1, T2, T3, T4, T5>>(fTypes);

	return new ProjectOperator<T, Tuple6<T0, T1, T2, T3, T4, T5>>(this.ds, this.fieldIndexes, tType);
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:14,代码来源:ProjectOperator.java


示例19: projectTuple6

import org.apache.flink.api.java.tuple.Tuple6; //导入依赖的package包/类
/**
 * Projects a pair of crossed elements to a {@link Tuple} with the previously selected fields.
 *
 * @return The projected data set.
 *
 * @see Tuple
 * @see DataSet
 */
public <T0, T1, T2, T3, T4, T5> ProjectCross<I1, I2, Tuple6<T0, T1, T2, T3, T4, T5>> projectTuple6() {
	TypeInformation<?>[] fTypes = extractFieldTypes(fieldIndexes);
	TupleTypeInfo<Tuple6<T0, T1, T2, T3, T4, T5>> tType = new TupleTypeInfo<Tuple6<T0, T1, T2, T3, T4, T5>>(fTypes);

	return new ProjectCross<I1, I2, Tuple6<T0, T1, T2, T3, T4, T5>>(this.ds1, this.ds2, this.fieldIndexes, this.isFieldInFirst, tType, this, hint);
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:15,代码来源:CrossOperator.java


示例20: projectTuple6

import org.apache.flink.api.java.tuple.Tuple6; //导入依赖的package包/类
/**
 * Projects a {@link Tuple} {@link DataStream} to the previously selected fields.
 *
 * @return The projected DataStream.
 * @see Tuple
 * @see DataStream
 */
public <T0, T1, T2, T3, T4, T5> SingleOutputStreamOperator<Tuple6<T0, T1, T2, T3, T4, T5>> projectTuple6() {
	TypeInformation<?>[] fTypes = extractFieldTypes(fieldIndexes, dataStream.getType());
	TupleTypeInfo<Tuple6<T0, T1, T2, T3, T4, T5>> tType = new TupleTypeInfo<Tuple6<T0, T1, T2, T3, T4, T5>>(fTypes);

	return dataStream.transform("Projection", tType, new StreamProject<IN, Tuple6<T0, T1, T2, T3, T4, T5>>(fieldIndexes, tType.createSerializer(dataStream.getExecutionConfig())));
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:14,代码来源:StreamProjection.java



注:本文中的org.apache.flink.api.java.tuple.Tuple6类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java LastModified类代码示例发布时间:2022-05-22
下一篇:
Java PDDocument类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap