My Photo
Name:
Location: Bloomington, Indiana, United States

Tuesday, May 04, 2010

Amazon Elastic Map Reduce: API call to find and terminate job flows without Amazon Console

Recently one of the interns in the lab asked me how can he kill the running job flows in Amazon Elastic Map Reduce so he will not run up a big bill. This is straight forward to do in Amazon Management Console, but in this case the student didn't have the username/password to the amazon account because he was using a community account (although he had access to the accesskeys). Another application would be to write a cron job that checks the left over Job Flows and their EC2 instances every night so being able to do this programmatically helps.

Terminating a Job flow is straight forward using the client API that Amazon has provided and a sample can be found here. Now the issue is how to find the running Job Flows using API calls. The DescribeJobFlow API may give the impression that one need to give the Job Flow id to begin with to query the Job Flow Status, but my testing shows that if we don't specify any Job Flow ids in the request as shown in the sample here, it would return the Job Flows with the most recent activities. If there are Job Flows that are running those would have most recent activities. So once you have these two its easy to write a piece of code that would glue these two together to kill all the existing Job Flows.

Thats it!!!

Labels: , , , , , ,

39 Comments:

Blogger bạn park said...

Foraging for food is generally conducted on a daily basis, from dawn to dusk when there are chicks to feed. Overnight trips are sometimes made, especially as the chicks grow older;[27] a 2008 study that used surgically implanted data loggers to track the movement of the birds showed the foraging trips become longer once the chick-rearing period is over.[38] Birds venture out for 10–20 days during incubation and before the moult.[27] Macaroni penguins are known to be the largest single consumer of marine resources among all of the seabirds, with an estimated take of 9.2 million tonnes of krill a year.[39] Outside the breeding season, Macaroni Penguins tend to dive deeper, longer, and more efficiently during their winter migration than during the summer breeding season. Year round, foraging dives usually occur during daylight hours, but winter dives are more constrained by daylight due to the shorter days.[40]white gold charmsNew York hair extensions salons

10:54 AM  
Blogger bạn park said...

The common name was recorded from the early 19th century in the Falkland Islands. English sailors apparently named the species for its conspicuous yellow crest;[5] Maccaronism was a term for a particular style in 18th-century England marked by flamboyant or excessive ornamentation. A person who adopted this fashion was labelled a maccaroni or macaroni, as in the song "'Yankee Doodle".[6]RYA Level 2man clothes

10:09 PM  
Blogger D.A.P said...

esswell KA, Wiedenmann J, Mangel M, K. A.; Wiedenmann, J.; Mangel, M. (2008). "Can macaroni penguins keep up with climate- and fishing-induced changes in krill?". Polar Biology 31 (5): 641–49. fire damageOpen Sesame

5:19 AM  
Blogger D.A.P said...

fire damageOpen Sesame esswell KA, Wiedenmann J, Mangel M, K. A.; Wiedenmann, J.; Mangel, M. (2008). "Can macaroni penguins keep up with climate- and fishing-induced changes in krill?". Polar Biology 31 (5): 641–49.

5:19 AM  
Blogger bạn park said...

The major photo storage services (e.g. Kodak's oFoto and Shutterfly and HP's SnapFish) have included the ability to produce picture books and calendars. However, they focus on monetizing digital photography. Blurb and Lulu bring this paradigm to a larger volume of creative work (primarily text, as written in personal blogs), and include the capability to embed photographs, and other media. QooP and Peecho take on the role of an infrastructure service providerChildcare Franchiseposicionar en google

2:35 AM  
Blogger bạn park said...

POD allows a publisher to exploit a short "sales window" with minimized risk exposure by "guessing low" - using cheaper conventional printing to produce enough copies to satisfy a more pessimistic forecast of the title's sales, and then relying on POD to make up the differenceLangley computer serviceaddicting games

2:41 AM  
Blogger Administrator! said...

All very fine, Mr. Holmes," said he. "But there is one little flaw in your splendid theory. I was myself in my room, and I never left it during the day."

"I am aware of that, Professor Coram."

"And you mean to say that I could lie upon that bed and not be aware that a woman had entered my room?"

"I never said so. You WERE aware of it. You spoke with her. You recognized her. You aided her to escape."
offene jobsRoofers Salem Oregon

6:00 AM  
Blogger bạn park said...

The finished syrup has a density of 66° or greater on the Brix scale (a hydrometric scale used to measure sugar solutions).[19] The syrup is then filtered to remove sugar sandwind power generationarticle writing service

11:24 PM  
Blogger bạn park said...

Some producers also tap in autumn, though this practice is less common than spring tapping. Maples can continue to be tapped for sap until they are over 100 years old.Salt Lake City Car Accident Attorneysemail leads

4:28 AM  
Blogger bạn park said...

