batch-processing

Is there anyway to avoid processing same file twice with Spring Batch?

只谈情不闲聊 提交于 2020-04-30 06:26:55
问题 I am working on the 3 steps Spring Batch project. Firstly, it downloads needed text files from ftp to local, then process it, and finally delete files in the local directory every 10 minutes. And every 10 minutes there are new files loaded in the FTP. What if there emerge some problem in the FTP and it does not load new files? Then Spring Batch project download same file and process it again. So my question is that how can avoid Spring Batch to process same file twice? Edit: I have used

Pandas dataframe : Operation per batch of rows

不羁的心 提交于 2020-04-11 12:17:29
问题 I have a pandas DataFrame df for which I want to compute some statistics per batch of rows. For example, let's say that I have a batch_size = 200000 . For each batch of batch_size rows I would like to have the number of unique values for a column ID of my DataFrame. How can I do something like that ? Here is an example of what I want : print(df) >> +-------+ | ID| +-------+ | 1| | 1| | 2| | 2| | 2| | 3| | 3| | 3| | 3| +-------+ batch_size = 3 my_new_function(df,batch_size) >> For batch 1 (0

Renaming pdf files with a batch file

假如想象 提交于 2020-03-05 06:13:50
问题 I need to either write a batch file or a vbscript that will rename files. I need to keep everything in the file name up to the second "." but delete what comes after the second dot. This is a sample of what the file names look like: nnnnnnnnnnnnnnnn.xxxxxxxx.dddddddddd.pdf n = 16 numbers 0-9 x = date in this format ex:02232008 d = 10 numbers 0-9, this is the part of the file name that I want to delete . I need the d's from the sample above to be deleted but keep the rest of the file name the

Is there standard way of making multiple API calls combined into one HTTP request?

橙三吉。 提交于 2020-02-28 12:59:39
问题 While designing rest API's I time to time have challenge to deal with batch operations (e.g. delete or update many entities at once) to reduce overhead of many tcp client connections. And in particular situation problem usually solves by adding custom api method for specific operation (e.g. POST /files/batchDelete which accepts ids at request body) which doesn't look pretty from point of view of rest api design principles but do the job. But for me general solution for the problem still

MYSQL: Batch insert/update statements in single query

前提是你 提交于 2020-02-05 02:32:47
问题 I need to do batch MYSQL insert/updates. I got batch insert statement to work, but when the insert comes as multiple one liners it does not.. Similarly I have not been able to generate a batch update. Please see examples below. Batch insert statement works $sql = "INSERT INTO `test` (`somefield`) VALUES ('test', 'test');"; db::statement($sql); Multiple separate insert statements NOT working $sql = "INSERT INTO `test` (`somefield`) VALUES ('test'); INSERT INTO `test` (`somefield`) VALUES (

Difference between xcopy and robocopy

ε祈祈猫儿з 提交于 2020-01-30 14:12:09
问题 I'm kind of new to batch scripting. As a newbie I find both both of them useful while scripting What are the key differences between xcopy and robocopy? 回答1: Robocopy replaces XCopy in the newer versions of windows Uses Mirroring, XCopy does not Has a /RH option to allow a set time for the copy to run Has a /MON:n option to check differences in files Copies over more file attributes than XCopy Yes i agree with Mark Setchell, They are both crap. (brought to you by Microsoft) UPDATE: XCopy

Powershell to Create a zip (or 7z) of each file in a folder then delete original file

ぃ、小莉子 提交于 2020-01-25 02:30:47
问题 I have a folder with a Ton of iso images. I've found that a lot of the images have dummy data in them to reach the size of the original DVD. I can save an enormous amount of space by zipping them up. I tried creating a batch file but it failed to work properly. So, I basically want it to create a .7z for each file in a folder, then delete the original file. Here's what I got. It zips the files but it fails on removable of the files afterwards. Can't figure out why: function zipFiles() { dir *

Powershell to Create a zip (or 7z) of each file in a folder then delete original file

眉间皱痕 提交于 2020-01-25 02:30:12
问题 I have a folder with a Ton of iso images. I've found that a lot of the images have dummy data in them to reach the size of the original DVD. I can save an enormous amount of space by zipping them up. I tried creating a batch file but it failed to work properly. So, I basically want it to create a .7z for each file in a folder, then delete the original file. Here's what I got. It zips the files but it fails on removable of the files afterwards. Can't figure out why: function zipFiles() { dir *

Facing error in Batch Processing mule esb

ぃ、小莉子 提交于 2020-01-24 12:53:31
问题 I am facing problem in batch processing mule esb. If I set any payload in process record face and try to get that payload in oncomplete face then not getting that payload. same problem with variable and property. If I set any property in process record phase and try to get in on complete phase then always get null value. how to get those value in oncomplete phase? below is flow.. <batch:job name="TestBatch" max-failed-records="-1"> <batch:input> <component class="com.test.RecordTest" doc:name

Batch convert DDS file to DDS without mipmaps

主宰稳场 提交于 2020-01-24 00:50:14
问题 I have a Mount & Blade: Warband mod called 1257 AD. The mod itself is great, but all the textures have to be resaved to remove mipmaps from dds files, to remove glitches on GNU/Linux. And of course, I could do this manually, but it will took a lot of time(over 2000 textures), and is there any way for gimp to just open and save the file without mipmaps. Also, last time I wanted to do this I used loop with Imagemagicks convert, but it kept mipmaps. So how do I do this kind of convert? 回答1: You