def init(engine_type, host=None, cert_folder=None, project=None, cert_key=None): global _engine if not _engine: if engine_type == "spark": _engine = spark.Engine() elif engine_type == "hive": _engine = hive.Engine(host, cert_folder, project, cert_key)
def init(engine_type): global _engine_type global _engine if not _engine: if engine_type == "spark": _engine_type = "spark" _engine = spark.Engine() elif engine_type == "hive": try: from hsfs.engine import hive except ImportError: raise exceptions.FeatureStoreException( "Trying to instantiate Hive as engine, but 'hive' extras are " "missing in HSFS installation. Install with `pip install " "hsfs[hive]`.") _engine_type = "hive" _engine = hive.Engine()
def init(engine_type): global _engine_type global _engine if not _engine: if engine_type == "spark": _engine_type = "spark" _engine = spark.Engine() elif engine_type in ["hive", "python", "training"]: try: from hsfs.engine import python except ImportError: raise exceptions.FeatureStoreException( "Trying to instantiate Python as engine, but 'python' extras are " "missing in HSFS installation. Install with `pip install " "hsfs[python]`.") _engine_type = "python" _engine = python.Engine() elif engine_type == "training": _engine = "training"