Manitoba maple syrup has a slightly different flavour from sugar-maple syrup, because it contains less sugar and the sap flows more slowly. inkjet ink cartridgetherapist for you

4:38 AM  
Blogger depchaick said...

The Advent Christian Church officially formed in 1861, and grew rapidly at first. It declined a little over the 20th century. The Advent Christians publish the four magazines The Advent Christian Witness,reverse mortgages how they workDebt Settlement Company

9:36 PM  
Blogger depchaick said...

The Seventh-day Adventist Church officially formed in 1863. It believes in the sanctity of the seventh-day Sabbath as a holy day for worship. It published the Adventist Review and Sabbath Herald. sports welcome matsErotic Lingerie

9:39 PM  
Blogger depchaick said...

A Congregationalist since age 19, George Storrs was received into the Methodist Episcopal Church and commenced preaching at age 28ac repair nycPenisringe

10:02 PM  
Blogger Games4And said...

In England, many woods were managed as coppices, which were cut and regrew cyclically

herbal potpourrioutdoor bean bag

7:24 AM  
Blogger Games4And said...

In addition, a millwright may also perform all duties of general laborer, pipefitter, carpenter, and electrician. A millwright may also perform the duties of a welder, such as arc welding, mig welding, tig welding and oxyacetylene cutting.


Australian Made and Ownedcharm bracelets

8:36 AM  
Blogger Administrator! said...

The Kyoto Protocol is a dated document, it is actually considered by many as an impediment to the move forward but there was good will demonstrated in Durban, the agreement that we ended up with provides the basis for an agreement by 2015."

He said that though the text of the Durban agreement "provides a loophole for China and India", it represents "the way forward".
ventiladordepression help for you

8:54 AM  
Blogger Topol M said...

Although the bridge used to carry a steady flow of tannery and sawmill traffic, the clearcutting of the surrounding forests meant the end of those industries by the early 20th century.






solar heatingcomputer repair maryland

8:57 AM  
Blogger 1 said...

Electronic Cigarettesfloor home plansThe probationer may be ordered as well to refrain from contact with the victims (such as a former partner in a domestic violence case)

7:32 AM  
Blogger D.A.P said...

iphone 3g accessoriesWireless Karaoke Microphone
to track the movement of the birds showed the foraging trips become longer once the chick-rearing period is over.[38] Birds venture out for 10–20 days during incubation and before the

9:44 AM  
Blogger Enricque said...

"Jana Gana Mana"[α] is the national anthem of India. Written in highly Sanskritized (Tatsama) Bengali, it is the first of five stanzas of a Brahmo hymn composed and scored by Nobel laureate Rabindranath Tagore.salles de réceptionairline travel

7:51 AM  
Blogger Topol M said...

On the Banks of the Wabash, Far Away" was among the best-selling songs of the 19th century in terms of sheet music sold. Written and composed by American songwriter Paul Dresser, it was published by the Tin Pan Alley firm of Howley, Haviland & Co. in October 1897.






screen doors retractablebdsm

5:37 PM  
Blogger ChjpHunter said...

The 2006 Gator Bowl was a college football bowl game between the Louisville Cardinals and the Virginia Tech Hokies in Jacksonville, Florida on January 2, 2006. Virginia Tech was selected as a participant in the 2006 Gator Bowl following a 10–2 regular season; a loss to Florida State in the inaugural ACC Championship Game gave Tech a position in the Gator Bowl instead of the more prestigious Orange Bowl game. Facing the 12th-ranked Hokies were the 15th-ranked Cardinals, who finished 9–2 during the regular season of their first year in the Big East Conference. Louisville led for much of the game, beginning with an 11-yard touchdown pass in the first quarter by backup quarterback Hunter Cantwell






Alys Beach real Estatescavenger hunt

10:31 PM  
Blogger Topol M said...

The ways in which human beings reason through argument are the subject of inquiries in the field of logic.





advertising on holdmobile bagno

3:47 AM  
Blogger Topol M said...

It advises the Sovereign on the issuing of royal charters, which are used to grant special status to incorporated bodies, and city or borough status to local authorities.





Drug Addiction Treatmentwholesale dresses

10:11 AM  
Blogger MANHHIEU said...

QooP and Peecho take on the role of an infrastructure service provider
ล่องเรือToyota Prius Steering Rack

3:26 AM  
Blogger MCA said...

Ningbo Yunhuan Electronics Group - A leading manufacturer with ISO9001:2000 certified of international standard power cords and cord sets with UL, CSA, VDE, BSI, PSE, KET, SEV, SAA, IMQ, IRAM, KET, GOST, and UCIEE certificates. Products are RoHS compliant. Weather balloon, meteorological balloon also available from 10g to 2000g.

Israel SII approval power supply cordstext for free

6:22 AM  
Blogger Topol M said...

