def getSliderHbaseVersion(cls): if not cls.HBASE_VER: # eg. 0.98.4.2.2.0.0-2041-hadoop2 HBASE_VER_BUILD = HBase.getVersionFromBuild() # eg. 0.98.4.2.2.0.0 cls.HBASE_VER = HBASE_VER_BUILD[0:14] return cls.HBASE_VER
def getZipFile(cls, version=HBase.getVersionFromBuild(), isRU=False): # download for linux, no download for windows HBASE_VER_BUILD = version if Machine.isWindows(): zipFile = os.path.join( Config.get('slider', 'SLIDER_HOME'), "app-packages", "slider-hbase-app-win-package-%s.zip" % HBASE_VER_BUILD) return zipFile pkg_list = "pkg-list_qe.txt" path = os.path.join(Config.getEnv('ARTIFACTS_DIR'), pkg_list) #pkgUrl = Config.get('slider','APP_PKG_LIST') pkgUrl = Slider.getAppPackageBaseUrl( isRU) + "/slider-app-packages/" + pkg_list util.downloadUrl(pkgUrl, path) with open(path, 'r') as f: for line in f: if line.startswith("hbase_pkg_url="): url = line.strip()[14:] break zipFile = os.path.join( os.getcwd(), "slider-hbase-app-package-%s.zip" % HBASE_VER_BUILD) logger.info("downloading " + url) util.downloadUrl(url, zipFile) return zipFile