import sys, os
import shlex, subprocess

def hdfs_fetch_file(hdfs_path, local_path):
  print "Getting %s..."
  command = "hadoop fs -get %s %s" % (hdfs_path, local_path)
  subprocess.call(shlex.split(command))
  print "Done getting %s..."

def hdfs_push_file(local_path, hdfs_path):
  print "Putting %s..."
  command = "hadoop fs -put %s %s" % (local_path, hdfs_path)
  subprocess.call(shlex.split(command))
  print "Done putting %s..."

import sys, os
import shlex, subprocess
import time

def hdfs_fetch_file(hdfs_path, local_path):
  print "Getting %s..." % (hdfs_path)
  start = time.time()
  command = "hadoop fs -get %s %s" % (hdfs_path, local_path)
  subprocess.call(shlex.split(command))
  end = time.time()
  print "Done getting %s, took %d seconds" % (hdfs_path, end - start)

def hdfs_push_file(local_path, hdfs_path):
  print "Putting %s..." % (local_path)
  start = time.time()
  command = "hadoop fs -put %s %s" % (local_path, hdfs_path)
  subprocess.call(shlex.split(command))
  end = time.time()
  print "Done putting %s, took %d seconds" % (local_path, end - start)

Add some timing and fix debug output from HDFS client.
Add some timing and fix debug output from HDFS client.
