Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-1378

could not find implicit value for evidence parameter of type TypeInformation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.7.0-incubating
    • 0.8.0, 0.9
    • API / Scala
    • None

    Description

      This is an example of one of many cases that I cannot get to compile with the scala API. I have tried using T : TypeInformation and : ClassTag but still cannot get it to work.

      //libraryDependencies += "org.apache.flink" % "flink-scala" % "0.7.0-incubating"
      //
      //libraryDependencies += "org.apache.flink" % "flink-clients" % "0.7.0-incubating"

      import org.apache.flink.api.scala._

      import scala.util.

      {Success, Try}

      object Main extends App {

      val env = ExecutionEnvironment.getExecutionEnvironment
      val data: DataSet[Double] = env.fromElements(1.0, 2.0, 3.0, 4.0)

      def f[T](data: DataSet[T]): DataSet[(T, Try[Seq[Double]])] = {

      data.mapPartition((iterator: Iterator[T]) =>

      { val first = iterator.next() val second = iterator.next() Iterator((first, Success(Seq(2.0, 3.0))), (second, Success(Seq(3.0, 1.0)))) }

      )
      }

      val g = f(data)

      g.print()

      env.execute("Flink Test")

      }

      Attachments

        Activity

          People

            aljoscha Aljoscha Krettek
            jsand John Sandiford
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: