batch-processing

Running a background Java program in Tomcat [duplicate]

穿精又带淫゛_ 提交于 2019-11-26 11:55:54
问题 This question already has answers here : How to run a background task in a servlet based web application? (5 answers) Closed last year . Can anyone advise here? I have a situation where users will submit data mining requests interactively via a Java JSP and servlet to an application of mine which will dynamically work out association rules on data and more. As such a job may take a while, I\'m thinking of some sort of process on the server to run such a request in the background so it dosen\

Find out if file is older than 4 hours in Batch file

放肆的年华 提交于 2019-11-26 11:25:43
Quite simply, how would I find out if a specific file in a folder is older than X hours? The file name and location will always be the same. Thanks Mofi On comparing file times with batch code following must be taken into account: Date and time format settings File system of storage media Time zone, daylight saving time Automatic adjustment for daylight saving time Version of Windows 1. Date and time format settings There are the environment variables DATE and TIME which on access (and not on start of batch execution) return current date and time in a format depending on Windows Region and

How to implement batch fetching with Fluent NHibernate when working with Oracle?

Deadly 提交于 2019-11-26 10:05:05
问题 I\'ve tried using Future feature with Oracle but NHibernate does not support it. I\'ve read some about Batch Fetching feature: http://docs.huihoo.com/hibernate/nhibernate-reference-1.2.0/performance.html How could I use it with Fluent NHibernate? how should it be configured? 回答1: To give you the answer how to use batching with fluent: 1) on the colleciton HasMany<MyEntity>(x => x.Entities) .BatchSize(100); 2) on a class level public MyEntityMap() { Id(x => x.... ... BatchSize(100); This

Java 8 Stream with batch processing

亡梦爱人 提交于 2019-11-26 09:19:09
问题 I have a large file that contains a list of items. I would like to create a batch of items, make an HTTP request with this batch (all of the items are needed as parameters in the HTTP request). I can do it very easily with a for loop, but as Java 8 lover, I want to try writing this with Java 8\'s Stream framework (and reap the benefits of lazy processing). Example: List<String> batch = new ArrayList<>(BATCH_SIZE); for (int i = 0; i < data.size(); i++) { batch.add(data.get(i)); if (batch.size(

Batching DB commands in Entity Framework 4.0

半世苍凉 提交于 2019-11-26 09:12:08
问题 My current project requires everyday synchronization with external system. The synchronization is based on complex import file structure which is parsed and processed with extensive business logic. Due to the business logic we decided to make this in .NET code and reuse existing BL components instead of writting the same logic in stored procedures or integration services. The BL layer sits on top of EF 4.0 data access layer. Current implementation process the import batch, fills all changes

Batch update/delete EF5

半世苍凉 提交于 2019-11-26 02:56:43
问题 What is the best way to deal with batch updates using (Entity Framework) EF5? I have 2 particular cases I\'m interested in: Updating a field (e.g. UpdateDate) for a list (List) of between 100 and 100.000 Id\'s, which the primary key. Calling each update separately seem to be to much overhead and takes a long time. Inserting many, also between the 100 and 100.000, of the same objects (e.g. Users) in a single go. Any good advice? 回答1: There are two open source projects allowing this:

Find out if file is older than 4 hours in Batch file

无人久伴 提交于 2019-11-26 02:15:41
问题 Quite simply, how would I find out if a specific file in a folder is older than X hours? The file name and location will always be the same. Thanks 回答1: On comparing file times with batch code following must be taken into account: Date and time format settings File system of storage media Time zone, daylight saving time Automatic adjustment for daylight saving time Version of Windows 1. Date and time format settings There are the environment variables DATE and TIME which on access (and not on

How do you convert an entire directory with ffmpeg?

风格不统一 提交于 2019-11-26 00:45:48
问题 How do you convert an entire directory/folder with ffmpeg via command line or with a batch script? 回答1: Previous answer will only create 1 output file called out.mov. To make a separate output file for each old movie, try this. for i in *.avi; do name=`echo "$i" | cut -d'.' -f1` echo "$name" ffmpeg -i "$i" "${name}.mov" done 回答2: For Linux and macOS this can be done in one line, using parameter expansion to change the filename extension of the output file: for i in *.avi; do ffmpeg -i "$i" "$