[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is the right way to add classpath?

Hi Jiayi

As far as I know, there exist three ways:
  1. Build the fat-application jar with dependencies using maven-shade-plugin or maven-assembly-plugin.
  2. Copy the dependency jars to local ${FLINK_HOME}/lib  folder.
  3. Submit the job with -yt,--yarnship <args> command, please refer to
Yun Tang

From: bupt_ljy <bupt_ljy@xxxxxxx>
Sent: Wednesday, September 12, 2018 16:34
To: user
Subject: What is the right way to add classpath?


  My program needs some dependencies before it’s submitted to yarn. Like:


  stream.filter(new FilterService()).print()



  I use external dependency in FilterService, and the program reports NoClassDefFoundError at     


  Now my solution is changing the bin/flink and add my classpath into it.

  Any better ideas?


  Best, Jiayi Liao