<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Hadoop, EC2, S3, and me</title>
	<atom:link href="http://www.protocolostomy.com/2008/03/20/hadoop-ec2-s3-and-me/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.protocolostomy.com/2008/03/20/hadoop-ec2-s3-and-me/</link>
	<description>Made with only the finest 1's and 0's</description>
	<lastBuildDate>Fri, 05 Mar 2010 20:08:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Etienne Posthumus</title>
		<link>http://www.protocolostomy.com/2008/03/20/hadoop-ec2-s3-and-me/comment-page-1/#comment-209</link>
		<dc:creator>Etienne Posthumus</dc:creator>
		<pubDate>Tue, 25 Mar 2008 09:26:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.protocolostomy.com/2008/03/20/hadoop-ec2-s3-and-me/#comment-209</guid>
		<description>Just another plug for boto, it is finely crafted. Especially if you want to start transferring large files that can&#039;t be .read() and sent via HTTP in a single go. It does much more graceful handling of things than the sample S3 code from AWS.

And it is worthwhile making your own images, you can have a bunch of favorite packages pre-installed and configured which can save you time.</description>
		<content:encoded><![CDATA[<p>Just another plug for boto, it is finely crafted. Especially if you want to start transferring large files that can&#8217;t be .read() and sent via HTTP in a single go. It does much more graceful handling of things than the sample S3 code from AWS.</p>
<p>And it is worthwhile making your own images, you can have a bunch of favorite packages pre-installed and configured which can save you time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: m0j0</title>
		<link>http://www.protocolostomy.com/2008/03/20/hadoop-ec2-s3-and-me/comment-page-1/#comment-206</link>
		<dc:creator>m0j0</dc:creator>
		<pubDate>Sat, 22 Mar 2008 19:44:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.protocolostomy.com/2008/03/20/hadoop-ec2-s3-and-me/#comment-206</guid>
		<description>Hi Arthur,

Yes, I&#039;ve seen boto, and played with it briefly. To be honest, while I guess I&#039;m a python geek, as a general rule I&#039;m really more interested in getting work done than supporting a particular language (or technology in general). I personally found boto to be really awkward to use.

I was introduced to it here --&gt; http://jimmyg.org/2007/09/01/amazon-ec2-for-people-who-prefer-debian-and-python-over-fedora-and-java/

That article is a fantastic introduction to ec2 in general, but in following the boto bits, I found it to be a rather incomplete tool if your goal is to quickly fire off administrative tasks. It can probably be a good foundation for putting together a suite of python-based tools to mimic Amazon&#039;s own ec2-* tools, but those seem to work well enough.

Regardless, I appreciate you bringing it up again, because I *had* actually missed somehow that it supports moving files from s3 to ec2. Thanks for the reminder!</description>
		<content:encoded><![CDATA[<p>Hi Arthur,</p>
<p>Yes, I&#8217;ve seen boto, and played with it briefly. To be honest, while I guess I&#8217;m a python geek, as a general rule I&#8217;m really more interested in getting work done than supporting a particular language (or technology in general). I personally found boto to be really awkward to use.</p>
<p>I was introduced to it here &#8211;> <a href="http://jimmyg.org/2007/09/01/amazon-ec2-for-people-who-prefer-debian-and-python-over-fedora-and-java/" rel="nofollow">http://jimmyg.org/2007/09/01/amazon-ec2-for-people-who-prefer-debian-and-python-over-fedora-and-java/</a></p>
<p>That article is a fantastic introduction to ec2 in general, but in following the boto bits, I found it to be a rather incomplete tool if your goal is to quickly fire off administrative tasks. It can probably be a good foundation for putting together a suite of python-based tools to mimic Amazon&#8217;s own ec2-* tools, but those seem to work well enough.</p>
<p>Regardless, I appreciate you bringing it up again, because I *had* actually missed somehow that it supports moving files from s3 to ec2. Thanks for the reminder!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arthur</title>
		<link>http://www.protocolostomy.com/2008/03/20/hadoop-ec2-s3-and-me/comment-page-1/#comment-205</link>
		<dc:creator>Arthur</dc:creator>
		<pubDate>Sat, 22 Mar 2008 18:03:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.protocolostomy.com/2008/03/20/hadoop-ec2-s3-and-me/#comment-205</guid>
		<description>I take it you&#039;ve seen &lt;a href=&quot;http://code.google.com/p/boto/&quot; rel=&quot;nofollow&quot;&gt;boto&lt;/a&gt;?

For a python geek that&#039;s probably the easiest way to get stuff from s3 onto ec2. I&#039;ve taken a copy of Dug Song&#039;s s3tools and adapted s3ftp.py to use boto, so tend to just use that (or a varient) to get what I need if I&#039;m doing ad-hoc command line stuff.</description>
		<content:encoded><![CDATA[<p>I take it you&#8217;ve seen <a href="http://code.google.com/p/boto/" rel="nofollow">boto</a>?</p>
<p>For a python geek that&#8217;s probably the easiest way to get stuff from s3 onto ec2. I&#8217;ve taken a copy of Dug Song&#8217;s s3tools and adapted s3ftp.py to use boto, so tend to just use that (or a varient) to get what I need if I&#8217;m doing ad-hoc command line stuff.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin</title>
		<link>http://www.protocolostomy.com/2008/03/20/hadoop-ec2-s3-and-me/comment-page-1/#comment-204</link>
		<dc:creator>Justin</dc:creator>
		<pubDate>Fri, 21 Mar 2008 17:57:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.protocolostomy.com/2008/03/20/hadoop-ec2-s3-and-me/#comment-204</guid>
		<description>hmm, I am re-reading the hadoop docs on this:

http://hadoop.apache.org/core/docs/r0.15.2/streaming.html#Large+files+and+archives+in+Hadoop+Streami

It says:

&quot;the mapper collects the line oriented outputs from the stdout of the process and converts each line into a key/value pair, which is collected as the output of the mapper. By default, the prefix of a line up to the first tab character is the key and the the rest of the line (excluding the tab character) will be the value.&quot;

and the same for reducing.  This seems to imply that it does sort and merge the data, if it does, then something like this should work for the reducer:

#!/usr/bin/env python
import sys
import itertools
from operator import itemgetter

def get_file(f):
    for line in f:
        yield line.split()

def main():
    data = get_file(sys.stdin)
    for word, counts in itertools.groupby(data, itemgetter(0)):
        tot = sum(int(x[1]) for x in counts)
        print &quot;%s\t%d&quot; % (word, tot)

if __name__ == &quot;__main__&quot;:
    main()

Notice how this is much more along the lines of the java code that does the same thing.  The only diference is with the java code, mapreduce does the &quot;groupby&quot; for you.
wordpress will probably butcher it, if it does I&#039;ll just make a blog post with it :)</description>
		<content:encoded><![CDATA[<p>hmm, I am re-reading the hadoop docs on this:</p>
<p><a href="http://hadoop.apache.org/core/docs/r0.15.2/streaming.html#Large+files+and+archives+in+Hadoop+Streami" rel="nofollow">http://hadoop.apache.org/core/docs/r0.15.2/streaming.html#Large+files+and+archives+in+Hadoop+Streami</a></p>
<p>It says:</p>
<p>&#8220;the mapper collects the line oriented outputs from the stdout of the process and converts each line into a key/value pair, which is collected as the output of the mapper. By default, the prefix of a line up to the first tab character is the key and the the rest of the line (excluding the tab character) will be the value.&#8221;</p>
<p>and the same for reducing.  This seems to imply that it does sort and merge the data, if it does, then something like this should work for the reducer:</p>
<p>#!/usr/bin/env python<br />
import sys<br />
import itertools<br />
from operator import itemgetter</p>
<p>def get_file(f):<br />
    for line in f:<br />
        yield line.split()</p>
<p>def main():<br />
    data = get_file(sys.stdin)<br />
    for word, counts in itertools.groupby(data, itemgetter(0)):<br />
        tot = sum(int(x[1]) for x in counts)<br />
        print &#8220;%s\t%d&#8221; % (word, tot)</p>
<p>if __name__ == &#8220;__main__&#8221;:<br />
    main()</p>
<p>Notice how this is much more along the lines of the java code that does the same thing.  The only diference is with the java code, mapreduce does the &#8220;groupby&#8221; for you.<br />
wordpress will probably butcher it, if it does I&#8217;ll just make a blog post with it <img src='http://www.protocolostomy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: m0j0</title>
		<link>http://www.protocolostomy.com/2008/03/20/hadoop-ec2-s3-and-me/comment-page-1/#comment-208</link>
		<dc:creator>m0j0</dc:creator>
		<pubDate>Fri, 21 Mar 2008 15:15:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.protocolostomy.com/2008/03/20/hadoop-ec2-s3-and-me/#comment-208</guid>
		<description>Thanks, Justin.

The point of the article, for me anyway, was that you didn&#039;t have to code in Java to use Hadoop. For me, that&#039;s the big win, because having coded in Java in the past, I will avoid it at all costs, even if it means implementing something like Torque and Maui instead of Hadoop to get my work done.

That said, your comment is still spot on for those Pythonistas who might&#039;ve been taking that simplistic example as a &quot;best practices&quot; document for how to code the actual mapreduce process.

So, Justin, can you provide some Python code that would improve upon that example? Does anyone?</description>
		<content:encoded><![CDATA[<p>Thanks, Justin.</p>
<p>The point of the article, for me anyway, was that you didn&#8217;t have to code in Java to use Hadoop. For me, that&#8217;s the big win, because having coded in Java in the past, I will avoid it at all costs, even if it means implementing something like Torque and Maui instead of Hadoop to get my work done.</p>
<p>That said, your comment is still spot on for those Pythonistas who might&#8217;ve been taking that simplistic example as a &#8220;best practices&#8221; document for how to code the actual mapreduce process.</p>
<p>So, Justin, can you provide some Python code that would improve upon that example? Does anyone?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
