Factored out RPC/HDFS code as a library