Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
try:
from mooncake import MooncakeDistributedStore, ReplicateConfig
except ImportError:
logger.warning("Mooncake not available, MooncakeOmniConnector will not work")
MooncakeDistributedStore = None
ReplicateConfig = None

Expand All @@ -24,8 +23,11 @@ class MooncakeConnector(OmniConnectorBase):
"""Mooncake-based distributed connector for OmniConnector."""

def __init__(self, config: dict[str, Any]):
if MooncakeDistributedStore is None:
raise ImportError("Mooncake not available")
if MooncakeDistributedStore is None or ReplicateConfig is None:
raise ImportError(
"Mooncake components (MooncakeDistributedStore/ReplicateConfig) are not available. "
"Please ensure the 'mooncake' package is installed in your environment."
)

self.config = config
self.host = config.get("host", "127.0.0.1")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,20 @@
try:
from datasystem.kv_client import KVClient, SetParam, WriteMode
except ImportError:
logger.warning("Datasystem not available, YuanrongConnector will not work")
KVClient = None
SetParam = None
WriteMode = None


class YuanrongConnector(OmniConnectorBase):
"""Datasystem-based distributed connector for OmniConnector."""

def __init__(self, config: dict[str, Any]):
if KVClient is None:
raise ImportError("Datasystem not available")
if KVClient is None or SetParam is None or WriteMode is None:
raise ImportError(
"Datasystem components (KVClient/SetParam/WriteMode) are not available. "
"Please ensure the 'datasystem' package is installed in your environment."
)

self.config = config
self.client = None
Expand Down