7
def wgetPkg(pkgName, crypType):
9
crypFileName= pkgName+'.'+crypType
11
subprocess.call(cmd.split())
13
cmd = ['wget', crypFileName]
16
home = os.path.join(os.path.sep, "home", "sanjar")
17
hdpScript = "hdp_scripts"
18
hdpScriptPath = os.path.join(os.path.sep,home, hdpScript)
19
os.chdir(home); os.mkdir(hdpScript) ; os.chdir(hdpScript)
20
tarfilename="hdp_manual_install_rpm_helper_files-2.1.1.385.tar.gz"
21
wgetPkg("http://public-repo-1.hortonworks.com/HDP/tools/2.1.1.0/hdp_manual_install_rpm_helper_files-2.1.1.385.tar.gz","")
22
if tarfile.is_tarfile(tarfilename):
23
tball = tarfile.open(tarfilename)
24
tball.extractall(hdpScriptPath)
26
print ("Unable to extract Hadoop Tarball ")