The S-300 missiles are sealed rounds and require no maintenance over their lifetime. An evolved version of the S-300 system is the S-400 (NATO reporting name SA-21), entering limited service in 2004.




Off Roading Car Insurance Quoteshome floor plans

6:38 AM  
Blogger Topol M said...

Press Gang is a British children's television comedy-drama consisting of forty-three episodes across five series that were broadcast from 1989 to 1993. It was produced by Richmond Film & Television for Central, and screened on the ITV network in its regular weekday afternoon children's strand, CITV, typically in a 4:45 pm slot (days varied over the course of the run).


Main Line LiposuctionIs Phen375 a scam?

2:08 AM  
Blogger kratos____s said...

designer clothingtest taking strategiess, from dawn to dusk when there are chicks to feed. Overnight trips are sometimes made, especially as the chicks grow older;[27] a 2008 study that used surgically implanted data loggers to track the movement of the birds showed the foraging trips become longer once the chick-rearing period is over.

11:52 AM  
Blogger Tài Nguyễn Đức said...

The original copper–nickel five-cent piece, the Shield nickel, had longstanding production problems, and in the early 1880s, the United States Mint was looking to replace it



BTShome decor ideas

7:48 PM  
Blogger 18 said...

which pre-dates the Royal Bank of Scotland by 32 years. The Bank of Scotland was effective in raising funds for the Jacobite Rebellion and as a result, The Royal Bank of Scotland was established to provide a bank with strong Hanoverian and Whig ties.billig tannreguleringeCommerce Web Designers

3:07 AM  
Blogger Enricque said...

Sherlock Holmes (play /ˈʃɜrlɒk ˈhoʊmz/)[1] is a fictional detective created by Scottish author and physician Sir Arthur Conan Doyle. The fantastic London-based "consulting detective", Holmes is famous for his astute logical reasoning, his ability to take on almost any disguise, and his use of forensic science skills to solve difficult cases.r4guards security services

5:52 AM  
Blogger Topol M said...

He was also briefly in the household of Henry's son Henry the Young King. Barre served the elder Henry as a diplomat, and was involved in a minor way with the king's quarrel with Thomas Becket, which earned Barre a condemnation from Becket.







min tannlegeHome Warranty Company

8:42 AM  
Blogger kysirong said...

fine jewelryvestidos para madrinasForaging for food is generally conducted on a daily basis, from dawn to dusk when there are chicks to feed. Overnight trips are sometimes made, especially as the chicks grow older;[27] a 2008 study that used surgically implanted data loggers to track the movement of the birds showed the foraging trips become longer once the chick-rearing period is over.[38] Birds venture out for 10–20 days during incubation and before the

3:55 AM  
Blogger JACKLEE said...

The Red Badge of Courage is a war novel by American author Stephen Crane. Taking place during the American Civil War, the story is about a young private of the Union Army, Henry Fleming, who flees from the field of battleIT Support UKload balancing

7:25 AM  
Blogger BEAN said...

In the 17th century, the word pink or pinke was also used to describe a yellowish pigment, which was mixed with blue colors to yield greenish colors. Thomas Jenner's A Book of Drawing, Limning, Washing (1652) categorizes "Pink & blew bice" amongst the greens online counselingsnorfietsverzekering

12:36 PM  
Blogger yeu_yeu said...

Overnight trips are sometimes made, especially as the chicks grow older;[27] a 2008 study that used surgically implanted data loggers to track the movement of the birds showed the foraging trips become longer once the chick-rearing period is over.[38] Birds venture out for 10–20 days during incubation and before the moult.[27] Macaroni penguins are known to be the largest single consumer of marine resources among all of the seabirds, with an estimated take of 9.2 million tonnes of krill a year.[39] Outside the breeding season, Macaroni Penguins tend to dive deeper, longer, and more efficiently during their winter migration than during the summer breeding season.project management resumewholesale dresses

4:47 AM  
Blogger den_den said...

This comment has been removed by the author.

9:53 AM  
Blogger aloalo said...

Best credit card applicationsRechtsanwalt KreuztalGeorge initially specialised in orchids, but his focus gradually moved to the Proteaceae genera Banksia and Dryandra. He contributed the text to Celia Rosser's three volume The Banksias, published between 1981 and 2001, which contains Rosser's paintings of every Banksia species. In 1981 Nuytsia published his landmark monograph "The genus Banksia L.f. (Proteaceae)", the first systematic treatment of the taxonomy of Banksia since George Bentham's Flora Australiensis appeared in the 1870s. Three years later he published the popular The Banksia Book, and the following year he published An Introduction to the Proteaceae of Western Australia. In 1999, his taxonomy of the Banksia and Dryandra genera was published as part of the Flora of Australia series of monographs.

12:23 AM  

Post a Comment

<< Home