Home > Back-end >  Flink this getResourceAsStream can't read the configuration file
Flink this getResourceAsStream can't read the configuration file

Time:05-08

Web server now, flink version 1.4.0, normal:

The test server, flink version 1.7.2, can't read the configuration file:

Code:


Is getResource code, getResourceAsStream tried, can't read, returns null, and the configuration files in/opt/hadoopclient Flink/Flink/conf below,

Just this one line of code, no matter how to also can't read configuration files,
GetResource baidu search are bad, some said convert into getResourceAsStream, some said that under the resources, etc., are tried, now network can whatsoever, the test server, no, may be what wrong? Although flink involved, but it is still a Java problem, flink not run but Java - jar is ok, but the Java - it's jar jar found in the configuration file,

Now can't find the method to solve the problem completely,
Just this one line of code, where it will find the configuration file?

CodePudding user response:

Pulled out in real project, code of real project is now net line, not the test server,
  • Related