title: Cascading HBase Tap
body: <p>I am trying to write <a href="https://github.com/twitter/scalding" rel="nofollow">Scalding</a> jobs which have to connect to HBase, but I have trouble using the HBase tap. I have tried using the tap provided by <a href="https://github.com/Cascading/maple" rel="nofollow">Twitter Maple</a>, following <a href="https://github.com/kianwilcox/hbase-scalding" rel="nofollow">this example project</a>, but it seems that there is some incompatibility between the Hadoop/HBase version that I am using and the one that was used as client by Twitter.</p>
  
  <p>My cluster is running <a href="https://ccp.cloudera.com/display/CDH4DOC/CDH4+Documentation" rel="nofollow">Cloudera CDH4</a> with HBase 0.92 and Hadoop 2.0.0-cdh4.1.3. Whenever I launch a Scalding job connecting to HBase, I get the exception</p>
  
  <pre><code>java.lang.NoSuchMethodError: org.apache.hadoop.net.NetUtils.getInputStream(Ljava/net/Socket;)Ljava/io/InputStream;
      at org.apache.hadoop.hbase.ipc.HBaseClient$Connection.setupIOstreams(HBaseClient.java:363)
      at org.apache.hadoop.hbase.ipc.HBaseClient.getConnection(HBaseClient.java:1046)
  ...
  </code></pre>
  
  <p>It seems that the HBase client used by Twitter Maple is expecting some method on <code>NetUtils</code> that does not exist on the version of Hadoop deployed on my cluster.</p>
  
  <blockquote>
    <p>How do I track down what exactly is the mismatch - what version would the HBase client expect and so on? Is there in general a way to mitigate these issues?</p>
  </blockquote>
  
  <p>It seems to me that often client libraries are compiled with hardcoded version of the Hadoop dependencies, and it is hard to make those match the actual versions deployed.</p>