提交 45c3c44a 编写于 作者: S Stephan Ewen

Refactoring part 6 (finalize scala api and scala examples)

上级 43b86ad3
......@@ -15,7 +15,7 @@ package org.apache.flink.examples.scala;
/**
* This dummy class exists only to create an empty
* javadoc.jar in the stratosphere-scala-examples project.
* javadoc.jar in the flink-scala-examples project.
* This is required for passing the maven central sync requirements.
*/
public class Dummy {}
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010-2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......
/**
* *********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010-2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -15,9 +15,9 @@
package org.apache.flink.examples.scala.datamining
import eu.stratosphere.client.LocalExecutor
import eu.stratosphere.api.common.Program
import eu.stratosphere.api.common.ProgramDescription
import org.apache.flink.client.LocalExecutor
import org.apache.flink.api.common.Program
import org.apache.flink.api.common.ProgramDescription
import org.apache.flink.api.scala._
import org.apache.flink.api.scala.operators._
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010-2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -13,9 +13,9 @@
package org.apache.flink.examples.scala.graph
import eu.stratosphere.client.LocalExecutor
import eu.stratosphere.api.common.Program
import eu.stratosphere.api.common.ProgramDescription
import org.apache.flink.client.LocalExecutor
import org.apache.flink.api.common.Program
import org.apache.flink.api.common.ProgramDescription
import org.apache.flink.api.scala._
import org.apache.flink.api.scala.operators._
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010-2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -13,8 +13,8 @@
package org.apache.flink.examples.scala.graph;
import eu.stratosphere.client.LocalExecutor
import eu.stratosphere.api.common.Program
import org.apache.flink.client.LocalExecutor
import org.apache.flink.api.common.Program
import org.apache.flink.api.scala._
import org.apache.flink.api.scala.operators._
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010-2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -13,9 +13,9 @@
package org.apache.flink.examples.scala.graph
import eu.stratosphere.client.LocalExecutor
import eu.stratosphere.api.common.Program
import eu.stratosphere.api.common.ProgramDescription
import org.apache.flink.client.LocalExecutor
import org.apache.flink.api.common.Program
import org.apache.flink.api.common.ProgramDescription
import scala.math._
import org.apache.flink.api.scala._
......
/**
* *********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010-2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -15,8 +15,8 @@
package org.apache.flink.examples.scala.graph
import eu.stratosphere.client.LocalExecutor
import eu.stratosphere.api.common.{ ProgramDescription, Program }
import org.apache.flink.client.LocalExecutor
import org.apache.flink.api.common.{ ProgramDescription, Program }
import org.apache.flink.api.scala._
import org.apache.flink.api.scala.DataSource
......
/**
* *********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010-2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -15,8 +15,8 @@
package org.apache.flink.examples.scala.graph;
import eu.stratosphere.client.LocalExecutor
import eu.stratosphere.api.common.Program
import org.apache.flink.client.LocalExecutor
import org.apache.flink.api.common.Program
import org.apache.flink.api.scala._
import org.apache.flink.api.scala.operators._
......
/**
* *********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010-2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -21,11 +21,11 @@ import org.apache.flink.api.scala._
import org.apache.flink.api.scala.operators._
import org.apache.flink.api.scala.analysis.GlobalSchemaPrinter
import eu.stratosphere.client.LocalExecutor
import eu.stratosphere.api.common.Program
import eu.stratosphere.api.common.ProgramDescription
import eu.stratosphere.api.common.Plan
import eu.stratosphere.api.java.record.operators.DeltaIteration
import org.apache.flink.client.LocalExecutor
import org.apache.flink.api.common.Program
import org.apache.flink.api.common.ProgramDescription
import org.apache.flink.api.common.Plan
import org.apache.flink.api.java.record.operators.DeltaIteration
/**
* An implementation of the PageRank algorithm for graph vertex ranking. Runs a specified fix number
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010-2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -13,9 +13,9 @@
package org.apache.flink.examples.scala.graph;
import eu.stratosphere.client.LocalExecutor
import eu.stratosphere.api.common.Program
import eu.stratosphere.api.common.ProgramDescription
import org.apache.flink.client.LocalExecutor
import org.apache.flink.api.common.Program
import org.apache.flink.api.common.ProgramDescription
import org.apache.flink.api.scala._
import org.apache.flink.api.scala.operators._
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010-2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -13,9 +13,9 @@
package org.apache.flink.examples.scala.iterative
import eu.stratosphere.client.LocalExecutor
import eu.stratosphere.api.common.Program
import eu.stratosphere.api.common.ProgramDescription
import org.apache.flink.client.LocalExecutor
import org.apache.flink.api.common.Program
import org.apache.flink.api.common.ProgramDescription
import org.apache.flink.api.scala._
import org.apache.flink.api.scala.operators._
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010-2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -13,9 +13,9 @@
package org.apache.flink.examples.scala.relational;
import eu.stratosphere.client.LocalExecutor
import eu.stratosphere.api.common.Program
import eu.stratosphere.api.common.ProgramDescription
import org.apache.flink.client.LocalExecutor
import org.apache.flink.api.common.Program
import org.apache.flink.api.common.ProgramDescription
import org.apache.flink.api.scala._
import org.apache.flink.api.scala.operators._
......@@ -26,7 +26,7 @@ import org.apache.flink.api.scala.operators._
* Its documentation and the data generator (DBGEN) can be found
* on http://www.tpc.org/tpch/ .
*
* This Stratosphere program implements a modified version of the query 3 of
* This Flink program implements a modified version of the query 3 of
* the TPC-H benchmark including one join, some filtering and an
* aggregation. The query resembles the following SQL statement:
* <pre>
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010-2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -13,9 +13,9 @@
package org.apache.flink.examples.scala.relational;
import eu.stratosphere.client.LocalExecutor
import eu.stratosphere.api.common.Program
import eu.stratosphere.api.common.ProgramDescription
import org.apache.flink.client.LocalExecutor
import org.apache.flink.api.common.Program
import org.apache.flink.api.common.ProgramDescription
import org.apache.flink.api.scala._
import org.apache.flink.api.scala.operators._
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010-2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -15,11 +15,11 @@ package org.apache.flink.examples.scala.testing
// Uncomment if you need to rebuild it for PackagedProgramEndToEndTest
//
//import eu.stratosphere.api.common.Program
//import eu.stratosphere.api.common.ProgramDescription
//import org.apache.flink.api.common.Program
//import org.apache.flink.api.common.ProgramDescription
//
//import eu.stratosphere.api.scala._
//import eu.stratosphere.api.scala.operators._
//import org.apache.flink.api.scala._
//import org.apache.flink.api.scala.operators._
//
//
//class KMeansForTest extends Program with ProgramDescription {
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010-2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -13,9 +13,9 @@
package org.apache.flink.examples.scala.wordcount
import eu.stratosphere.client.LocalExecutor
import eu.stratosphere.api.common.Program
import eu.stratosphere.api.common.ProgramDescription
import org.apache.flink.client.LocalExecutor
import org.apache.flink.api.common.Program
import org.apache.flink.api.common.ProgramDescription
import org.apache.flink.api.scala._
import org.apache.flink.api.scala.operators._
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010-2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -13,9 +13,9 @@
package org.apache.flink.examples.scala.wordcount
import eu.stratosphere.client.LocalExecutor
import eu.stratosphere.api.common.Program
import eu.stratosphere.api.common.ProgramDescription
import org.apache.flink.client.LocalExecutor
import org.apache.flink.api.common.Program
import org.apache.flink.api.common.ProgramDescription
import org.apache.flink.api.scala._
import org.apache.flink.api.scala.operators._
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010-2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -13,12 +13,12 @@
package org.apache.flink.examples.scala.wordcount
import eu.stratosphere.client.LocalExecutor
import eu.stratosphere.api.common.Program
import eu.stratosphere.api.common.ProgramDescription
import org.apache.flink.client.LocalExecutor
import org.apache.flink.api.common.Program
import org.apache.flink.api.common.ProgramDescription
import eu.stratosphere.types.IntValue
import eu.stratosphere.types.StringValue
import org.apache.flink.types.IntValue
import org.apache.flink.types.StringValue
import org.apache.flink.api.scala._
import org.apache.flink.api.scala.operators._
......
......@@ -16,8 +16,8 @@ package org.apache.flink.api.scala.operators;
import java.lang.annotation.Annotation;
import java.util.Arrays;
import eu.stratosphere.api.java.record.functions.FunctionAnnotation;
import eu.stratosphere.api.java.record.operators.ReduceOperator;
import org.apache.flink.api.java.record.functions.FunctionAnnotation;
import org.apache.flink.api.java.record.operators.ReduceOperator;
public class Annotations {
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -15,21 +15,21 @@ package org.apache.flink.api.scala
import collection.JavaConversions.asScalaIterator
import eu.stratosphere.api.common.operators.util.FieldSet
import eu.stratosphere.api.common.operators._
import eu.stratosphere.api.common.operators.base.{GroupReduceOperatorBase, DeltaIterationBase, BulkIterationBase, GenericDataSourceBase}
import eu.stratosphere.api.java.record.functions.FunctionAnnotation
import eu.stratosphere.api.java.record.operators.BulkIteration.PartialSolutionPlaceHolder
import eu.stratosphere.api.java.record.operators.DeltaIteration.{WorksetPlaceHolder, SolutionSetPlaceHolder}
import eu.stratosphere.api.java.record.operators.GenericDataSink
import eu.stratosphere.api.java.record.operators.ReduceOperator.Combinable
import eu.stratosphere.api.java.record.functions.FunctionAnnotation.ConstantFields
import eu.stratosphere.api.java.record.functions.FunctionAnnotation.ConstantFieldsExcept
import eu.stratosphere.api.java.record.functions.FunctionAnnotation.ConstantFieldsFirst
import eu.stratosphere.api.java.record.functions.FunctionAnnotation.ConstantFieldsFirstExcept
import eu.stratosphere.api.java.record.functions.FunctionAnnotation.ConstantFieldsSecond
import eu.stratosphere.api.java.record.functions.FunctionAnnotation.ConstantFieldsSecondExcept
import eu.stratosphere.api.java.record.operators.ReduceOperator.Combinable
import org.apache.flink.api.common.operators.util.FieldSet
import org.apache.flink.api.common.operators._
import org.apache.flink.api.common.operators.base.{GroupReduceOperatorBase, DeltaIterationBase, BulkIterationBase, GenericDataSourceBase}
import org.apache.flink.api.java.record.functions.FunctionAnnotation
import org.apache.flink.api.java.record.operators.BulkIteration.PartialSolutionPlaceHolder
import org.apache.flink.api.java.record.operators.DeltaIteration.{WorksetPlaceHolder, SolutionSetPlaceHolder}
import org.apache.flink.api.java.record.operators.GenericDataSink
import org.apache.flink.api.java.record.operators.ReduceOperator.Combinable
import org.apache.flink.api.java.record.functions.FunctionAnnotation.ConstantFields
import org.apache.flink.api.java.record.functions.FunctionAnnotation.ConstantFieldsExcept
import org.apache.flink.api.java.record.functions.FunctionAnnotation.ConstantFieldsFirst
import org.apache.flink.api.java.record.functions.FunctionAnnotation.ConstantFieldsFirstExcept
import org.apache.flink.api.java.record.functions.FunctionAnnotation.ConstantFieldsSecond
import org.apache.flink.api.java.record.functions.FunctionAnnotation.ConstantFieldsSecondExcept
import org.apache.flink.api.java.record.operators.ReduceOperator.Combinable
object AnnotationUtil {
val visited = collection.mutable.Set[Operator[_]]()
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -25,9 +25,9 @@ import org.apache.flink.api.scala.analysis.UDF2
import org.apache.flink.api.scala.analysis.UDF1
import org.apache.flink.api.scala.analysis.FieldSelector
import eu.stratosphere.api.common.operators.Operator
import eu.stratosphere.api.common.operators.util.{FieldSet => PactFieldSet}
import eu.stratosphere.types.Record
import org.apache.flink.api.common.operators.Operator
import org.apache.flink.api.common.operators.util.{FieldSet => PactFieldSet}
import org.apache.flink.types.Record
case class KeyCardinality(
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -18,8 +18,8 @@ import scala.reflect.macros.Context
import org.apache.flink.api.scala.operators._
import eu.stratosphere.api.common.operators.Operator
import eu.stratosphere.types.Record
import org.apache.flink.api.common.operators.Operator
import org.apache.flink.types.Record
class DataSet[T] (val contract: Operator[Record] with ScalaOperator[T, Record]) {
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -17,12 +17,12 @@ import java.net.URI
import org.apache.flink.api.scala.analysis._
import eu.stratosphere.configuration.Configuration
import eu.stratosphere.api.common.io.FileOutputFormat
import eu.stratosphere.types.Record
import eu.stratosphere.api.common.operators.base.GenericDataSinkBase
import eu.stratosphere.api.java.record.operators.FileDataSink
import eu.stratosphere.api.common.io.OutputFormat
import org.apache.flink.configuration.Configuration
import org.apache.flink.api.common.io.FileOutputFormat
import org.apache.flink.types.Record
import org.apache.flink.api.common.operators.base.GenericDataSinkBase
import org.apache.flink.api.java.record.operators.FileDataSink
import org.apache.flink.api.common.io.OutputFormat
object DataSinkOperator {
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -18,13 +18,13 @@ import collection.JavaConversions._
import org.apache.flink.api.scala.analysis._
import org.apache.flink.api.scala.functions._
import org.apache.flink.api.scala.analysis.UDF0
import eu.stratosphere.types._
import eu.stratosphere.types.parser._
import eu.stratosphere.api.java.record.operators.{CollectionDataSource => JavaCollectionDataSource, FileDataSource}
import eu.stratosphere.configuration.Configuration
import eu.stratosphere.api.common.io.FileInputFormat
import eu.stratosphere.api.java.record.operators.{CollectionDataSource => JavaCollectionDataSource}
import eu.stratosphere.api.common.io.InputFormat
import org.apache.flink.types._
import org.apache.flink.types.parser._
import org.apache.flink.api.java.record.operators.{CollectionDataSource => JavaCollectionDataSource, FileDataSource}
import org.apache.flink.configuration.Configuration
import org.apache.flink.api.common.io.FileInputFormat
import org.apache.flink.api.java.record.operators.{CollectionDataSource => JavaCollectionDataSource}
import org.apache.flink.api.common.io.InputFormat
import org.apache.flink.api.scala.operators.TextInputFormat
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -21,12 +21,12 @@ import org.apache.flink.api.scala.analysis.UDF1
import org.apache.flink.api.scala.analysis.UDF2
import org.apache.flink.api.scala.analysis.FieldSelector
import eu.stratosphere.api.common.operators.Operator
import eu.stratosphere.compiler.dag.OptimizerNode
import eu.stratosphere.api.common.operators.AbstractUdfOperator
import eu.stratosphere.api.common.operators.Union
import eu.stratosphere.types.Record
import eu.stratosphere.types.{Nothing => JavaNothing}
import org.apache.flink.api.common.operators.Operator
import org.apache.flink.compiler.dag.OptimizerNode
import org.apache.flink.api.common.operators.AbstractUdfOperator
import org.apache.flink.api.common.operators.Union
import org.apache.flink.types.Record
import org.apache.flink.types.{Nothing => JavaNothing}
trait ScalaOperator[T, UT] {
this: Operator[UT] =>
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -17,11 +17,11 @@ import scala.collection.JavaConversions.asJavaCollection
import java.util.Calendar
import eu.stratosphere.api.common.Plan
import eu.stratosphere.compiler.plan.OptimizedPlan
import eu.stratosphere.compiler.postpass.RecordModelPostPass
import eu.stratosphere.api.common.operators.Operator
import eu.stratosphere.types.Record
import org.apache.flink.api.common.Plan
import org.apache.flink.compiler.plan.OptimizedPlan
import org.apache.flink.compiler.postpass.RecordModelPostPass
import org.apache.flink.api.common.operators.Operator
import org.apache.flink.types.Record
import org.apache.flink.api.scala.analysis.GlobalSchemaGenerator
import org.apache.flink.api.scala.analysis.postPass.GlobalSchemaOptimizer
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -13,21 +13,21 @@
package org.apache.flink.api.scala.analysis
import eu.stratosphere.compiler.dag._
import eu.stratosphere.api.common.operators.Operator
import eu.stratosphere.api.common.operators.Union
import eu.stratosphere.api.common.operators.DualInputOperator
import eu.stratosphere.api.common.operators.SingleInputOperator
import org.apache.flink.compiler.dag._
import org.apache.flink.api.common.operators.Operator
import org.apache.flink.api.common.operators.Union
import org.apache.flink.api.common.operators.DualInputOperator
import org.apache.flink.api.common.operators.SingleInputOperator
import eu.stratosphere.api.common.operators.base.{BulkIterationBase => BulkIteration, DeltaIterationBase => DeltaIteration, GenericDataSinkBase, GenericDataSourceBase}
import org.apache.flink.api.common.operators.base.{BulkIterationBase => BulkIteration, DeltaIterationBase => DeltaIteration, GenericDataSinkBase, GenericDataSourceBase}
import eu.stratosphere.api.java.record.operators.CrossOperator
import eu.stratosphere.api.java.record.operators.CoGroupOperator
import eu.stratosphere.api.java.record.operators.JoinOperator
import eu.stratosphere.api.java.record.operators.MapOperator
import eu.stratosphere.api.java.record.operators.ReduceOperator
import org.apache.flink.api.java.record.operators.CrossOperator
import org.apache.flink.api.java.record.operators.CoGroupOperator
import org.apache.flink.api.java.record.operators.JoinOperator
import org.apache.flink.api.java.record.operators.MapOperator
import org.apache.flink.api.java.record.operators.ReduceOperator
import eu.stratosphere.types.Record
import org.apache.flink.types.Record
import org.apache.flink.api.scala._
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -19,11 +19,11 @@ import scala.Some
import org.apache.flink.api.scala._
import eu.stratosphere.api.common.operators.Operator
import eu.stratosphere.api.java.record.operators._
import eu.stratosphere.api.common.operators.base.{BulkIterationBase => BulkIteration, DeltaIterationBase => DeltaIteration, GenericDataSourceBase, MapOperatorBase}
import eu.stratosphere.api.common.operators.Union
import eu.stratosphere.types.Record
import org.apache.flink.api.common.operators.Operator
import org.apache.flink.api.java.record.operators._
import org.apache.flink.api.common.operators.base.{BulkIterationBase => BulkIteration, DeltaIterationBase => DeltaIteration, GenericDataSourceBase, MapOperatorBase}
import org.apache.flink.api.common.operators.Union
import org.apache.flink.types.Record
class GlobalSchemaGenerator {
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -18,14 +18,14 @@ import org.apache.commons.logging.{LogFactory, Log}
import scala.collection.JavaConversions.collectionAsScalaIterable
import scala.Array.canBuildFrom
import eu.stratosphere.api.common.Plan
import eu.stratosphere.api.common.operators.Operator
import eu.stratosphere.api.common.operators.DualInputOperator
import eu.stratosphere.api.common.operators.SingleInputOperator
import eu.stratosphere.api.common.operators.base.{BulkIterationBase => BulkIteration, DeltaIterationBase => DeltaIteration}
import eu.stratosphere.api.java.record.operators.GenericDataSink
import eu.stratosphere.api.common.operators.base.{BulkIterationBase => BulkIteration}
import eu.stratosphere.api.common.operators.base.{DeltaIterationBase => DeltaIteration}
import org.apache.flink.api.common.Plan
import org.apache.flink.api.common.operators.Operator
import org.apache.flink.api.common.operators.DualInputOperator
import org.apache.flink.api.common.operators.SingleInputOperator
import org.apache.flink.api.common.operators.base.{BulkIterationBase => BulkIteration, DeltaIterationBase => DeltaIteration}
import org.apache.flink.api.java.record.operators.GenericDataSink
import org.apache.flink.api.common.operators.base.{BulkIterationBase => BulkIteration}
import org.apache.flink.api.common.operators.base.{DeltaIterationBase => DeltaIteration}
import Extractors.DataSourceNode
import Extractors.DataSinkNode
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -18,15 +18,15 @@ import scala.language.postfixOps
import org.apache.flink.api.scala.codegen.Util
import eu.stratosphere.types.{Key => PactKey}
import eu.stratosphere.types.Record
import eu.stratosphere.types.{Value => PactValue}
import eu.stratosphere.types.StringValue
import org.apache.flink.types.{Key => PactKey}
import org.apache.flink.types.Record
import org.apache.flink.types.{Value => PactValue}
import org.apache.flink.types.StringValue
abstract class UDT[T] extends Serializable {
protected def createSerializer(indexMap: Array[Int]): UDTSerializer[T]
val fieldTypes: Array[Class[_ <: eu.stratosphere.types.Value]]
val fieldTypes: Array[Class[_ <: org.apache.flink.types.Value]]
val udtIdMap: Map[Int, Int]
def numFields = fieldTypes.length
......
package org.apache.flink.api.scala.analysis.postPass;
// Comment out because this is not working right now
///**
// * Copyright (C) 2010 by the Stratosphere project (http://stratosphere.eu)
// * Copyright (C) 2010 -2014 by the Flink project (http://flink.incubator.apache.org)
// *
// * Licensed 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
......@@ -13,16 +13,16 @@ package org.apache.flink.api.scala.analysis.postPass;
// * specific language governing permissions and limitations under the License.
// */
//
//package eu.stratosphere.api.scala.analysis.postPass
//package org.apache.flink.api.scala.analysis.postPass
//
//import scala.collection.mutable
//import scala.collection.JavaConversions._
//
//import eu.stratosphere.api.scala.analysis._
//import eu.stratosphere.api.scala.contracts._
//import org.apache.flink.api.scala.analysis._
//import org.apache.flink.api.scala.contracts._
//
//import eu.stratosphere.pact.compiler.plan._
//import eu.stratosphere.pact.compiler.plan.candidate.OptimizedPlan
//import org.apache.flink.pact.compiler.plan._
//import org.apache.flink.pact.compiler.plan.candidate.OptimizedPlan
//
//object AmbientFieldDetector {
//
......
package org.apache.flink.api.scala.analysis.postPass;
// Comment out because this is not working right now
///**
// * Copyright (C) 2010 by the Stratosphere project (http://stratosphere.eu)
// * Copyright (C) 2010 -2014 by the Flink project (http://flink.incubator.apache.org)
// *
// * Licensed 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
......@@ -13,15 +13,15 @@ package org.apache.flink.api.scala.analysis.postPass;
// * specific language governing permissions and limitations under the License.
// */
//
//package eu.stratosphere.api.scala.analysis.postPass
//package org.apache.flink.api.scala.analysis.postPass
//
//import scala.collection.JavaConversions._
//
//import eu.stratosphere.api.scala.analysis._
//import eu.stratosphere.api.scala.contracts._
//import org.apache.flink.api.scala.analysis._
//import org.apache.flink.api.scala.contracts._
//
//import eu.stratosphere.pact.compiler.plan._
//import eu.stratosphere.pact.compiler.plan.candidate.OptimizedPlan
//import org.apache.flink.pact.compiler.plan._
//import org.apache.flink.pact.compiler.plan.candidate.OptimizedPlan
//
//object EdgeDependencySets {
//
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010-2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -24,26 +24,26 @@ import org.apache.flink.api.scala.analysis.UDF0
import org.apache.flink.api.scala.analysis.UDF1
import org.apache.flink.api.scala.analysis.UDF2
import eu.stratosphere.api.java.record.operators.CoGroupOperator
import eu.stratosphere.api.java.record.operators.CrossOperator
import eu.stratosphere.api.java.record.operators.MapOperator
import eu.stratosphere.api.java.record.operators.JoinOperator
import eu.stratosphere.api.java.record.operators.ReduceOperator
import eu.stratosphere.compiler.dag.BinaryUnionNode
import eu.stratosphere.compiler.dag.BulkIterationNode
import eu.stratosphere.compiler.dag.CoGroupNode
import eu.stratosphere.compiler.dag.CrossNode
import eu.stratosphere.compiler.dag.DataSinkNode
import eu.stratosphere.compiler.dag.DataSourceNode
import eu.stratosphere.compiler.dag.CollectorMapNode
import eu.stratosphere.compiler.dag.MatchNode
import eu.stratosphere.compiler.dag.OptimizerNode
import eu.stratosphere.compiler.dag.PactConnection
import eu.stratosphere.compiler.dag.GroupReduceNode
import eu.stratosphere.compiler.dag.SinkJoiner
import eu.stratosphere.compiler.dag.WorksetIterationNode
import eu.stratosphere.api.common.operators.Union
import eu.stratosphere.api.common.operators.base.{BulkIterationBase => BulkIteration, DeltaIterationBase => DeltaIteration, GenericDataSinkBase, GenericDataSourceBase}
import org.apache.flink.api.java.record.operators.CoGroupOperator
import org.apache.flink.api.java.record.operators.CrossOperator
import org.apache.flink.api.java.record.operators.MapOperator
import org.apache.flink.api.java.record.operators.JoinOperator
import org.apache.flink.api.java.record.operators.ReduceOperator
import org.apache.flink.compiler.dag.BinaryUnionNode
import org.apache.flink.compiler.dag.BulkIterationNode
import org.apache.flink.compiler.dag.CoGroupNode
import org.apache.flink.compiler.dag.CrossNode
import org.apache.flink.compiler.dag.DataSinkNode
import org.apache.flink.compiler.dag.DataSourceNode
import org.apache.flink.compiler.dag.CollectorMapNode
import org.apache.flink.compiler.dag.MatchNode
import org.apache.flink.compiler.dag.OptimizerNode
import org.apache.flink.compiler.dag.PactConnection
import org.apache.flink.compiler.dag.GroupReduceNode
import org.apache.flink.compiler.dag.SinkJoiner
import org.apache.flink.compiler.dag.WorksetIterationNode
import org.apache.flink.api.common.operators.Union
import org.apache.flink.api.common.operators.base.{BulkIterationBase => BulkIteration, DeltaIterationBase => DeltaIteration, GenericDataSinkBase, GenericDataSourceBase}
object Extractors {
......
package org.apache.flink.api.scala.analysis.postPass;
// Comment out because this is not working right now
///**
// * Copyright (C) 2010 by the Stratosphere project (http://stratosphere.eu)
// * Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
// *
// * Licensed 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
......@@ -13,16 +13,16 @@ package org.apache.flink.api.scala.analysis.postPass;
// * specific language governing permissions and limitations under the License.
// */
//
//package eu.stratosphere.api.scala.analysis.postPass
//package org.apache.flink.api.scala.analysis.postPass
//
//import scala.collection.mutable
//import scala.collection.JavaConversions._
//
//import eu.stratosphere.api.scala.analysis._
//import eu.stratosphere.api.scala.contracts._
//import org.apache.flink.api.scala.analysis._
//import org.apache.flink.api.scala.contracts._
//
//import eu.stratosphere.pact.compiler.plan._
//import eu.stratosphere.pact.compiler.plan.candidate.OptimizedPlan
//import org.apache.flink.pact.compiler.plan._
//import org.apache.flink.pact.compiler.plan.candidate.OptimizedPlan
//
//object GlobalSchemaCompactor {
//
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -18,8 +18,8 @@ import scala.collection.JavaConversions.collectionAsScalaIterable
import org.apache.flink.api.scala.ScalaOperator
import eu.stratosphere.compiler.dag.OptimizerNode
import eu.stratosphere.compiler.plan.OptimizedPlan
import org.apache.flink.compiler.dag.OptimizerNode
import org.apache.flink.compiler.plan.OptimizedPlan
trait GlobalSchemaOptimizer {
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -30,15 +30,15 @@ import Extractors.ReduceNode
import org.apache.flink.api.scala.analysis.FieldSet
import org.apache.flink.api.scala.analysis.FieldSelector
import eu.stratosphere.compiler.dag.BinaryUnionNode
import eu.stratosphere.compiler.dag.OptimizerNode
import eu.stratosphere.compiler.dag.SinkJoiner
import eu.stratosphere.compiler.plan.OptimizedPlan
import eu.stratosphere.api.common.Plan
import eu.stratosphere.api.common.operators.Operator
import eu.stratosphere.api.common.operators.SingleInputOperator
import eu.stratosphere.api.common.operators.DualInputOperator
import eu.stratosphere.api.java.record.operators.GenericDataSink
import org.apache.flink.compiler.dag.BinaryUnionNode
import org.apache.flink.compiler.dag.OptimizerNode
import org.apache.flink.compiler.dag.SinkJoiner
import org.apache.flink.compiler.plan.OptimizedPlan
import org.apache.flink.api.common.Plan
import org.apache.flink.api.common.operators.Operator
import org.apache.flink.api.common.operators.SingleInputOperator
import org.apache.flink.api.common.operators.DualInputOperator
import org.apache.flink.api.java.record.operators.GenericDataSink
object GlobalSchemaPrinter {
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -18,8 +18,8 @@ import scala.collection.JavaConversions._
import org.apache.flink.api.scala.analysis._
import eu.stratosphere.compiler.dag._
import eu.stratosphere.compiler.plan.OptimizedPlan
import org.apache.flink.compiler.dag._
import org.apache.flink.compiler.plan.OptimizedPlan
object OutputSets {
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -20,20 +20,20 @@ trait DeserializeMethodGen[C <: Context] { this: MacroContextHolder[C] with UDTD
protected def mkDeserialize(desc: UDTDescriptor, listImpls: Map[Int, Type]): List[Tree] = {
// val rootRecyclingOn = mkMethod("deserializeRecyclingOn", Flag.OVERRIDE | Flag.FINAL, List(("record", typeOf[eu.stratosphere.pact.common.`type`.Record])), desc.tpe, {
val rootRecyclingOn = mkMethod("deserializeRecyclingOn", Flag.FINAL, List(("record", typeOf[eu.stratosphere.types.Record])), desc.tpe, {
// val rootRecyclingOn = mkMethod("deserializeRecyclingOn", Flag.OVERRIDE | Flag.FINAL, List(("record", typeOf[org.apache.flink.pact.common.`type`.Record])), desc.tpe, {
val rootRecyclingOn = mkMethod("deserializeRecyclingOn", Flag.FINAL, List(("record", typeOf[org.apache.flink.types.Record])), desc.tpe, {
val env = GenEnvironment(listImpls, "flat" + desc.id, false, true, true, true)
mkSingle(genDeserialize(desc, Ident("record"), env, Map()))
})
// val rootRecyclingOff = mkMethod("deserializeRecyclingOff", Flag.OVERRIDE | Flag.FINAL, List(("record", typeOf[eu.stratosphere.pact.common.`type`.Record])), desc.tpe, {
val rootRecyclingOff = mkMethod("deserializeRecyclingOff", Flag.FINAL, List(("record", typeOf[eu.stratosphere.types.Record])), desc.tpe, {
// val rootRecyclingOff = mkMethod("deserializeRecyclingOff", Flag.OVERRIDE | Flag.FINAL, List(("record", typeOf[org.apache.flink.pact.common.`type`.Record])), desc.tpe, {
val rootRecyclingOff = mkMethod("deserializeRecyclingOff", Flag.FINAL, List(("record", typeOf[org.apache.flink.types.Record])), desc.tpe, {
val env = GenEnvironment(listImpls, "flat" + desc.id, false, false, true, true)
mkSingle(genDeserialize(desc, Ident("record"), env, Map()))
})
val aux = desc.getRecursiveRefs map { desc =>
mkMethod("deserialize" + desc.id, Flag.PRIVATE | Flag.FINAL, List(("record", typeOf[eu.stratosphere.types.Record])), desc.tpe, {
mkMethod("deserialize" + desc.id, Flag.PRIVATE | Flag.FINAL, List(("record", typeOf[org.apache.flink.types.Record])), desc.tpe, {
val env = GenEnvironment(listImpls, "boxed" + desc.id, true, false, false, true)
mkSingle(genDeserialize(desc, Ident("record"), env, Map()))
})
......@@ -182,7 +182,7 @@ trait DeserializeMethodGen[C <: Context] { this: MacroContextHolder[C] with UDTD
case RecursiveDescriptor(id, tpe, refId) => {
val chk = mkAnd(env.mkChkIdx(id), env.mkNotIsNull(id, source))
val rec = mkVal("record" + id, NoFlags, false, typeOf[eu.stratosphere.types.Record], New(TypeTree(typeOf[eu.stratosphere.types.Record]), List(List())))
val rec = mkVal("record" + id, NoFlags, false, typeOf[org.apache.flink.types.Record], New(TypeTree(typeOf[org.apache.flink.types.Record]), List(List())))
val get = env.mkGetFieldInto(id, source, Ident("record" + id: TermName))
val des = env.mkCallDeserialize(refId, Ident("record" + id: TermName))
......@@ -250,6 +250,6 @@ trait DeserializeMethodGen[C <: Context] { this: MacroContextHolder[C] with UDTD
case BoxedPrimitiveDescriptor(_, _, _, wrapper, _, _) => wrapper
case PactValueDescriptor(_, tpe) => tpe
case ListDescriptor(id, _, _, _) => env.listImpls(id)
case _ => typeOf[eu.stratosphere.types.Record]
case _ => typeOf[org.apache.flink.types.Record]
}
}
\ No newline at end of file
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -74,7 +74,7 @@ trait Loggers[C <: Context] { this: MacroContextHolder[C] =>
def getMsgAndStackLine(e: Throwable) = {
val lines = e.getStackTrace.map(_.toString)
val relevant = lines filter { _.contains("eu.stratosphere") }
val relevant = lines filter { _.contains("org.apache.flink") }
val stackLine = relevant.headOption getOrElse e.getStackTrace.toString
e.getMessage() + " @ " + stackLine
}
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -20,15 +20,15 @@ trait SerializeMethodGen[C <: Context] { this: MacroContextHolder[C] with UDTDes
protected def mkSerialize(desc: UDTDescriptor, listImpls: Map[Int, Type]): List[Tree] = {
// val root = mkMethod("serialize", Flag.OVERRIDE | Flag.FINAL, List(("item", desc.tpe), ("record", typeOf[eu.stratosphere.pact.common.`type`.Record])), definitions.UnitTpe, {
val root = mkMethod("serialize", Flag.FINAL, List(("item", desc.tpe), ("record", typeOf[eu.stratosphere.types.Record])), definitions.UnitTpe, {
// val root = mkMethod("serialize", Flag.OVERRIDE | Flag.FINAL, List(("item", desc.tpe), ("record", typeOf[org.apache.flink.pact.common.`type`.Record])), definitions.UnitTpe, {
val root = mkMethod("serialize", Flag.FINAL, List(("item", desc.tpe), ("record", typeOf[org.apache.flink.types.Record])), definitions.UnitTpe, {
val env = GenEnvironment(listImpls, "flat" + desc.id, false, true, true, true)
val stats = genSerialize(desc, Ident("item": TermName), Ident("record": TermName), env)
Block(stats.toList, mkUnit)
})
val aux = desc.getRecursiveRefs map { desc =>
mkMethod("serialize" + desc.id, Flag.PRIVATE | Flag.FINAL, List(("item", desc.tpe), ("record", typeOf[eu.stratosphere.types.Record])), definitions.UnitTpe, {
mkMethod("serialize" + desc.id, Flag.PRIVATE | Flag.FINAL, List(("item", desc.tpe), ("record", typeOf[org.apache.flink.types.Record])), definitions.UnitTpe, {
val env = GenEnvironment(listImpls, "boxed" + desc.id, true, false, false, true)
val stats = genSerialize(desc, Ident("item": TermName), Ident("record": TermName), env)
Block(stats.toList, mkUnit)
......@@ -154,7 +154,7 @@ trait SerializeMethodGen[C <: Context] { this: MacroContextHolder[C] with UDTDes
// needed *before* the recursion.
val updTgt = Apply(Select(target, "updateBinaryRepresenation"), List())
val rec = mkVal("record" + id, NoFlags, false, typeOf[eu.stratosphere.types.Record], New(TypeTree(typeOf[eu.stratosphere.types.Record]), List(List())))
val rec = mkVal("record" + id, NoFlags, false, typeOf[org.apache.flink.types.Record], New(TypeTree(typeOf[org.apache.flink.types.Record]), List(List())))
val ser = env.mkCallSerialize(refId, source, Ident("record" + id: TermName))
// Persist the new inner record after recursing, since the
......@@ -192,7 +192,7 @@ trait SerializeMethodGen[C <: Context] { this: MacroContextHolder[C] with UDTDes
}
case RecursiveDescriptor(id, tpe, refId) => {
val rec = mkVal("record" + id, NoFlags, false, typeOf[eu.stratosphere.types.Record], New(TypeTree(typeOf[eu.stratosphere.types.Record]), List(List())))
val rec = mkVal("record" + id, NoFlags, false, typeOf[org.apache.flink.types.Record], New(TypeTree(typeOf[org.apache.flink.types.Record]), List(List())))
val ser = env.mkCallSerialize(refId, Ident("item": TermName), Ident("record" + id: TermName))
val updRec = Apply(Select(Ident("record" + id: TermName), "updateBinaryRepresenation"), List())
......@@ -200,7 +200,7 @@ trait SerializeMethodGen[C <: Context] { this: MacroContextHolder[C] with UDTDes
}
case _ => {
val rec = mkVal("record", NoFlags, false, typeOf[eu.stratosphere.types.Record], New(TypeTree(typeOf[eu.stratosphere.types.Record]), List(List())))
val rec = mkVal("record", NoFlags, false, typeOf[org.apache.flink.types.Record], New(TypeTree(typeOf[org.apache.flink.types.Record]), List(List())))
val ser = genSerialize(elem, Ident("item": TermName), Ident("record": TermName), env.copy(idxPrefix = "boxed" + elem.id, chkIndex = false, chkNull = false))
val upd = Apply(Select(Ident("record": TermName), "updateBinaryRepresenation"), List())
((rec +: ser) :+ upd, Ident("record": TermName))
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -18,7 +18,7 @@ import scala.reflect.macros.Context
import org.apache.flink.api.scala.analysis.UDTSerializer
import eu.stratosphere.types.Record
import org.apache.flink.types.Record
trait SerializerGen[C <: Context] { this: MacroContextHolder[C] with UDTDescriptors[C] with UDTAnalyzer[C] with TreeGen[C] with SerializeMethodGen[C] with DeserializeMethodGen[C] with Loggers[C] =>
......@@ -79,9 +79,9 @@ trait SerializerGen[C <: Context] { this: MacroContextHolder[C] with UDTDescript
(ser, createSerializer)
}
private def mkListImplClass[T <: eu.stratosphere.types.Value: c.WeakTypeTag]: (Tree, Type) = {
private def mkListImplClass[T <: org.apache.flink.types.Value: c.WeakTypeTag]: (Tree, Type) = {
val listImplName = c.fresh[TypeName]("PactListImpl")
val tpe = weakTypeOf[eu.stratosphere.types.ListValue[T]]
val tpe = weakTypeOf[org.apache.flink.types.ListValue[T]]
val listDef = mkClass(listImplName, Flag.FINAL, List(tpe), {
List(mkMethod(nme.CONSTRUCTOR.toString(), NoFlags, List(), NoType, Block(List(mkSuperCall()), mkUnit)))
......@@ -111,7 +111,7 @@ trait SerializerGen[C <: Context] { this: MacroContextHolder[C] with UDTDescript
}
case ListDescriptor(id, _, _, elem) => {
val (classDefs, tpes) = mkListImplClasses(elem)
val (classDef, tpe) = mkListImplClass(c.WeakTypeTag(typeOf[eu.stratosphere.types.Record]))
val (classDef, tpe) = mkListImplClass(c.WeakTypeTag(typeOf[org.apache.flink.types.Record]))
(classDefs :+ classDef, tpes + (id -> tpe))
}
case BaseClassDescriptor(_, _, getters, subTypes) => {
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -19,15 +19,15 @@ import scala.collection.mutable
import scala.reflect.macros.Context
import scala.util.DynamicVariable
import eu.stratosphere.types.BooleanValue
import eu.stratosphere.types.ByteValue
import eu.stratosphere.types.CharValue
import eu.stratosphere.types.DoubleValue
import eu.stratosphere.types.FloatValue
import eu.stratosphere.types.IntValue
import eu.stratosphere.types.StringValue
import eu.stratosphere.types.LongValue
import eu.stratosphere.types.ShortValue
import org.apache.flink.types.BooleanValue
import org.apache.flink.types.ByteValue
import org.apache.flink.types.CharValue
import org.apache.flink.types.DoubleValue
import org.apache.flink.types.FloatValue
import org.apache.flink.types.IntValue
import org.apache.flink.types.StringValue
import org.apache.flink.types.LongValue
import org.apache.flink.types.ShortValue
trait UDTAnalyzer[C <: Context] { this: MacroContextHolder[C] with UDTDescriptors[C] with Loggers[C] =>
......@@ -274,7 +274,7 @@ trait UDTAnalyzer[C <: Context] { this: MacroContextHolder[C] with UDTDescriptor
}
private object PactValueType {
def unapply(tpe: Type): Boolean = tpe.typeSymbol.asClass.baseClasses exists { s => s.fullName == "eu.stratosphere.types.Value" }
def unapply(tpe: Type): Boolean = tpe.typeSymbol.asClass.baseClasses exists { s => s.fullName == "org.apache.flink.types.Value" }
}
private class UDTAnalyzerCache {
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -64,14 +64,14 @@ trait UDTDescriptors[C <: Context] { this: MacroContextHolder[C] =>
case class PrimitiveDescriptor(id: Int, tpe: Type, default: Literal, wrapper: Type) extends UDTDescriptor {
override val isPrimitiveProduct = true
override def flatten = Seq(this)
override def canBeKey = wrapper <:< typeOf[eu.stratosphere.types.Key[_]]
override def canBeKey = wrapper <:< typeOf[org.apache.flink.types.Key[_]]
}
case class BoxedPrimitiveDescriptor(id: Int, tpe: Type, default: Literal, wrapper: Type, box: Tree => Tree, unbox: Tree => Tree) extends UDTDescriptor {
override val isPrimitiveProduct = true
override def flatten = Seq(this)
override def canBeKey = wrapper <:< typeOf[eu.stratosphere.types.Key[_]]
override def canBeKey = wrapper <:< typeOf[org.apache.flink.types.Key[_]]
override def hashCode() = (id, tpe, default, wrapper, "BoxedPrimitiveDescriptor").hashCode()
override def equals(that: Any) = that match {
......@@ -140,13 +140,13 @@ trait UDTDescriptors[C <: Context] { this: MacroContextHolder[C] =>
case class RecursiveDescriptor(id: Int, tpe: Type, refId: Int) extends UDTDescriptor {
override def flatten = Seq(this)
override def canBeKey = tpe <:< typeOf[eu.stratosphere.types.Key[_]]
override def canBeKey = tpe <:< typeOf[org.apache.flink.types.Key[_]]
}
case class PactValueDescriptor(id: Int, tpe: Type) extends UDTDescriptor {
override val isPrimitiveProduct = true
override def flatten = Seq(this)
override def canBeKey = tpe <:< typeOf[eu.stratosphere.types.Key[_]]
override def canBeKey = tpe <:< typeOf[org.apache.flink.types.Key[_]]
}
}
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -17,8 +17,8 @@ import scala.reflect.macros.Context
import org.apache.flink.api.scala.analysis.UDT
import eu.stratosphere.types.ListValue
import eu.stratosphere.types.Record
import org.apache.flink.types.ListValue
import org.apache.flink.types.Record
trait UDTGen[C <: Context] { this: MacroContextHolder[C] with UDTDescriptors[C] with UDTAnalyzer[C] with TreeGen[C] with SerializerGen[C] with SerializeMethodGen[C] with DeserializeMethodGen[C] with Loggers[C] =>
import c.universe._
......@@ -43,13 +43,13 @@ trait UDTGen[C <: Context] { this: MacroContextHolder[C] with UDTDescriptors[C]
private def mkFieldTypes(desc: UDTDescriptor): Tree = {
mkVal("fieldTypes", Flag.OVERRIDE | Flag.FINAL, false, typeOf[Array[Class[_ <: eu.stratosphere.types.Value]]], {
mkVal("fieldTypes", Flag.OVERRIDE | Flag.FINAL, false, typeOf[Array[Class[_ <: org.apache.flink.types.Value]]], {
val fieldTypes = getIndexFields(desc).toList map {
case PrimitiveDescriptor(_, _, _, wrapper) => Literal(Constant(wrapper))
case BoxedPrimitiveDescriptor(_, _, _, wrapper, _, _) => Literal(Constant(wrapper))
case PactValueDescriptor(_, tpe) => Literal(Constant(tpe))
case ListDescriptor(_, _, _, _) => Literal(Constant(typeOf[ListValue[eu.stratosphere.types.Value]]))
case ListDescriptor(_, _, _, _) => Literal(Constant(typeOf[ListValue[org.apache.flink.types.Value]]))
// Box inner instances of recursive types
case RecursiveDescriptor(_, _, _) => Literal(Constant(typeOf[Record]))
case BaseClassDescriptor(_, _, _, _) => throw new RuntimeException("Illegal descriptor for basic record field.")
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......
/**
* Copyright (C) 2010 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -18,10 +18,10 @@ import java.util.{Iterator => JIterator}
import org.apache.flink.api.scala.analysis.{UDTSerializer, UDT}
import org.apache.flink.api.scala.analysis.UDF2
import eu.stratosphere.api.java.record.functions.{CoGroupFunction => JCoGroupFunction}
import eu.stratosphere.types.Record
import eu.stratosphere.util.Collector
import eu.stratosphere.configuration.Configuration
import org.apache.flink.api.java.record.functions.{CoGroupFunction => JCoGroupFunction}
import org.apache.flink.types.Record
import org.apache.flink.util.Collector
import org.apache.flink.configuration.Configuration
abstract class CoGroupFunctionBase[LeftIn: UDT, RightIn: UDT, Out: UDT] extends JCoGroupFunction with Serializable {
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -16,9 +16,9 @@ package org.apache.flink.api.scala.functions
import org.apache.flink.api.scala.analysis.{UDTSerializer, UDT}
import org.apache.flink.api.scala.analysis.UDF2
import eu.stratosphere.api.java.record.functions.{CrossFunction => JCrossFunction}
import eu.stratosphere.types.Record
import eu.stratosphere.util.Collector
import org.apache.flink.api.java.record.functions.{CrossFunction => JCrossFunction}
import org.apache.flink.types.Record
import org.apache.flink.util.Collector
abstract class CrossFunctionBase[LeftIn: UDT, RightIn: UDT, Out: UDT] extends JCrossFunction with Serializable {
val leftInputUDT = implicitly[UDT[LeftIn]]
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -17,7 +17,7 @@ import java.util.{ Iterator => JIterator }
import org.apache.flink.api.scala.analysis.UDTSerializer
import eu.stratosphere.types.Record
import org.apache.flink.types.Record
protected final class DeserializingIterator[T](deserializer: UDTSerializer[T]) extends Iterator[T] {
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -16,9 +16,9 @@ package org.apache.flink.api.scala.functions
import org.apache.flink.api.scala.analysis.{UDTSerializer, UDT}
import org.apache.flink.api.scala.analysis.UDF2
import eu.stratosphere.api.java.record.functions.{JoinFunction => JJoinFunction}
import eu.stratosphere.types.Record
import eu.stratosphere.util.Collector
import org.apache.flink.api.java.record.functions.{JoinFunction => JJoinFunction}
import org.apache.flink.types.Record
import org.apache.flink.util.Collector
abstract class JoinFunctionBase[LeftIn: UDT, RightIn: UDT, Out: UDT] extends JJoinFunction with Serializable {
val leftInputUDT = implicitly[UDT[LeftIn]]
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -16,9 +16,9 @@ package org.apache.flink.api.scala.functions
import org.apache.flink.api.scala.analysis.{UDTSerializer, UDT}
import org.apache.flink.api.scala.analysis.UDF1
import eu.stratosphere.api.java.record.functions.{MapFunction => JMapFunction}
import eu.stratosphere.types.Record
import eu.stratosphere.util.Collector
import org.apache.flink.api.java.record.functions.{MapFunction => JMapFunction}
import org.apache.flink.types.Record
import org.apache.flink.util.Collector
abstract class MapFunctionBase[In: UDT, Out: UDT] extends JMapFunction with Serializable{
val inputUDT: UDT[In] = implicitly[UDT[In]]
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -20,9 +20,9 @@ import scala.Iterator
import org.apache.flink.api.scala.analysis.{UDTSerializer, FieldSelector, UDT}
import org.apache.flink.api.scala.analysis.UDF1
import eu.stratosphere.api.java.record.functions.{ReduceFunction => JReduceFunction}
import eu.stratosphere.types.Record
import eu.stratosphere.util.Collector
import org.apache.flink.api.java.record.functions.{ReduceFunction => JReduceFunction}
import org.apache.flink.types.Record
import org.apache.flink.util.Collector
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -18,13 +18,13 @@ import scala.reflect.macros.Context
import java.util.{ Iterator => JIterator }
import eu.stratosphere.types.Record
import eu.stratosphere.util.Collector
import eu.stratosphere.api.common.operators.Operator
import eu.stratosphere.api.java.record.operators.CoGroupOperator
import eu.stratosphere.api.java.record.functions.{CoGroupFunction => JCoGroupFunction}
import eu.stratosphere.api.common.operators.util.UserCodeObjectWrapper
import eu.stratosphere.configuration.Configuration
import org.apache.flink.types.Record
import org.apache.flink.util.Collector
import org.apache.flink.api.common.operators.Operator
import org.apache.flink.api.java.record.operators.CoGroupOperator
import org.apache.flink.api.java.record.functions.{CoGroupFunction => JCoGroupFunction}
import org.apache.flink.api.common.operators.util.UserCodeObjectWrapper
import org.apache.flink.configuration.Configuration
import org.apache.flink.api.scala.codegen.{MacroContextHolder, Util}
import org.apache.flink.api.scala._
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -22,12 +22,12 @@ import org.apache.flink.api.scala.analysis.UDT
import org.apache.flink.api.scala.analysis.UDF1
import org.apache.flink.api.scala.analysis.UDTSerializer
import eu.stratosphere.util.Collector
import eu.stratosphere.configuration.Configuration
import eu.stratosphere.types.Record
import eu.stratosphere.api.common.operators.Operator
import eu.stratosphere.api.java.record.functions.MapFunction
import eu.stratosphere.api.java.record.operators.MapOperator
import org.apache.flink.util.Collector
import org.apache.flink.configuration.Configuration
import org.apache.flink.types.Record
import org.apache.flink.api.common.operators.Operator
import org.apache.flink.api.java.record.functions.MapFunction
import org.apache.flink.api.java.record.operators.MapOperator
object CopyOperator {
def apply(source: Operator[Record] with ScalaOperator[_, _]): DataSet[_] = {
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -27,12 +27,12 @@ import org.apache.flink.api.scala.functions.DeserializingIterator
import org.apache.flink.api.scala.DataSet
import org.apache.flink.api.scala.TwoInputHintable
import eu.stratosphere.api.java.record.operators.MapOperator
import eu.stratosphere.types.Record
import eu.stratosphere.util.Collector
import eu.stratosphere.api.common.operators.Operator
import eu.stratosphere.api.java.record.operators.CrossOperator
import eu.stratosphere.configuration.Configuration
import org.apache.flink.api.java.record.operators.MapOperator
import org.apache.flink.types.Record
import org.apache.flink.util.Collector
import org.apache.flink.api.common.operators.Operator
import org.apache.flink.api.java.record.operators.CrossOperator
import org.apache.flink.configuration.Configuration
class CrossDataSet[LeftIn, RightIn](val leftInput: DataSet[LeftIn], val rightInput: DataSet[RightIn]) {
def map[Out](fun: (LeftIn, RightIn) => Out): DataSet[Out] with TwoInputHintable[LeftIn, RightIn, Out] = macro CrossMacros.map[LeftIn, RightIn, Out]
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -26,14 +26,14 @@ import org.apache.flink.api.scala.analysis.UDF1
import org.apache.flink.api.scala.codegen.UDTDescriptors
import org.apache.flink.api.scala.codegen.MacroContextHolder
import eu.stratosphere.configuration.Configuration
import eu.stratosphere.types.Record
import eu.stratosphere.api.common.io.{BinaryOutputFormat => JavaBinaryOutputFormat}
import eu.stratosphere.api.common.io.{SerializedOutputFormat => JavaSerializedOutputFormat}
import eu.stratosphere.api.java.record.io.{DelimitedOutputFormat => JavaDelimitedOutputFormat}
import eu.stratosphere.api.java.record.io.{CsvOutputFormat => JavaCsvOutputFormat}
import eu.stratosphere.api.java.record.io.{FileOutputFormat => JavaFileOutputFormat}
import eu.stratosphere.api.common.io.{OutputFormat => JavaOutputFormat}
import org.apache.flink.configuration.Configuration
import org.apache.flink.types.Record
import org.apache.flink.api.common.io.{BinaryOutputFormat => JavaBinaryOutputFormat}
import org.apache.flink.api.common.io.{SerializedOutputFormat => JavaSerializedOutputFormat}
import org.apache.flink.api.java.record.io.{DelimitedOutputFormat => JavaDelimitedOutputFormat}
import org.apache.flink.api.java.record.io.{CsvOutputFormat => JavaCsvOutputFormat}
import org.apache.flink.api.java.record.io.{FileOutputFormat => JavaFileOutputFormat}
import org.apache.flink.api.common.io.{OutputFormat => JavaOutputFormat}
trait ScalaOutputFormatBase[In] extends ScalaOutputFormat[In] { this: JavaOutputFormat[_] =>
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -24,25 +24,25 @@ import org.apache.flink.api.scala.analysis.UDF0
import org.apache.flink.api.scala.analysis.OutputField
import org.apache.flink.api.scala.codegen.MacroContextHolder
import eu.stratosphere.configuration.Configuration
import eu.stratosphere.types.Record
import eu.stratosphere.types.Value
import eu.stratosphere.types.DoubleValue
import eu.stratosphere.types.IntValue
import eu.stratosphere.types.LongValue
import eu.stratosphere.types.StringValue
import eu.stratosphere.types.parser.DecimalTextDoubleParser
import eu.stratosphere.types.parser.DecimalTextIntParser
import eu.stratosphere.types.parser.DecimalTextLongParser
import eu.stratosphere.types.parser.FieldParser
import eu.stratosphere.types.parser.VarLengthStringParser
import eu.stratosphere.api.common.io.{InputFormat => JavaInputFormat}
import eu.stratosphere.api.common.io.{BinaryInputFormat => JavaBinaryInputFormat}
import eu.stratosphere.api.common.io.{SerializedInputFormat => JavaSerializedInputFormat}
import eu.stratosphere.api.java.record.io.{DelimitedInputFormat => JavaDelimitedInputFormat}
import eu.stratosphere.api.java.record.io.{FixedLengthInputFormat => JavaFixedLengthInputFormat}
import eu.stratosphere.api.java.record.io.{CsvInputFormat => JavaCsvInputFormat}
import eu.stratosphere.api.java.record.io.{TextInputFormat => JavaTextInputFormat}
import org.apache.flink.configuration.Configuration
import org.apache.flink.types.Record
import org.apache.flink.types.Value
import org.apache.flink.types.DoubleValue
import org.apache.flink.types.IntValue
import org.apache.flink.types.LongValue
import org.apache.flink.types.StringValue
import org.apache.flink.types.parser.DoubleValueParser
import org.apache.flink.types.parser.IntValueParser
import org.apache.flink.types.parser.LongValueParser
import org.apache.flink.types.parser.FieldParser
import org.apache.flink.types.parser.StringValueParser
import org.apache.flink.api.common.io.{InputFormat => JavaInputFormat}
import org.apache.flink.api.common.io.{BinaryInputFormat => JavaBinaryInputFormat}
import org.apache.flink.api.common.io.{SerializedInputFormat => JavaSerializedInputFormat}
import org.apache.flink.api.java.record.io.{DelimitedInputFormat => JavaDelimitedInputFormat}
import org.apache.flink.api.java.record.io.{FixedLengthInputFormat => JavaFixedLengthInputFormat}
import org.apache.flink.api.java.record.io.{CsvInputFormat => JavaCsvInputFormat}
import org.apache.flink.api.java.record.io.{TextInputFormat => JavaTextInputFormat}
trait ScalaInputFormatBase[Out] extends ScalaInputFormat[Out] { this: JavaInputFormat[_, _] =>
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -26,21 +26,21 @@ import org.apache.flink.api.scala.analysis.UDTSerializer
import org.apache.flink.api.scala.analysis.UDF0
import org.apache.flink.api.scala.analysis.FieldSelector
import eu.stratosphere.configuration.Configuration
import eu.stratosphere.api.common.functions.AbstractFunction
import eu.stratosphere.api.java.record.operators.BulkIteration
import eu.stratosphere.api.common.operators.base.BulkIterationBase
import eu.stratosphere.api.java.record.operators.DeltaIteration
import eu.stratosphere.api.common.operators.base.BulkIterationBase.{TerminationCriterionAggregationConvergence, TerminationCriterionAggregator, TerminationCriterionMapper}
import eu.stratosphere.api.common.operators.base.MapOperatorBase
import eu.stratosphere.types.NothingTypeInfo
import eu.stratosphere.types.{Nothing => JavaNothing}
import eu.stratosphere.api.java.typeutils.RecordTypeInfo
import eu.stratosphere.api.common.operators.{UnaryOperatorInformation, Operator}
import eu.stratosphere.api.java.record.operators.MapOperator
import eu.stratosphere.types.Record
import eu.stratosphere.api.java.record.functions.MapFunction
import eu.stratosphere.util.Collector
import org.apache.flink.configuration.Configuration
import org.apache.flink.api.common.functions.AbstractFunction
import org.apache.flink.api.java.record.operators.BulkIteration
import org.apache.flink.api.common.operators.base.BulkIterationBase
import org.apache.flink.api.java.record.operators.DeltaIteration
import org.apache.flink.api.common.operators.base.BulkIterationBase.{TerminationCriterionAggregationConvergence, TerminationCriterionAggregator, TerminationCriterionMapper}
import org.apache.flink.api.common.operators.base.MapOperatorBase
import org.apache.flink.types.NothingTypeInfo
import org.apache.flink.types.{Nothing => JavaNothing}
import org.apache.flink.api.java.typeutils.RecordTypeInfo
import org.apache.flink.api.common.operators.{UnaryOperatorInformation, Operator}
import org.apache.flink.api.java.record.operators.MapOperator
import org.apache.flink.types.Record
import org.apache.flink.api.java.record.functions.MapFunction
import org.apache.flink.util.Collector
object IterateMacros {
......@@ -72,7 +72,7 @@ object IterateMacros {
contract.setInput(c.prefix.splice.contract)
contract.setNextPartialSolution(output.contract)
// is currently not implemented in stratosphere
// is currently not implemented in flink
// if (term != null) contract.setTerminationCriterion(term)
new DataSet(contract)
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -18,13 +18,13 @@ import scala.reflect.macros.Context
import java.util.{ Iterator => JIterator }
import eu.stratosphere.types.Record
import eu.stratosphere.util.Collector
import eu.stratosphere.api.common.operators.Operator
import eu.stratosphere.api.java.record.operators.JoinOperator
import eu.stratosphere.api.java.record.functions.{JoinFunction => JJoinFunction}
import eu.stratosphere.api.common.operators.util.UserCodeObjectWrapper
import eu.stratosphere.configuration.Configuration
import org.apache.flink.types.Record
import org.apache.flink.util.Collector
import org.apache.flink.api.common.operators.Operator
import org.apache.flink.api.java.record.operators.JoinOperator
import org.apache.flink.api.java.record.functions.{JoinFunction => JJoinFunction}
import org.apache.flink.api.common.operators.util.UserCodeObjectWrapper
import org.apache.flink.configuration.Configuration
import org.apache.flink.api.scala._
import org.apache.flink.api.scala.analysis._
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -25,9 +25,9 @@ import org.apache.flink.api.scala.analysis._
import org.apache.flink.api.scala.functions.{MapFunction, MapFunctionBase}
import org.apache.flink.api.scala.functions.{FlatMapFunction, FilterFunction}
import eu.stratosphere.api.java.record.operators.MapOperator
import eu.stratosphere.types.Record
import eu.stratosphere.util.Collector
import org.apache.flink.api.java.record.operators.MapOperator
import org.apache.flink.types.Record
import org.apache.flink.util.Collector
object MapMacros {
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -28,14 +28,14 @@ import org.apache.flink.api.scala.functions.{ReduceFunction, ReduceFunctionBase,
import org.apache.flink.api.scala.analysis.UDF1
import org.apache.flink.api.scala.analysis.FieldSelector
import eu.stratosphere.configuration.Configuration
import eu.stratosphere.util.Collector
import eu.stratosphere.api.common.operators.Operator
import eu.stratosphere.api.java.record.operators.MapOperator
import eu.stratosphere.types.Record
import eu.stratosphere.types.IntValue
import eu.stratosphere.api.java.record.operators.ReduceOperator
import eu.stratosphere.api.java.record.functions.{ReduceFunction => JReduceFunction}
import org.apache.flink.configuration.Configuration
import org.apache.flink.util.Collector
import org.apache.flink.api.common.operators.Operator
import org.apache.flink.api.java.record.operators.MapOperator
import org.apache.flink.types.Record
import org.apache.flink.types.IntValue
import org.apache.flink.api.java.record.operators.ReduceOperator
import org.apache.flink.api.java.record.functions.{ReduceFunction => JReduceFunction}
class KeyedDataSet[In](val keySelection: List[Int], val input: DataSet[In]) {
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -19,8 +19,8 @@ import org.apache.flink.api.scala.UnionScalaOperator
import org.apache.flink.api.scala.DataSet
import org.apache.flink.api.scala.analysis.UDF2
import eu.stratosphere.api.common.operators.Union
import eu.stratosphere.types.Record
import org.apache.flink.api.common.operators.Union
import org.apache.flink.types.Record
object UnionOperator {
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......
/***********************************************************************************************************************
* Copyright (C) 2010-2013 by the Stratosphere project (http://stratosphere.eu)
* Copyright (C) 2010 - 2014 by the Apache Flink project (http://flink.incubator.apache.org)
*
* Licensed 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
......@@ -13,8 +13,8 @@
package org.apache.flink.api.scala
import eu.stratosphere.api.java.record.operators.{CollectionDataSource => JCollectionDataSource}
import eu.stratosphere.types.{DoubleValue, Record}
import org.apache.flink.api.java.record.operators.{CollectionDataSource => JCollectionDataSource}
import org.apache.flink.types.{DoubleValue, Record}
import org.scalatest.junit.AssertionsForJUnit
import org.junit.Assert._
import org.junit.Test
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册