You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Yun Gao <yu...@aliyun.com> on 2020/06/23 03:16:43 UTC
Re: TypeInformation not found
Hi yu,
Have you add "import org.apache.flink.api.scala._"? It seems should be ok if the import has been added in the program:
import org.apache.flink.api.scala._
import org.apache.flink.streaming.api.scala.StreamExecutionEnvironment
object Test {
def main(args: Array[String]): Unit = {
val env = StreamExecutionEnvironment.getExecutionEnvironment
val solutionInput = env.fromElements((1, "1"))
solutionInput.print()
env.execute()
}
}
Best,
Yun
------------------Original Mail ------------------
Sender:王宇 <yu...@gmail.com>
Send Date:Tue Jun 23 09:42:47 2020
Recipients:User <us...@flink.apache.org>
Subject:No Subject
Hi, all
some error occurred when I run flink in minicluster, flink-version:1.11、scala-version:2.12.0.
Error:(33, 41) could not find implicit value for evidence parameter of type org.apache.flink.api.common.typeinfo.TypeInformation[(Int, String)]
val solutionInput = env.fromElements((1, "1"))
Error:(33, 41) not enough arguments for method fromElements: (implicit evidence$14: scala.reflect.ClassTag[(Int, String)], implicit evidence$15: org.apache.flink.api.common.typeinfo.TypeInformation[(Int, String)])org.apache.flink.api.scala.DataSet[(Int, String)].
Unspecified value parameter evidence$15.
val solutionInput = env.fromElements((1, "1"))
Error:(34, 40) could not find implicit value for evidence parameter of type org.apache.flink.api.common.typeinfo.TypeInformation[(Int, String)]
val worksetInput = env.fromElements((2, "2"))
Error:(34, 40) not enough arguments for method fromElements: (implicit evidence$14: scala.reflect.ClassTag[(Int, String)], implicit evidence$15: org.apache.flink.api.common.typeinfo.TypeInformation[(Int, String)])org.apache.flink.api.scala.DataSet[(Int, String)].
Unspecified value parameter evidence$15.
val worksetInput = env.fromElements((2, "2"))
Error:(47, 41) could not find implicit value for evidence parameter of type org.apache.flink.api.common.typeinfo.TypeInformation[(Int, String)]
val solutionInput = env.fromElements((1, "1"))
have tried https://ci.apache.org/projects/flink/flink-docs-release-1.10/dev/types_serialization.html#type-information-in-the-scala-api
thanks
Re: Re: TypeInformation not found
Posted by Yun Gao <yu...@aliyun.com>.
Hi Yu,
I tried WordCount and the attached test, it should be able to run normally in my IDEA. Could you have a check of the imported project, or reimport the project if there are still problems ?
Best,
Yun
------------------Original Mail ------------------
Sender:Yu Wang <yu...@gmail.com>
Send Date:Tue Jun 23 15:51:27 2020
Recipients:Yun Gao <yu...@aliyun.com>
CC:User <us...@flink.apache.org>
Subject:Re: TypeInformation not found
thanks Yun Gao!have added "import org.apache.flink.api.scala._", I just to run wordcount in idea .
On Tue, Jun 23, 2020 at 11:16 AM Yun Gao <yu...@aliyun.com> wrote:
Hi yu,
Have you add "import org.apache.flink.api.scala._"? It seems should be ok if the import has been added in the program:
import org.apache.flink.api.scala._
import org.apache.flink.streaming.api.scala.StreamExecutionEnvironment
object Test {
def main(args: Array[String]): Unit = {
val env = StreamExecutionEnvironment.getExecutionEnvironment
val solutionInput = env.fromElements((1, "1"))
solutionInput.print()
env.execute()
}
}
Best,
Yun
------------------Original Mail ------------------
Sender:王宇 <yu...@gmail.com>
Send Date:Tue Jun 23 09:42:47 2020
Recipients:User <us...@flink.apache.org>
Subject:No Subject
Hi, all
some error occurred when I run flink in minicluster, flink-version:1.11、scala-version:2.12.0.
Error:(33, 41) could not find implicit value for evidence parameter of type org.apache.flink.api.common.typeinfo.TypeInformation[(Int, String)]
val solutionInput = env.fromElements((1, "1"))
Error:(33, 41) not enough arguments for method fromElements: (implicit evidence$14: scala.reflect.ClassTag[(Int, String)], implicit evidence$15: org.apache.flink.api.common.typeinfo.TypeInformation[(Int, String)])org.apache.flink.api.scala.DataSet[(Int, String)].
Unspecified value parameter evidence$15.
val solutionInput = env.fromElements((1, "1"))
Error:(34, 40) could not find implicit value for evidence parameter of type org.apache.flink.api.common.typeinfo.TypeInformation[(Int, String)]
val worksetInput = env.fromElements((2, "2"))
Error:(34, 40) not enough arguments for method fromElements: (implicit evidence$14: scala.reflect.ClassTag[(Int, String)], implicit evidence$15: org.apache.flink.api.common.typeinfo.TypeInformation[(Int, String)])org.apache.flink.api.scala.DataSet[(Int, String)].
Unspecified value parameter evidence$15.
val worksetInput = env.fromElements((2, "2"))
Error:(47, 41) could not find implicit value for evidence parameter of type org.apache.flink.api.common.typeinfo.TypeInformation[(Int, String)]
val solutionInput = env.fromElements((1, "1"))
have tried https://ci.apache.org/projects/flink/flink-docs-release-1.10/dev/types_serialization.html#type-information-in-the-scala-api
thanks
Re: TypeInformation not found
Posted by Yu Wang <yu...@gmail.com>.
thanks Yun Gao!
have added "import org.apache.flink.api.scala._", I just to run wordcount
in idea .
[image: image.png]
On Tue, Jun 23, 2020 at 11:16 AM Yun Gao <yu...@aliyun.com> wrote:
> Hi yu,
>
> Have you add "import org.apache.flink.api.scala._"? It seems should
> be ok if the import has been added in the program:
>
> import org.apache.flink.api.scala._
> import org.apache.flink.streaming.api.scala.StreamExecutionEnvironment
>
> object Test {
> def main(args: Array[String]): Unit = {
> val env = StreamExecutionEnvironment.getExecutionEnvironment
> val solutionInput = env.fromElements((1, "1"))
> solutionInput.print()
> env.execute()
> }
> }
>
>
>
> Best,
>
> Yun
>
>
>
>
>
> ------------------Original Mail ------------------
> *Sender:*王宇 <yu...@gmail.com>
> *Send Date:*Tue Jun 23 09:42:47 2020
> *Recipients:*User <us...@flink.apache.org>
> *Subject:*No Subject
>
>> Hi, all
>> some error occurred when I run flink in minicluster,
>> flink-version:1.11、scala-version:2.12.0.
>>
>> Error:(33, 41) could not find implicit value for evidence parameter of
>> type org.apache.flink.api.common.typeinfo.TypeInformation[(Int, String)]
>> val solutionInput = env.fromElements((1, "1"))
>> Error:(33, 41) not enough arguments for method fromElements: (implicit
>> evidence$14: scala.reflect.ClassTag[(Int, String)], implicit evidence$15:
>> org.apache.flink.api.common.typeinfo.TypeInformation[(Int,
>> String)])org.apache.flink.api.scala.DataSet[(Int, String)].
>> Unspecified value parameter evidence$15.
>> val solutionInput = env.fromElements((1, "1"))
>> Error:(34, 40) could not find implicit value for evidence parameter of
>> type org.apache.flink.api.common.typeinfo.TypeInformation[(Int, String)]
>> val worksetInput = env.fromElements((2, "2"))
>> Error:(34, 40) not enough arguments for method fromElements: (implicit
>> evidence$14: scala.reflect.ClassTag[(Int, String)], implicit evidence$15:
>> org.apache.flink.api.common.typeinfo.TypeInformation[(Int,
>> String)])org.apache.flink.api.scala.DataSet[(Int, String)].
>> Unspecified value parameter evidence$15.
>> val worksetInput = env.fromElements((2, "2"))
>> Error:(47, 41) could not find implicit value for evidence parameter of
>> type org.apache.flink.api.common.typeinfo.TypeInformation[(Int, String)]
>> val solutionInput = env.fromElements((1, "1"))
>>
>> have tried
>> https://ci.apache.org/projects/flink/flink-docs-release-1.10/dev/types_serialization.html#type-information-in-the-scala-api
>>
>>
>> thanks
>>
>