<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" 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/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>The Cult of Gary</title>
	
	<link>http://www.cultofgary.com</link>
	<description>A System Administrator's Blog</description>
	<lastBuildDate>Wed, 09 Dec 2009 02:01:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/TheCultOfGary" /><feedburner:info uri="thecultofgary" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>HP LaserJet P1505 and Airport Express</title>
		<link>http://feedproxy.google.com/~r/TheCultOfGary/~3/ARKt0c5iNyc/</link>
		<comments>http://www.cultofgary.com/2009/12/08/hp-laserjet-p1505-and-airport-express/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 02:01:13 +0000</pubDate>
		<dc:creator>gary.richardson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[mac hp]]></category>

		<guid isPermaLink="false">http://www.cultofgary.com/?p=182</guid>
		<description><![CDATA[After upgrading to snow leopard a while ago, I&#8217;ve been having nothing but problems making my HP P1505 printer work with my Airport Express 802.11n.
I put some time in tonight trying to make it go. It looks like this Apple forum post has the answer:
I found this while researching my bonjour problem. It worked for [...]]]></description>
			<content:encoded><![CDATA[<p>After upgrading to snow leopard a while ago, I&#8217;ve been having nothing but problems making my HP P1505 printer work with my Airport Express 802.11n.</p>
<p>I put some time in tonight trying to make it go. It looks like this <a href="http://discussions.apple.com/thread.jspa?threadID=1455306&amp;start=0&amp;tstart=0" onclick="javascript:pageTracker._trackPageview('/http://discussions.apple.com/thread.jspa?threadID=1455306&amp;start=0&amp;tstart=0');">Apple forum post</a> has the answer:</p>
<blockquote><p>I found this while researching my bonjour problem. It worked for me.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 18px; margin-left: 0px; font-size: 12px; line-height: 16px; padding: 0px;">Re: Can&#8217;t print after 10.5.2 install<br />
Posted: Feb 20, 2008 7:23 PM in response to: MTR300<br />
Solved</p>
<p>The CUPS author created a small utility that should help with the 10.5.2 upgrade and the Airport problems:</p>
<p><a style="color: #395a90; font-weight: bold; text-decoration: none;" href="http://ftp.easysw.com/pub/cups/contrib/FixAirportPrinter.dmg" onclick="javascript:pageTracker._trackPageview('/http://ftp.easysw.com/pub/cups/contrib/FixAirportPrinter.dmg');">http://ftp.easysw.com/pub/cups/contrib/FixAirportPrinter.dmg</a></p>
<p>Steps:</p>
<p>1. Add Airport printer<br />
2. Run FixAirportPrinter application<br />
3. Double-click on printer in list (or click on printer and click on<br />
&#8220;Fix Printer&#8221; button)</p>
<p>Please weigh in with any results you have.</p></blockquote>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 18px; margin-left: 0px; font-size: 12px; line-height: 16px; padding: 0px;">That&#8217;s it. I can print again without plugging the printer directly into my laptop.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cultofgary.com/2009/12/08/hp-laserjet-p1505-and-airport-express/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.cultofgary.com/2009/12/08/hp-laserjet-p1505-and-airport-express/</feedburner:origLink></item>
		<item>
		<title>No Hire?</title>
		<link>http://feedproxy.google.com/~r/TheCultOfGary/~3/kxbuJgZnbWE/</link>
		<comments>http://www.cultofgary.com/2009/07/14/177/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 04:48:39 +0000</pubDate>
		<dc:creator>gary.richardson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.cultofgary.com/?p=177</guid>
		<description><![CDATA[The secret startup I&#8217;m working for is hiring, and I&#8217;m looking to hire a sysadmin. The job posting is up at the Server Fault jobs board.
I&#8217;ve been shocked at the responses to the posting so far. In the weeks it&#8217;s been running, we&#8217;ve only gotten 2 (underqualified) applicants. At the same time, we have a [...]]]></description>
			<content:encoded><![CDATA[<p>The secret startup I&#8217;m working for is hiring, and I&#8217;m looking to hire a sysadmin. The job posting is up at the <a href="http://jobs.serverfault.com/default.asp?5003" onclick="javascript:pageTracker._trackPageview('/http://jobs.serverfault.com/default.asp?5003');">Server Fault jobs board</a>.</p>
<p>I&#8217;ve been shocked at the responses to the posting so far. In the weeks it&#8217;s been running, we&#8217;ve only gotten 2 (underqualified) applicants. At the same time, we have a posting running for a coder and it&#8217;s gotten 20+ quality applicants.</p>
<p>I&#8217;m wondering why: possibly sysadmin type people tend to be more conservative and don&#8217;t want to leave a job during uncertain times? Operations staff tend to be the last people laid off, so there may not be a surplus of SA&#8217;s out there. Possibly everyone&#8217;s on vacation? Or maybe my ad just sucks?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cultofgary.com/2009/07/14/177/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://www.cultofgary.com/2009/07/14/177/</feedburner:origLink></item>
		<item>
		<title>UPS Saves the Day</title>
		<link>http://feedproxy.google.com/~r/TheCultOfGary/~3/WaVlKBCW1FA/</link>
		<comments>http://www.cultofgary.com/2009/03/04/ups-saves-the-day/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 22:40:32 +0000</pubDate>
		<dc:creator>gary.richardson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ultimate]]></category>
		<category><![CDATA[UPS]]></category>

		<guid isPermaLink="false">http://www.cultofgary.com/?p=169</guid>
		<description><![CDATA[I&#8217;m coaching the Simon Fraser University Ultimate Frisbee team this year. We&#8217;re leaving for the Stanford Invite tomorrow. Our brand new jerseys were scheduled to arrive at my place today. I&#8217;ve been paranoid about getting these in on time. In fact, I was watching the UPS tracking page all morning long.
I when I checked it [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m coaching the <a href="http://www.sfuclam.org/" onclick="javascript:pageTracker._trackPageview('/http://www.sfuclam.org/');">Simon Fraser University Ultimate Frisbee</a> team this year. We&#8217;re leaving for the <a href="http://www.cultimate.com/stanfordinvite09/" onclick="javascript:pageTracker._trackPageview('/http://www.cultimate.com/stanfordinvite09/');">Stanford Invite</a> tomorrow. Our brand new jerseys were scheduled to arrive at my place today. I&#8217;ve been paranoid about getting these in on time. In fact, I was watching the UPS tracking page all morning long.</p>
<p>I when I checked it around 11:30 I saw that they had attemped a delivery at 11:22.<br />
<img class="alignnone size-full wp-image-170" title="picture-4" src="http://www.cultofgary.com/wp-content/uploads/2009/03/picture-4.png" alt="picture-4" width="550" height="135" /></p>
<p>For some reason, my door buzzer doesn&#8217;t work reliably and my phone didn&#8217;t go off. I had missd him by minutes. My apartment is on the ground floor, right next to the entrance way. He would have been no more than 15 feet away from me when he attempted the delivery.</p>
<p>I paniced for a minute, then hunted for the UPS phone number. After weeding through their IVR and getting a live person (wasn&#8217;t hard &#8212; I just pressed 0), I explained the situation. She opened a ticket and said I&#8217;d be called back within an hour.</p>
<p>I got my callback 15 minutes later. They managed to get the driver to come back and attempt another delivery. The jerseys were delivered at about 12:30. UPS saved the day. We&#8217;ll actually look like a team at the tournament.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cultofgary.com/2009/03/04/ups-saves-the-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.cultofgary.com/2009/03/04/ups-saves-the-day/</feedburner:origLink></item>
		<item>
		<title>Making PHP talk to Hive through Thrift</title>
		<link>http://feedproxy.google.com/~r/TheCultOfGary/~3/sBuhAk9VVWE/</link>
		<comments>http://www.cultofgary.com/2009/02/24/making-php-talk-to-hive-through-thrift/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 22:10:20 +0000</pubDate>
		<dc:creator>gary.richardson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[hadoop]]></category>
		<category><![CDATA[hive]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[thrift]]></category>

		<guid isPermaLink="false">http://www.cultofgary.com/?p=154</guid>
		<description><![CDATA[Hive is a data warehouse system build ontop of Hadoop. I&#8217;ve been experimenting with it for the past few days. Using the thrift service, I&#8217;ve been able to drive it from PHP. Here&#8217;s what I&#8217;ve done to get it going:
Launching a Cluster
Using the EC2 scripts, I launched a cluster of Hadoop servers on EC2. It&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://wiki.apache.org/hadoop/Hive" onclick="javascript:pageTracker._trackPageview('/http://wiki.apache.org/hadoop/Hive');">Hive</a> is a data warehouse system build ontop of Hadoop. I&#8217;ve been experimenting with it for the past few days. Using the thrift service, I&#8217;ve been able to drive it from PHP. Here&#8217;s what I&#8217;ve done to get it going:</p>
<h1>Launching a Cluster</h1>
<p>Using the <a href="http://wiki.apache.org/hadoop/AmazonEC2" onclick="javascript:pageTracker._trackPageview('/http://wiki.apache.org/hadoop/AmazonEC2');">EC2 scripts</a>, I launched a cluster of Hadoop servers on EC2. It&#8217;s straight forward to get up and running. It takes me about 5 minutes to get a cluster going, including boot time.</p>
<p>Once it&#8217;s up and I&#8217;ve connected to the master, I install some tools that I need for building:</p>
<p><code>yum install -y ant svn</code></p>
<p>I also set up my environment:</p>
<p><code><br />
export JAVA_HOME=/usr/local/jdk1.6.0_10<br />
export HADOOP_HOME=/usr/local/hadoop-0.19.0/<br />
export DERBY_HOME=/usr/local/db-derby<br />
alias h=$HADOOP_HOME/bin/hadoop<br />
</code></p>
<p>You may need to update version numbers as the images are updated.</p>
<h1>Set Up Derby</h1>
<p>You&#8217;ll want to use a stand alone metastore db. The default is to use an embedded version of derby, which locks the database files so you can only have one instance connecting to hive at a time.</p>
<p>You&#8217;ll need to set up and launch your derby server:</p>
<p><code><br />
wget http://east.unified.net/apache/db/derby/db-derby-10.4.2.0/db-derby-10.4.2.0-bin.tar.gz<br />
tar zxvf db-derby-10.4.2.0-bin.tar.gz<br />
mv db-derby-10.4.2.0-bin $DERBY_HOME<br />
pushd $DERBY_HOME<br />
mkdir data<br />
pushd data<br />
nohup $DERBY_HOME/bin/startNetworkServer -h 0.0.0.0 &amp;<br />
popd<br />
popd<br />
</code></p>
<h1>Install Hive and the Thrift Service</h1>
<p>The following chunk builds and installs the latest version of hive. It&#8217;s a simplified version of the <a href="http://wiki.apache.org/hadoop/Hive/GettingStarted" onclick="javascript:pageTracker._trackPageview('/http://wiki.apache.org/hadoop/Hive/GettingStarted');">Getting Started</a> guide.</p>
<p><code><br />
svn co http://svn.apache.org/repos/asf/hadoop/hive/trunk hive<br />
pushd hive<br />
ant package<br />
mkdir /usr/local/hive<br />
cp -r build/dist/* /usr/local/hive<br />
popd<br />
# setup required directories in hdfs<br />
h fs -mkdir       /tmp<br />
h fs -mkdir       /user/hive/warehouse<br />
h fs -chmod g+w   /tmp<br />
h fs -chmod g+w   /user/hive/warehouse<br />
# copy the derby libs to connect to the server<br />
cp $DERBY_HOME/lib/{derbyclient.jar,derbytools.jar} /usr/local/hive/lib/<br />
</code></p>
<p>I had a problem with the ant build process. My EC2 instances couldn&#8217;t download the hadoop source. My work around was to start the build on my mac and copy the ~/.ant directory to the server. Since this contains the complete ivy cache, it doesn&#8217;t need to download the files. I&#8217;m sure this was just a momentary glitch for me, but I figured I&#8217;d mention it in case someone else runs into it.</p>
<p>You&#8217;ll also need to update some hive config files. /usr/local/hive/conf/hive-site.xml should look like:</p>
<p><code><br />
&lt;configuration&gt;<br />
&lt;property&gt;<br />
&lt;name&gt;hive.metastore.local&lt;/name&gt;<br />
&lt;value&gt;true&lt;/value&gt;<br />
&lt;description&gt;controls whether to connect to remove metastore server or open a new metastore server in Hive Client JVM&lt;/description&gt;<br />
&lt;/property&gt;<br />
&lt;property&gt;<br />
&lt;name&gt;javax.jdo.option.ConnectionURL&lt;/name&gt;<br />
&lt;value&gt;jdbc:derby://localhost:1527/metastore_db;create=true&lt;/value&gt;<br />
&lt;description&gt;JDBC connect string for a JDBC metastore&lt;/description&gt;<br />
&lt;/property&gt;<br />
&lt;property&gt;<br />
&lt;name&gt;javax.jdo.option.ConnectionDriverName&lt;/name&gt;<br />
&lt;value&gt;org.apache.derby.jdbc.ClientDriver&lt;/value&gt;<br />
&lt;description&gt;Driver class name for a JDBC metastore&lt;/description&gt;<br />
&lt;/property&gt;<br />
&lt;/configuration&gt;<br />
</code></p>
<p>And /usr/local/hive/conf/jpox.properties should contain:</p>
<p><code><br />
javax.jdo.PersistenceManagerFactoryClass=org.jpox.PersistenceManagerFactoryImpl<br />
org.jpox.autoCreateSchema=false<br />
org.jpox.validateTables=false<br />
org.jpox.validateColumns=false<br />
org.jpox.validateConstraints=false<br />
org.jpox.storeManagerType=rdbms<br />
org.jpox.autoCreateSchema=true<br />
org.jpox.autoStartMechanismMode=checked<br />
org.jpox.transactionIsolation=read_committed<br />
javax.jdo.option.DetachAllOnCommit=true<br />
javax.jdo.option.NontransactionalRead=true<br />
javax.jdo.option.ConnectionDriverName=org.apache.derby.jdbc.ClientDriver<br />
javax.jdo.option.ConnectionURL=jdbc:derby://localhost:1527/metastore_db;create=true<br />
javax.jdo.option.ConnectionUserName=APP<br />
javax.jdo.option.ConnectionPassword=mine<br />
org.jpox.cache.level2=true<br />
org.jpox.cache.level2.type=SOFT<br />
</code></p>
<p>At this point, you can safely start hive by running:</p>
<p><code><br />
pushd /usr/local/hive<br />
nohup /usr/local/hive/bin/hive --service hiveserver &amp;<br />
popd<br />
</code></p>
<p>To start the interactive shell, run /usr/local/hive/bin/hive and execute something like show tables. If everything is working, you should see a metastore_db directory in /usr/local/db-derby/data.</p>
<h1>Connecting From PHP</h1>
<p>You&#8217;ll need to assemble the PHP thrift libraries to make this go. Until <a href="https://issues.apache.org/jira/browse/THRIFT-347" onclick="javascript:pageTracker._trackPageview('/https://issues.apache.org/jira/browse/THRIFT-347');">THRIFT-347</a> and <a href="https://issues.apache.org/jira/browse/HIVE-299" onclick="javascript:pageTracker._trackPageview('/https://issues.apache.org/jira/browse/HIVE-299');">HIVE-299</a> are resolved, it&#8217;s no easy task.</p>
<ol>
<li> To get the base thrift libraries, you need to <a href="http://incubator.apache.org/thrift/download/" onclick="javascript:pageTracker._trackPageview('/http://incubator.apache.org/thrift/download/');">download thrift</a>. I recommend getting the latest SVN version over the release. The files you need are located a lib/php/src.</li>
<li> Copy this directory somewhere &#8212; this is your THRIFT_ROOT.</li>
<li> If the bug hasn&#8217;t been resolved, apply the patch from <a href="https://issues.apache.org/jira/browse/THRIFT-347" onclick="javascript:pageTracker._trackPageview('/https://issues.apache.org/jira/browse/THRIFT-347');">THRIFT-347</a> to TSocket.php.</li>
<li><a href="http://wiki.apache.org/thrift/ThriftInstallation" onclick="javascript:pageTracker._trackPageview('/http://wiki.apache.org/thrift/ThriftInstallation');">Build thrift.</a> This was not a lot of fun for me. You need to install the boost-devel, gcc-g++, byacc, flex, autoconf and automake packages.</li>
<li> You&#8217;ll need to build a bunch of thrift interfaces:<br />
<code><br />
mkdir $THRIFT_ROOT/packages/<br />
# FB303 thrift IF<br />
cd $YOUR_THRIFT_SRCDIR<br />
thrift --gen php contrib/fb303/if/fb303.thrift<br />
mv gen-php $THRIFT_ROOT/packages/fb303/<br />
# Hive Metastore thrift IF<br />
cd $YOUR_HIVE_SRCDIR/metastore<br />
thrift --gen php -I include if/hive_metastore.thrift<br />
mv gen-php $THRIFT_ROOT/packages/hive_metastore<br />
# Hive Service IF<br />
cd $YOUR_HIVE_SRCDIR/service/<br />
thrift --gen php -I include -I ../ if/hive_service.thrift<br />
mv gen-php $THRIFT_ROOT/packages/hive_service</code></li>
</ol>
<p>That&#8217;s it! you should have a THRIFT_ROOT that&#8217;s ready to go. If you&#8217;re having troubles assembling your own version, post a comment and I can send you a copy of my working one.</p>
<h1>Connecting from PHP</h1>
<p>To use the API, you need to load a bunch of classes and set up a bunch of objects:</p>
<p><code><br />
// set your THRIFT_ROOT to the location of your code<br />
$GLOBALS['THRIFT_ROOT'] = 'thriftroot/';<br />
// load the required files for connecting to Hive<br />
require_once $GLOBALS['THRIFT_ROOT'] . 'packages/hive_service/ThriftHive.php';<br />
require_once $GLOBALS['THRIFT_ROOT'] . 'transport/TSocket.php';<br />
require_once $GLOBALS['THRIFT_ROOT'] . 'protocol/TBinaryProtocol.php';<br />
// Set up the transport/protocol/client<br />
$transport = new TSocket('localhost', 10000);<br />
$protocol = new TBinaryProtocol($transport);<br />
$client = new ThriftHiveClient($protocol);<br />
$transport-&gt;open();<br />
</code></p>
<p>Then you should be able to run queries:</p>
<p><code><br />
$client-&gt;execute('SELECT * FROM some_table');<br />
var_dump($client-&gt;fetchAll());<br />
</code></p>
<p>The <a href="http://svn.apache.org/repos/asf/hadoop/hive/trunk/service/src/test/org/apache/hadoop/hive/service/TestHiveServer.java" onclick="javascript:pageTracker._trackPageview('/http://svn.apache.org/repos/asf/hadoop/hive/trunk/service/src/test/org/apache/hadoop/hive/service/TestHiveServer.java');">Java Test Suite</a> as a more in depth guide to using the API.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cultofgary.com/2009/02/24/making-php-talk-to-hive-through-thrift/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.cultofgary.com/2009/02/24/making-php-talk-to-hive-through-thrift/</feedburner:origLink></item>
		<item>
		<title>Hadoop HDFS: Space Available</title>
		<link>http://feedproxy.google.com/~r/TheCultOfGary/~3/s6ZtME4x4gk/</link>
		<comments>http://www.cultofgary.com/2009/02/18/hadoop-hdfs-space-available/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 17:34:00 +0000</pubDate>
		<dc:creator>gary.richardson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.cultofgary.com/?p=149</guid>
		<description><![CDATA[I&#8217;ve been playing around with Hadoop recently. It&#8217;s pretty slick. The EC2 scripts make it incredibly easy to set up and work with. HDFS is pretty neat too. I&#8217;ve been working with 10GB data sets and moving the data around and working with them isn&#8217;t painful.
I was curious as to how much free space was [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing around with <a href="http://hadoop.apache.org/core/" onclick="javascript:pageTracker._trackPageview('/http://hadoop.apache.org/core/');">Hadoop</a> recently. It&#8217;s pretty slick. The EC2 scripts make it incredibly easy to set up and work with. HDFS is pretty neat too. I&#8217;ve been working with 10GB data sets and moving the data around and working with them isn&#8217;t painful.</p>
<p>I was curious as to how much free space was available in my cluster. It took a bit of digging around to figure out how to get this information, so I figured I&#8217;d post it here.</p>
<p>Running <code>bin/hadoop dfsadmin -report</code> will give a breakdown of your node storage:</p>
<pre>[root@ip-10-250-147-64 ~]# h dfsadmin -report
Configured Capacity: 718626299904 (669.27 GB)
Present Capacity: 681713795072 (634.9 GB)
DFS Remaining: 681713745920 (634.9 GB)
DFS Used: 49152 (48 KB)
DFS Used%: 0%</pre>
<pre>-------------------------------------------------
Datanodes available: 2 (2 total, 0 dead)</pre>
<pre>Name: 10.250.106.176:50010
Decommission Status : Normal
Configured Capacity: 359313149952 (334.64 GB)
DFS Used: 24576 (24 KB)
Non DFS Used: 18456252416 (17.19 GB)
DFS Remaining: 340856872960(317.45 GB)
DFS Used%: 0%
DFS Remaining%: 94.86%
Last contact: Wed Feb 18 12:28:16 EST 2009</pre>
<pre>Name: 10.250.146.127:50010
Decommission Status : Normal
Configured Capacity: 359313149952 (334.64 GB)
DFS Used: 24576 (24 KB)
Non DFS Used: 18456252416 (17.19 GB)
DFS Remaining: 340856872960(317.45 GB)
DFS Used%: 0%
DFS Remaining%: 94.86%
Last contact: Wed Feb 18 12:28:18 EST 2009</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.cultofgary.com/2009/02/18/hadoop-hdfs-space-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.cultofgary.com/2009/02/18/hadoop-hdfs-space-available/</feedburner:origLink></item>
		<item>
		<title>I’ve Never Used a Phone Book in My Life</title>
		<link>http://feedproxy.google.com/~r/TheCultOfGary/~3/NaEi_6LRTHk/</link>
		<comments>http://www.cultofgary.com/2009/02/13/ive-never-used-a-phone-book-in-my-life/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 17:33:17 +0000</pubDate>
		<dc:creator>gary.richardson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.cultofgary.com/?p=147</guid>
		<description><![CDATA[Darren Barefoot has a post about Yellow Pages (phone books not NIS).
A few years back my wife and I moved from a basement suite we were renting to our current apartment. Since we had never gotten our own phone book, I remember the first time the yellow pages showed up.
One day, I was packing in [...]]]></description>
			<content:encoded><![CDATA[<p>Darren Barefoot has a <a href="http://www.darrenbarefoot.com/archives/2009/02/from-the-front-door-directly-to-the-recycling-bin.html" onclick="javascript:pageTracker._trackPageview('/http://www.darrenbarefoot.com/archives/2009/02/from-the-front-door-directly-to-the-recycling-bin.html');">post about Yellow Pages</a> (phone books not <a href="http://en.wikipedia.org/wiki/Network_Information_Service" onclick="javascript:pageTracker._trackPageview('/http://en.wikipedia.org/wiki/Network_Information_Service');">NIS</a>).</p>
<p>A few years back <a href="http://alexaludeman.com" onclick="javascript:pageTracker._trackPageview('/http://alexaludeman.com');">my wife</a> and I moved from a basement suite we were renting to our current apartment. Since we had never gotten our own phone book, I remember the first time the yellow pages showed up.</p>
<p>One day, I was packing in some groceries and I grabbed one from the entrance foyer. I put it on the table that we stored our keys on. It was the same place my parents kept theirs.. I did it out of habit.</p>
<p>As soon as I put it down, my wife picked it up and took it back to the entrance way. I started to protest, but then I realized that I&#8217;ve never looked in a phone book in my life. I&#8217;m 27 and I&#8217;ve always had the internet to look up businesses and phone numbers when I needed them.</p>
<p>There&#8217;s always a pile of the directories in the garbage room a week after they&#8217;ve been delivered. I&#8217;d wager 80% of them end up there in my building.</p>
<p>There should be a law that YP has to collect the unclaimed books &#8212; that would motivate them to make the list opt-in.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cultofgary.com/2009/02/13/ive-never-used-a-phone-book-in-my-life/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.cultofgary.com/2009/02/13/ive-never-used-a-phone-book-in-my-life/</feedburner:origLink></item>
		<item>
		<title>Time Machine, Netatalk and Error Code -6602</title>
		<link>http://feedproxy.google.com/~r/TheCultOfGary/~3/KY5TFa_SFaQ/</link>
		<comments>http://www.cultofgary.com/2009/01/08/time-machine-netatalk-and-error-code-6602/#comments</comments>
		<pubDate>Fri, 09 Jan 2009 03:43:01 +0000</pubDate>
		<dc:creator>gary.richardson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[time machine]]></category>

		<guid isPermaLink="false">http://www.cultofgary.com/?p=143</guid>
		<description><![CDATA[Over the Christmas break, I set time machine to backup my laptop to a USB drive attached to my Mythbuntu backend server. There are plenty of instructions out there on how to do this. I used this one.
The machine I&#8217;m using as the server is old. It doesn&#8217;t have onboard USB 2.0 ports, so the [...]]]></description>
			<content:encoded><![CDATA[<p>Over the Christmas break, I set time machine to backup my laptop to a USB drive attached to my Mythbuntu backend server. There are plenty of instructions out there on how to do this. I used <a href="http://holyarmy.org/benjamin/2008/01/time-machine-backup-to-linux-via-netatalk/" onclick="javascript:pageTracker._trackPageview('/http://holyarmy.org/benjamin/2008/01/time-machine-backup-to-linux-via-netatalk/');">this one</a>.</p>
<p>The machine I&#8217;m using as the server is old. It doesn&#8217;t have onboard USB 2.0 ports, so the backups were really slow. I grabbed a USB 2.0 card to try and speed up the backups. The long and the short of this is that I managed to hit a <a href="https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.20/+bug/88746" onclick="javascript:pageTracker._trackPageview('/https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.20/+bug/88746');">2 year old USB mass storage bug</a>.</p>
<p>In my attempt to get around the bug, I tried upgrading the server from Ubuntu 7.10 to 8.10. The upgrade went well, though it didn&#8217;t solve my USB problem.</p>
<p>As a side effect of the upgrade, my laptop wasn&#8217;t able to mount the backups any longer. I was getting a -6602 error from Finder. Googling for the error message pointed towards Samba connection problems.</p>
<p>The actual problem turned out to be a change in the Berkeley DB library after the upgrade:</p>
<p><code>Jan  8 19:23:24 mythtv afpd[28202]: CNID DB initialized using Berkeley DB 4.6.21: (September 27, 2007)<br />
Jan  8 19:23:24 mythtv afpd[28202]: cnid_open: dbenv-&gt;open (rw) of /backups/gary/.AppleDB failed: DB_VERSION_MISMATCH: Database environment version mismatch<br />
Jan  8 19:23:24 mythtv afpd[28202]: cnid_open: dbenv-&gt;open of /backups/gary/.AppleDB failed: DB_VERSION_MISMATCH: Database environment version mismatch<br />
Jan  8 19:23:24 mythtv afpd[28202]: Cannot open CNID db at [/backups/gary].</code></p>
<p>The final solution was to remove the old .AppleDB directories and restart netatalk.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cultofgary.com/2009/01/08/time-machine-netatalk-and-error-code-6602/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.cultofgary.com/2009/01/08/time-machine-netatalk-and-error-code-6602/</feedburner:origLink></item>
		<item>
		<title>Ack! An EC2 Instance has Died!</title>
		<link>http://feedproxy.google.com/~r/TheCultOfGary/~3/yMDnfx9zLgE/</link>
		<comments>http://www.cultofgary.com/2009/01/02/ack-an-ec2-instance-has-died/#comments</comments>
		<pubDate>Fri, 02 Jan 2009 22:13:34 +0000</pubDate>
		<dc:creator>gary.richardson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[backups]]></category>
		<category><![CDATA[ec2]]></category>

		<guid isPermaLink="false">http://www.cultofgary.com/?p=136</guid>
		<description><![CDATA[And it was the one my blog was running on.
It was the damnest thing too. I was able to reboot it from the API and look at the console output. As far as I can tell, the network adapter wasn&#8217;t able to DHCP an IP address:

Welcome to  CentOS release 5 (Final)
Press 'I' to enter [...]]]></description>
			<content:encoded><![CDATA[<p>And it was the one my blog was running on.</p>
<p>It was the damnest thing too. I was able to reboot it from the API and look at the console output. As far as I can tell, the network adapter wasn&#8217;t able to DHCP an IP address:</p>
<p><code><br />
Welcome to  CentOS release 5 (Final)<br />
Press 'I' to enter interactive startup.<br />
Setting clock : Mon Dec 22 20:06:28 EST 2008 [  OK  ]<br />
Starting udev: [  OK  ]<br />
Setting hostname localhost.localdomain:  [  OK  ]<br />
No devices found<br />
Setting up Logical Volume Management:   No volume groups found<br />
[  OK  ]<br />
Checking filesystems<br />
Checking all file systems.<br />
[/sbin/fsck.ext3 (1) -- /] fsck.ext3 -a /dev/sda1<br />
/dev/sda1: clean, 96119/1313280 files, 616984/2621440 blocks<br />
[/sbin/fsck.ext3 (1) -- /mnt] fsck.ext3 -a /dev/sda2<br />
/dev/sda2: clean, 5853/19546112 files, 892921/39092224 blocks<br />
[  OK  ]<br />
Remounting root filesystem in read-write mode:  [  OK  ]<br />
Mounting local filesystems:  [  OK  ]<br />
Enabling local filesystem quotas:  [  OK  ]<br />
Enabling /etc/fstab swaps:  [  OK  ]<br />
INIT: Entering runlevel: 4<br />
Entering non-interactive startup<br />
Starting background readahead: [  OK  ]<br />
Checking for hardware changes [  OK  ]<br />
Bringing up loopback interface:  [  OK  ]<br />
Bringing up interface eth0:<br />
Determining IP information for eth0... failed.<br />
[FAILED]<br />
Starting auditd: [FAILED]<br />
curl: (7) Failed to connect to 169.254.169.254: Network is unreachable<br />
Starting system logger: [  OK  ]<br />
Starting kernel logger: [  OK  ]<br />
Starting syslog-ng: [  OK  ]<br />
Starting irqbalance: [  OK  ]<br />
Starting system message bus: [  OK  ]<br />
Mounting other filesystems:  [  OK  ]<br />
Starting sshd: [  OK  ]<br />
Starting cups: [  OK  ]<br />
Starting MySQL:  [  OK  ]<br />
Starting postfix: [  OK  ]<br />
curl: (7) Failed to connect to 169.254.169.254: Network is unreachable<br />
Starting httpd: Warning: DocumentRoot [/dev/null] does not exist<br />
Warning: DocumentRoot [/dev/null] does not exist<br />
Warning: DocumentRoot [/dev/null] does not exist<br />
httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName<br />
[  OK  ]<br />
Starting crond: [  OK  ]<br />
Starting process accounting:  [  OK  ]<br />
Starting atd: [  OK  ]<br />
Starting jexec:  Starting jexec services[  OK  ]<br />
Starting HAL daemon: [  OK  ]<br />
+ Updating ec2-ami-tools<br />
curl: (6) Couldn't resolve host 's3.amazonaws.com'<br />
c<br />
CentOS release 5 (Final)<br />
Kernel 2.6.16-xenU on an i686<br />
localhost l</code></p>
<p>Luckily I had backups, so I booted a new instance and restored it it. It looks like I posted one article since my last backup. I reckon I&#8217;ll be able to get that back from a google cache.</p>
<p>It took me about 30 minutes to start the instance, restore the backup and test everything out. This time around, I set up an elastic IP. If this happens again, I won&#8217;t have to update DNS.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cultofgary.com/2009/01/02/ack-an-ec2-instance-has-died/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.cultofgary.com/2009/01/02/ack-an-ec2-instance-has-died/</feedburner:origLink></item>
		<item>
		<title>Confluence and Google Code Prettify</title>
		<link>http://feedproxy.google.com/~r/TheCultOfGary/~3/IQp_D7IooC4/</link>
		<comments>http://www.cultofgary.com/2008/11/13/confluence-and-google-code-prettify/#comments</comments>
		<pubDate>Thu, 13 Nov 2008 22:38:49 +0000</pubDate>
		<dc:creator>gary.richardson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.cultofgary.com/?p=140</guid>
		<description><![CDATA[
EDIT &#8211; this post was lost due to a server crash. I&#8217;m hoping to put it back in the same spot, but I&#8217;m not sure if wordpress will allow me to do that without ugliness.
I mostly like Confluence. I don’t like the {code} blocks. The highlighting and formatting sucks. There’s a limited number of languages [...]]]></description>
			<content:encoded><![CDATA[<div class="entry">
<p><strong>EDIT</strong> &#8211; this post was lost due to a server crash. I&#8217;m hoping to put it back in the same spot, but I&#8217;m not sure if wordpress will allow me to do that without ugliness.</p>
<p>I mostly like Confluence. I don’t like the {code} blocks. The highlighting and formatting sucks. There’s a limited number of languages supported and I don’t really code in any of them. The list from the documentation says:</p>
<blockquote><p>Makes a preformatted block of code with syntax highlighting. All the optional parameters of {panel} macro are valid for {code} too. The default language is <strong>Java</strong> but you can specify <strong>JavaScript</strong>, <strong>ActionScript</strong>, <strong>XML</strong>, <strong>HTML</strong> and <strong>SQL</strong> too.</p></blockquote>
<p>I’d really like a Confluence plugin that used the <a onclick="javascript:pageTracker._trackPageview('/outbound/article/http://code.google.com/p/google-code-prettify/');" href="http://code.google.com/p/google-code-prettify/" onclick="javascript:pageTracker._trackPageview('/http://code.google.com/p/google-code-prettify/');">Google Code Prettify</a> javascript code. These seem like obvious things to mate together, since you wouldn’t have to worry about implementing new languages.  Quite often, I write psuedo code in the wiki and the JS code does a decent job of figuring it out. I searched Google for <a onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.google.com/search?q=confluence+google-code-prettify');" href="http://www.google.com/search?q=confluence+google-code-prettify" onclick="javascript:pageTracker._trackPageview('/http://www.google.com/search?q=confluence+google-code-prettify');">confluence google-code-prettify</a>, since someone must have built a plugin already. The results <a onclick="javascript:pageTracker._trackPageview('/outbound/article/http://wikis.sun.com/display/DocWeb/Home');" href="http://wikis.sun.com/display/DocWeb/Home" onclick="javascript:pageTracker._trackPageview('/http://wikis.sun.com/display/DocWeb/Home');">were not promising</a>.</p>
<p>Dear Lazy Web, please see what you can do.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.cultofgary.com/2008/11/13/confluence-and-google-code-prettify/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.cultofgary.com/2008/11/13/confluence-and-google-code-prettify/</feedburner:origLink></item>
		<item>
		<title>Atlassian Bamboo and Perl Test Harness</title>
		<link>http://feedproxy.google.com/~r/TheCultOfGary/~3/78Q8JA5NrI4/</link>
		<comments>http://www.cultofgary.com/2008/11/07/atlassian-bamboo-and-perl-test-harness/#comments</comments>
		<pubDate>Fri, 07 Nov 2008 22:02:38 +0000</pubDate>
		<dc:creator>gary.richardson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[atlassian]]></category>
		<category><![CDATA[bamboo]]></category>
		<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://www.cultofgary.com/2008/11/07/atlassian-bamboo-and-perl-test-harness/</guid>
		<description><![CDATA[At my current gig, we use Atlassian Bamboo as a Continuous Integration server. It plugs into the rest of our Atlassian tools, which is nice.
It took me a bit to get my perl test cases to work with it, but with the help of TAP::Harness::JUnit, I finally got it to work. It&#8217;s really easy too:

Install [...]]]></description>
			<content:encoded><![CDATA[<p>At my current gig, we use <a href="http://www.atlassian.com/software/bamboo/" onclick="javascript:pageTracker._trackPageview('/http://www.atlassian.com/software/bamboo/');">Atlassian Bamboo</a> as a Continuous Integration server. It plugs into the rest of our Atlassian tools, which is nice.</p>
<p>It took me a bit to get my perl test cases to work with it, but with the help of <a href="http://search.cpan.org/~lkundrak/TAP-Harness-JUnit-0.24/lib/TAP/Harness/JUnit.pm" onclick="javascript:pageTracker._trackPageview('/http://search.cpan.org/~lkundrak/TAP-Harness-JUnit-0.24/lib/TAP/Harness/JUnit.pm');">TAP::Harness::JUnit</a>, I finally got it to work. It&#8217;s really easy too:</p>
<ol>
<li>Install TAP::Harness::JUnit</li>
<li>Put the following script into you code repository. Put it somewhere that you can call it easily when doing a build.<code><br />
#!/usr/bin/perl<br />
use strict;<br />
use warnings;<br />
use TAP::Harness::JUnit;<br />
my $outputfile = shift;<br />
my $harness = TAP::Harness::JUnit-&gt;new({<br />
xmlfile =&gt; $outputfile,<br />
});<br />
$harness-&gt;runtests(@ARGV);</code></li>
<li>Instead of calling make test for you perl modules, run:<br />
<code>perl $SCRIPTFROMABOVE -Iblib/lib $OUTPUTFILE t/*.t</code></li>
</ol>
<p>$OUTPUTFILE should be an xml file in whatever directory you have configured Bamboo to look in for test reports.</p>
<p>This should work with any CI server that can read JUnit xml output.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cultofgary.com/2008/11/07/atlassian-bamboo-and-perl-test-harness/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.cultofgary.com/2008/11/07/atlassian-bamboo-and-perl-test-harness/</feedburner:origLink></item>
	</channel>
</rss>
