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

Re: What is the right way to add classpath?

Hi,Yun Tang

   Thanks for help. The first option makes the package process heavy, the second will make a change to flink?? lib folder. And the -yt cannot help also, because I need these dependencies before it?? submitted on yarn, and I did use -yt to submit my job and failed.

  Best, Jiayi Liao

 Original Message 
Sender: Yun Tang<myasuka@xxxxxxxx>
Recipient: bupt_ljy<bupt_ljy@xxxxxxx>; user<user@xxxxxxxxxxxxxxxx>
Date: Wednesday, Sep 12, 2018??7:53
Subject: 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?? 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