I am trying to write a function which will run hdfs commands.
I have got this far:
import subprocess
def run_cmd(args_list):
proc = #Here should be the function.
(output, errors) = proc.communicate()
if proc.returncode:
raise RuntimeError('Error running command')
return (output, errors)