private void dealFlinkLibJar(String flinkJarPath, YarnClusterDescriptor clusterDescriptor, List<File> shipFiles) throws MalformedURLException {
        if (StringUtils.isEmpty(flinkJarPath) || !new File(flinkJarPath).exists()) {
            throw new RuntimeException("path " + flinkJarPath + " is not exist");
        }
        File[] jars = new File(flinkJarPath).listFiles();

        if (jars == null || jars.length == 0) {
            throw new RuntimeException(flinkJarPath + " no file exist !");
        }

        for (File file : jars) {
            if (file.toURI().toURL().toString().contains("flink-dist")) {
                clusterDescriptor.setLocalJarPath(new Path(file.toURI().toURL().toString()));
            } else {
                shipFiles.add(file);
            }
        }
    }
Date: 2020/3/4
Company: www.dtstack.com
@author maqi
launcher/src/main/java/com/dtstack/flink/sql/launcher/executor/YarnJobClusterExecutor.java