博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
flink 获取上传的Jar源码
阅读量:6412 次
发布时间:2019-06-23

本文共 1824 字,大约阅读时间需要 6 分钟。

package org.apache.flink.runtime.webmonitor.handlers; /**  * Handles .jar file uploads.  */ public class JarUploadHandler extends       AbstractRestHandler
{
package org.apache.flink.runtime.rest; public abstract class AbstractHandler
extends RedirectHandler
{
protected final Logger log = LoggerFactory.getLogger(getClass()); protected static final ObjectMapper MAPPER = RestMapperUtils.getStrictObjectMapper(); private final UntypedResponseMessageHeaders
untypedResponseMessageHeaders; protected AbstractHandler( @Nonnull CompletableFuture
localAddressFuture, @Nonnull GatewayRetriever
leaderRetriever, @Nonnull Time timeout, @Nonnull Map
responseHeaders, @Nonnull UntypedResponseMessageHeaders
untypedResponseMessageHeaders) { super(localAddressFuture, leaderRetriever, timeout, responseHeaders); this.untypedResponseMessageHeaders = Preconditions.checkNotNull(untypedResponseMessageHeaders); } @Override protected void respondAsLeader(ChannelHandlerContext ctx, RoutedRequest routedRequest, T gateway) { HttpRequest httpRequest = routedRequest.getRequest(); if (log.isTraceEnabled()) { log.trace("Received request " + httpRequest.uri() + '.'); } FileUploads uploadedFiles = null; try { if (!(httpRequest instanceof FullHttpRequest)) { // The RestServerEndpoint defines a HttpObjectAggregator in the pipeline that always returns // FullHttpRequests. log.error("Implementation error: Received a request that wasn't a FullHttpRequest."); throw new RestHandlerException("Bad request received.", HttpResponseStatus.BAD_REQUEST); } final ByteBuf msgContent = ((FullHttpRequest) httpRequest).content(); uploadedFiles = FileUploadHandler.getMultipartFileUploads(ctx);

转载地址:http://midra.baihongyu.com/

你可能感兴趣的文章
Low Level Reader Protocol (LLRP) 简介
查看>>
[Micropython]TPYBoard v10x NRF24L01无线通讯模块使用教程
查看>>
mysql中show processlist过滤和杀死线程
查看>>
最新Sublime Text 2 激活 汉化
查看>>
基础数据类型之字典
查看>>
第七次作业
查看>>
Oracle中NVARCHAR2与VARCHAR2的区别
查看>>
php debug
查看>>
Ubuntu构建LVS+Keepalived高可用负载均衡集群【生产环境部署】
查看>>
lvm实现快速备份文件及数据库,lvm快照原理
查看>>
设计模式之Factory Method(工厂方法)
查看>>
10K入职linux运维岗位小伙伴感谢信及面试经历分享
查看>>
zookeeper入门之Curator的使用之几种监听器的使用
查看>>
[转]Reporting Service部署之访问权限
查看>>
innerxml and outerxml
查看>>
validform校验框架不显示错误提示
查看>>
flink 获取上传的Jar源码
查看>>
Spring Data JPA Batch Insertion
查看>>
UEditor自动调节宽度
查看>>
JAVA做验证码图片(转自CSDN)
查看>>