// Path: flink-jobs/src/main/parking/tpch/generators/core/DistributedTPCH.java
// public class DistributedTPCH {
// 	private double scale;
// 	private ExecutionEnvironment env;
// 
// 
// 	public DistributedTPCH(ExecutionEnvironment env) {
// 		this.env = env;
// 	}
// 
// 	public void setScale(double scale) {
// 		this.scale = scale;
// 	}
// 
// 	public double getScale() {
// 		return scale;
// 	}
// 
// 	public DataSet<Part> generateParts() {
// 		return getGenerator(PartGenerator.class, Part.class);
// 	}
// 
// 	public DataSet<LineItem> generateLineItems() {
// 		return getGenerator(LineItemGenerator.class, LineItem.class);
// 	}
// 	public DataSet<Order> generateOrders() {
// 		return getGenerator(OrderGenerator.class, Order.class);
// 	}
// 
// 	public DataSet<Supplier> generateSuppliers() {
// 		return getGenerator(SupplierGenerator.class, Supplier.class);
// 	}
// 
// 	public DataSet<Region> generateRegions() {
// 		return getGenerator(RegionGenerator.class, Region.class);
// 	}
// 
// 	public DataSet<Nation> generateNations() {
// 		return getGenerator(NationGenerator.class, Nation.class);
// 	}
// 
// 	public DataSet<Customer> generateCustomers() {
// 		return getGenerator(CustomerGenerator.class, Customer.class);
// 	}
// 
// 	public DataSet<PartSupplier> generatePartSuppliers() {
// 		return getGenerator(PartSupplierGenerator.class, PartSupplier.class);
// 	}
// 
// 	public <T> DataSet<T> getGenerator(Class<? extends Iterable<T>> generatorClass, Class<T> type) {
// 		SplittableIterator<T> si = new TPCHGeneratorSplittableIterator(scale, env.getParallelism(), generatorClass);
// 		return env.fromParallelCollection(si, type).name("Generator: "+generatorClass);
// 	}
// }


import java.io.ObjectInputStream;
import java.lang.reflect.Field;
import com.github.projectflink.generators.tpch.generators.core.DistributedTPCH;
import io.airlift.tpch.LineItem;
import io.airlift.tpch.Order;
import org.apache.flink.api.common.typeinfo.TypeInformation;
import org.apache.flink.api.java.DataSet;
import org.apache.flink.api.java.ExecutionEnvironment;
import org.apache.flink.api.java.functions.KeySelector;
import org.apache.flink.api.java.tuple.Tuple2;
import org.apache.flink.api.java.typeutils.ResultTypeQueryable;
import org.apache.flink.api.java.typeutils.TypeExtractor;
import java.io.IOException;
/**
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.github.projectflink.generators.tpch.generators.programs;




/**
 * TPC H Schema Diagramm: https://www.student.cs.uwaterloo.ca/~cs348/F14/TPC-H_Schema.png
 */
public class TPCHGeneratorExample {

	public static void main(String[] args) throws Exception {
		// set up the execution environment
		final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();

// Path: flink-jobs/src/main/parking/tpch/generators/core/DistributedTPCH.java
// public class DistributedTPCH {
// 	private double scale;
// 	private ExecutionEnvironment env;
// 
// 
// 	public DistributedTPCH(ExecutionEnvironment env) {
// 		this.env = env;
// 	}
// 
// 	public void setScale(double scale) {
// 		this.scale = scale;
// 	}
// 
// 	public double getScale() {
// 		return scale;
// 	}
// 
// 	public DataSet<Part> generateParts() {
// 		return getGenerator(PartGenerator.class, Part.class);
// 	}
// 
// 	public DataSet<LineItem> generateLineItems() {
// 		return getGenerator(LineItemGenerator.class, LineItem.class);
// 	}
// 	public DataSet<Order> generateOrders() {
// 		return getGenerator(OrderGenerator.class, Order.class);
// 	}
// 
// 	public DataSet<Supplier> generateSuppliers() {
// 		return getGenerator(SupplierGenerator.class, Supplier.class);
// 	}
// 
// 	public DataSet<Region> generateRegions() {
// 		return getGenerator(RegionGenerator.class, Region.class);
// 	}
// 
// 	public DataSet<Nation> generateNations() {
// 		return getGenerator(NationGenerator.class, Nation.class);
// 	}
// 
// 	public DataSet<Customer> generateCustomers() {
// 		return getGenerator(CustomerGenerator.class, Customer.class);
// 	}
// 
// 	public DataSet<PartSupplier> generatePartSuppliers() {
// 		return getGenerator(PartSupplierGenerator.class, PartSupplier.class);
// 	}
// 
// 	public <T> DataSet<T> getGenerator(Class<? extends Iterable<T>> generatorClass, Class<T> type) {
// 		SplittableIterator<T> si = new TPCHGeneratorSplittableIterator(scale, env.getParallelism(), generatorClass);
// 		return env.fromParallelCollection(si, type).name("Generator: "+generatorClass);
// 	}
// }


// Path: flink-jobs/src/main/parking/tpch/generators/programs/TPCHGeneratorExample.java
import java.io.ObjectInputStream;
import java.lang.reflect.Field;
import com.github.projectflink.generators.tpch.generators.core.DistributedTPCH;
import io.airlift.tpch.LineItem;
import io.airlift.tpch.Order;
import org.apache.flink.api.common.typeinfo.TypeInformation;
import org.apache.flink.api.java.DataSet;
import org.apache.flink.api.java.ExecutionEnvironment;
import org.apache.flink.api.java.functions.KeySelector;
import org.apache.flink.api.java.tuple.Tuple2;
import org.apache.flink.api.java.typeutils.ResultTypeQueryable;
import org.apache.flink.api.java.typeutils.TypeExtractor;
import java.io.IOException;

/**
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.github.projectflink.generators.tpch.generators.programs;




/**
 * TPC H Schema Diagramm: https://www.student.cs.uwaterloo.ca/~cs348/F14/TPC-H_Schema.png
 */
public class TPCHGeneratorExample {

	public static void main(String[] args) throws Exception {
		// set up the execution environment
		final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();

		DistributedTPCH gen = new DistributedTPCH(env);