热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

org.apache.flink.runtime.jobgraph.JobGraph.getUserJars()方法的使用及代码示例

本文整理了Java中org.apache.flink.runtime.jobgraph.JobGraph.getUserJars()方法的一些代码示例,展示了

本文整理了Java中org.apache.flink.runtime.jobgraph.JobGraph.getUserJars()方法的一些代码示例,展示了JobGraph.getUserJars()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JobGraph.getUserJars()方法的具体详情如下:
包路径:org.apache.flink.runtime.jobgraph.JobGraph
类名称:JobGraph
方法名:getUserJars

JobGraph.getUserJars介绍

[英]Gets the list of assigned user jar paths.
[中]获取分配的用户jar路径的列表。

代码示例

代码示例来源:origin: apache/flink

for (Path jar : jobGraph.getUserJars()) {
jarFileNames.add(jar.getName());
filesToUpload.add(new FileUpload(Paths.get(jar.toUri()), RestConstants.CONTENT_TYPE_JAR));

代码示例来源:origin: apache/flink

for (org.apache.flink.core.fs.Path path : jobGraph.getUserJars()) {
userJarFiles.add(new File(path.toUri()));

代码示例来源:origin: org.apache.flink/flink-runtime_2.11

/**
* Extracts all files required for the execution from the given {@link JobGraph} and uploads them using the {@link BlobClient}
* from the given {@link Supplier}.
*
* @param jobGraph jobgraph requiring files
* @param clientSupplier supplier of blob client to upload files with
* @throws FlinkException if the upload fails
*/
public static void extractAndUploadJobGraphFiles(JobGraph jobGraph, SupplierWithException clientSupplier) throws FlinkException {
List userJars = jobGraph.getUserJars();
Collection> userArtifacts = jobGraph.getUserArtifacts().entrySet().stream()
.map(entry -> Tuple2.of(entry.getKey(), new Path(entry.getValue().filePath)))
.collect(Collectors.toList());
uploadJobGraphFiles(jobGraph, userJars, userArtifacts, clientSupplier);
}

代码示例来源:origin: org.apache.flink/flink-runtime

/**
* Extracts all files required for the execution from the given {@link JobGraph} and uploads them using the {@link BlobClient}
* from the given {@link Supplier}.
*
* @param jobGraph jobgraph requiring files
* @param clientSupplier supplier of blob client to upload files with
* @throws FlinkException if the upload fails
*/
public static void extractAndUploadJobGraphFiles(JobGraph jobGraph, SupplierWithException clientSupplier) throws FlinkException {
List userJars = jobGraph.getUserJars();
Collection> userArtifacts = jobGraph.getUserArtifacts().entrySet().stream()
.map(entry -> Tuple2.of(entry.getKey(), new Path(entry.getValue().filePath)))
.collect(Collectors.toList());
uploadJobGraphFiles(jobGraph, userJars, userArtifacts, clientSupplier);
}

代码示例来源:origin: com.alibaba.blink/flink-runtime

/**
* Extracts all files required for the execution from the given {@link JobGraph} and uploads them using the {@link BlobClient}
* from the given {@link Supplier}.
*
* @param jobGraph jobgraph requiring files
* @param clientSupplier supplier of blob client to upload files with
* @throws FlinkException if the upload fails
*/
public static void extractAndUploadJobGraphFiles(JobGraph jobGraph, SupplierWithException clientSupplier) throws FlinkException {
List userJars = jobGraph.getUserJars();
Collection> userArtifacts = jobGraph.getUserArtifacts().entrySet().stream()
.map(entry -> Tuple2.of(entry.getKey(), new Path(entry.getValue().filePath)))
.collect(Collectors.toList());
uploadJobGraphFiles(jobGraph, userJars, userArtifacts, clientSupplier);
}

代码示例来源:origin: com.alibaba.blink/flink-runtime

private CompletableFuture uploadJobGraphFiles(
DispatcherGateway gateway,
CompletableFuture jobGraphFuture,
Collection jarFiles,
Collection> artifacts,
Configuration configuration) {
CompletableFuture blobServerPortFuture = gateway.getBlobServerPort(timeout);
return jobGraphFuture.thenCombine(blobServerPortFuture, (JobGraph jobGraph, Integer blobServerPort) -> {
final InetSocketAddress address = new InetSocketAddress(gateway.getHostname(), blobServerPort);
try {
// Add users jars located in dfs
for (Path path : jobGraph.getUserJars()) {
if (path.getFileSystem().isDistributedFS()) {
jarFiles.add(path);
}
}
log.info("Uploading jarFiles {} and userArtifacts {} to blob server", jarFiles.toString(), artifacts.toString());
ClientUtils.uploadJobGraphFiles(jobGraph, jarFiles, artifacts, () -> new BlobClient(address, configuration));
} catch (IOException | FlinkException e) {
throw new CompletionException(new RestHandlerException(
"Could not upload job files.",
HttpResponseStatus.INTERNAL_SERVER_ERROR,
e));
}
return jobGraph;
});
}

代码示例来源:origin: org.apache.flink/flink-clients_2.11

for (Path jar : jobGraph.getUserJars()) {
jarFileNames.add(jar.getName());
filesToUpload.add(new FileUpload(Paths.get(jar.toUri()), RestConstants.CONTENT_TYPE_JAR));

代码示例来源:origin: org.apache.flink/flink-yarn

for (org.apache.flink.core.fs.Path path : jobGraph.getUserJars()) {
userJarFiles.add(new File(path.toUri()));

代码示例来源:origin: com.alibaba.blink/flink-clients

log.info("Uploading user-jars is disabled");
} else {
for (Path jar : jobGraph.getUserJars()) {
try {
if (!jar.getFileSystem().isDistributedFS()) {

代码示例来源:origin: org.apache.flink/flink-yarn_2.11

for (org.apache.flink.core.fs.Path path : jobGraph.getUserJars()) {
userJarFiles.add(new File(path.toUri()));

推荐阅读
  • XML介绍与使用的概述及标签规则
    本文介绍了XML的基本概念和用途,包括XML的可扩展性和标签的自定义特性。同时还详细解释了XML标签的规则,包括标签的尖括号和合法标识符的组成,标签必须成对出现的原则以及特殊标签的使用方法。通过本文的阅读,读者可以对XML的基本知识有一个全面的了解。 ... [详细]
  • Jboss的EJB部署描述符standardjaws.xml配置步骤详解
    本文详细介绍了Jboss的EJB部署描述符standardjaws.xml的配置步骤,包括映射CMP实体EJB、数据源连接池的获取以及数据库配置等内容。 ... [详细]
  • Spring源码解密之默认标签的解析方式分析
    本文分析了Spring源码解密中默认标签的解析方式。通过对命名空间的判断,区分默认命名空间和自定义命名空间,并采用不同的解析方式。其中,bean标签的解析最为复杂和重要。 ... [详细]
  • 自动轮播,反转播放的ViewPagerAdapter的使用方法和效果展示
    本文介绍了如何使用自动轮播、反转播放的ViewPagerAdapter,并展示了其效果。该ViewPagerAdapter支持无限循环、触摸暂停、切换缩放等功能。同时提供了使用GIF.gif的示例和github地址。通过LoopFragmentPagerAdapter类的getActualCount、getActualItem和getActualPagerTitle方法可以实现自定义的循环效果和标题展示。 ... [详细]
  • Java验证码——kaptcha的使用配置及样式
    本文介绍了如何使用kaptcha库来实现Java验证码的配置和样式设置,包括pom.xml的依赖配置和web.xml中servlet的配置。 ... [详细]
  • 标题: ... [详细]
  • 本文介绍了一个适用于PHP应用快速接入TRX和TRC20数字资产的开发包,该开发包支持使用自有Tron区块链节点的应用场景,也支持基于Tron官方公共API服务的轻量级部署场景。提供的功能包括生成地址、验证地址、查询余额、交易转账、查询最新区块和查询交易信息等。详细信息可参考tron-php的Github地址:https://github.com/Fenguoz/tron-php。 ... [详细]
  • JavaScript和HTML之间的交互是经由过程事宜完成的。事宜:文档或浏览器窗口中发作的一些特定的交互霎时。能够运用侦听器(或处置惩罚递次来预订事宜),以便事宜发作时实行相应的 ... [详细]
  • 本文讨论了在shiro java配置中加入Shiro listener后启动失败的问题。作者引入了一系列jar包,并在web.xml中配置了相关内容,但启动后却无法正常运行。文章提供了具体引入的jar包和web.xml的配置内容,并指出可能的错误原因。该问题可能与jar包版本不兼容、web.xml配置错误等有关。 ... [详细]
  • OpenMap教程4 – 图层概述
    本文介绍了OpenMap教程4中关于地图图层的内容,包括将ShapeLayer添加到MapBean中的方法,OpenMap支持的图层类型以及使用BufferedLayer创建图像的MapBean。此外,还介绍了Layer背景标志的作用和OMGraphicHandlerLayer的基础层类。 ... [详细]
  • 1.脚本功能1)自动替换jar包中的配置文件。2)自动备份老版本的Jar包3)自动判断是初次启动还是更新服务2.脚本准备进入ho ... [详细]
  • Jmeter对RabbitMQ压力测试
    篇首语:本文由编程笔记#小编为大家整理,主要介绍了Jmeter对RabbitMQ压力测试相关的知识,希望对你有一定的参考价值。Jm ... [详细]
  • struts2重点——ValueStack和OGNL
    一、值栈(ValueStack)1.实现类:OGNLValueStack2.对象栈:CompoundRoot( ... [详细]
  • 开发笔记:UEditor调用上传图片上传文件等模块
    1、引入ue相关文件,写好初始代码为了更好的封装整一个单独的插件,这里我们要做到示例化ue后隐藏网页中的编辑窗口,并移除焦点。 ... [详细]
  • UEditor可以如何直接复制word的图文内容到编辑器中
    这种方法是servlet,编写好在web.xml里配置servlet-class和servlet-mapping即可使用后台(服务端)j ... [详细]
author-avatar
生命在于创新_475
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有