Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring boot 如何使用部署在pcf中的spring integration app优化处理存储在S3 bucket中的大量文件?_Spring Boot_Amazon S3_Spring Integration_Pcf - Fatal编程技术网

Spring boot 如何使用部署在pcf中的spring integration app优化处理存储在S3 bucket中的大量文件?

Spring boot 如何使用部署在pcf中的spring integration app优化处理存储在S3 bucket中的大量文件?,spring-boot,amazon-s3,spring-integration,pcf,Spring Boot,Amazon S3,Spring Integration,Pcf,我们有一个应用程序,它是使用经典的SpringMVC(4.x)和SpringIntegrationFramework开发的,部署在weblogic中(我们没有其他选项),可以在nfs装载中轮询文件并对其进行处理 现在我们被要求离开weblogic,使用PCF作为平台。我们现在遇到的问题是PCF并没有配置为使用卷服务,所以我们必须从S3之类的存储中轮询文件并对其进行处理 由于pcf应用程序具有最大2gb磁盘空间和2gb内存(组织限制)限制,在不下载的情况下处理存储在S3中的这些文件的最佳方式是什么

我们有一个应用程序,它是使用经典的SpringMVC(4.x)和SpringIntegrationFramework开发的,部署在weblogic中(我们没有其他选项),可以在nfs装载中轮询文件并对其进行处理

现在我们被要求离开weblogic,使用PCF作为平台。我们现在遇到的问题是PCF并没有配置为使用卷服务,所以我们必须从S3之类的存储中轮询文件并对其进行处理

由于pcf应用程序具有最大2gb磁盘空间和2gb内存(组织限制)限制,在不下载的情况下处理存储在S3中的这些文件的最佳方式是什么?如果我们必须下载,我们如何对其进行优化


注意:作为处理这些文件的一部分,我们必须提取一些文件并将其重新上传到S3,有些必须拒绝它。

< P>避免本地复制,考虑使用流入站通道适配器:

@Bean
@InboundChannelAdapter(value=“s3Channel”,poller=@poller(fixedDelay=“100”))
public MessageSource s3InboundStreamingMessageSource(){
S3StreamingMessageSource messageSource=新的S3StreamingMessageSource(模板());
messageSource.setRemoteDirectory(S3_BUCKET);
messageSource.setFilter(新的S3PersistentAcceptOnceFileListFilter(新的SimpleMetadataStore()),
"流媒体"),;
返回消息源;
}
请参阅主要Spring集成文档中有关流式通道适配器逻辑的更多信息:

@Bean
@InboundChannelAdapter(value = "s3Channel", poller = @Poller(fixedDelay = "100"))
public MessageSource<InputStream> s3InboundStreamingMessageSource() {    
    S3StreamingMessageSource messageSource = new S3StreamingMessageSource(template());
    messageSource.setRemoteDirectory(S3_BUCKET);
    messageSource.setFilter(new S3PersistentAcceptOnceFileListFilter(new SimpleMetadataStore(),
                               "streaming"));       
    return messageSource;
}