当前位置: 首页 > news >正文

山东济南疫情最新消息今天绍兴seo推广

山东济南疫情最新消息今天,绍兴seo推广,网页兼容性 网站开发,wordpress修改文件上传路径Flink on yarn 加载失败plugins失效问题解决 flink版本:1.13.6 1. 问题 flink 任务运行在yarn集群,plugins加载失效,导致通过扩展资源获取任务参数失效 2. 问题定位 yarn容器的jar包及插件信息,jar包是正常上传 源码定位 加载plugins入口,TaskMana…

Flink on yarn 加载失败plugins失效问题解决

flink版本:1.13.6

1. 问题

flink 任务运行在yarn集群,plugins加载失效,导致通过扩展资源获取任务参数失效

2. 问题定位

  1. yarn容器的jar包及插件信息,jar包是正常上传
    在这里插入图片描述

  2. 源码定位
    加载plugins入口,TaskManagerRunner.class
    PluginUtils.createPluginManagerFromRootFolder
    在这里插入图片描述
    源码加载扩展资源参数入口TaskManagerRunner.class
    ExternalResourceUtils.createStaticExternalResourceInfoProviderFromConfig
    在这里插入图片描述
    日志信息
    在这里插入图片描述
    定位PluginConfig源码
    在这里插入图片描述

3. 方案

重写覆盖集群的PluginConfig.java,优先从configurtaion获取

/** Licensed to the Apache Software Foundation (ASF) under one* or more contributor license agreements.  See the NOTICE file* distributed with this work for additional information* regarding copyright ownership.  The ASF licenses this file* to you under the Apache License, Version 2.0 (the* "License"); you may not use this file except in compliance* with the License.  You may obtain a copy of the License at** http://www.apache.org/licenses/LICENSE-2.0** Unless required by applicable law or agreed to in writing, software* distributed under the License is distributed on an "AS IS" BASIS,* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.* See the License for the specific language governing permissions and* limitations under the License.*/package org.apache.flink.core.plugin;import com.alibaba.fastjson.JSON;
import org.apache.commons.lang3.StringUtils;
import org.apache.flink.configuration.*;import org.slf4j.Logger;
import org.slf4j.LoggerFactory;import java.io.File;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.Objects;
import java.util.Optional;/** Stores the configuration for plugins mechanism. */
@SuppressWarnings("OptionalUsedAsFieldOrParameterType")
public class PluginConfig {private static final Logger LOG = LoggerFactory.getLogger(PluginConfig.class);private static final String PUPU_FLINK_PLUGINS_DIR = "flink_plugins_dir";private final Optional<Path> pluginsPath;private final String[] alwaysParentFirstPatterns;private PluginConfig(Optional<Path> pluginsPath, String[] alwaysParentFirstPatterns) {pluginsPath.ifPresent(path -> LOG.info("pluginsPath: {}", path));LOG.info("alwaysParentFirstPatterns: {}", Arrays.stream(alwaysParentFirstPatterns).toArray());this.pluginsPath = pluginsPath;this.alwaysParentFirstPatterns = alwaysParentFirstPatterns;}public Optional<Path> getPluginsPath() {return pluginsPath;}public String[] getAlwaysParentFirstPatterns() {return alwaysParentFirstPatterns;}public static PluginConfig fromConfiguration(Configuration configuration) {return new PluginConfig(getPluginsDir(configuration).map(File::toPath),CoreOptions.getPluginParentFirstLoaderPatterns(configuration));}public static Optional<File> getPluginsDir(Configuration configuration) {String pluginsDir = configuration.get(ConfigOptions.key(PUPU_FLINK_PLUGINS_DIR).stringType().defaultValue(null));if (StringUtils.isBlank(pluginsDir)) {pluginsDir =System.getenv().getOrDefault(ConfigConstants.ENV_FLINK_PLUGINS_DIR,ConfigConstants.DEFAULT_FLINK_PLUGINS_DIRS);}File pluginsDirFile = new File(pluginsDir);if (!pluginsDirFile.isDirectory()) {LOG.warn("The plugins directory [{}] does not exist.", pluginsDirFile);return Optional.empty();}return Optional.of(pluginsDirFile);}}
http://www.yidumall.com/news/51945.html

相关文章:

  • 网站弹出广告的是怎么做的向日葵seo
  • 长春火车站电话人工服务热线广东seo外包服务
  • 做毕业设计一个网站的数据来源网络营销网站推广方法
  • b2c商城网站近期国际热点大事件
  • 个人主页html下载简述什么是seo及seo的作用
  • 论坛程序做导航网站广告资源对接平台
  • 重庆万州网站建设外链发布网站
  • 自己做网站咋做自建站平台
  • 微信网站怎么做下载附件企业网站营销的实现方式
  • 做网站更新维护工资高吗泉州seo排名扣费
  • 校园网站建设情况说明中央刚刚宣布大消息
  • 莘县网站建设seo前景
  • 用美国服务器做中国盗版网站怎么做互联网营销推广
  • 凡科网站 怎么开支付网站外包一般多少钱啊
  • 中心网站建设方法举例说明seo
  • 遵义网站建设公司新品推广计划与方案
  • 怎样建官方网站今日山东新闻头条
  • 做的最好的理财网站今日热点新闻事件摘抄2022
  • 最优做网站搜索引擎的工作原理是什么?
  • 钦州建设局网站百度指数是什么意思
  • 做网站开发中国十大搜索引擎排名最新
  • 北航做网站公司百度推广获客方法
  • 珠海手机网站建设推广公司深圳网络推广公司有哪些
  • 互联网推广培训专业百度seo排名优化
  • 喷码机营销型网站微信营销软件群发
  • 建设信用卡在网站挂失几步广州信息流推广公司排名
  • 大红门桥做网站福建seo搜索引擎优化
  • wordpress调用推荐文章代码榆林百度seo
  • 新手怎么做html5网站网站seo优化包括哪些方面
  • 本地企业网站建设服务手机百度搜索app