Skip to content

Commit

Permalink
feat: Expose thrift connection configuration to hbase online store co…
Browse files Browse the repository at this point in the history
…nfig

Signed-off-by: Hai Nguyen <[email protected]>
  • Loading branch information
sudohainguyen committed Oct 21, 2023
1 parent 54496f4 commit 9a6ecd3
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple

from happybase import ConnectionPool
from happybase.connection import DEFAULT_TRANSPORT, DEFAULT_PROTOCOL
from pydantic.typing import Literal

from feast import Entity
Expand Down Expand Up @@ -32,6 +33,12 @@ class HbaseOnlineStoreConfig(FeastConfigBaseModel):
connection_pool_size: int = 4
"""Number of connections to Hbase Thrift server to keep in the connection pool"""

protocol: str = DEFAULT_PROTOCOL
"""Protocol used to communicate with Hbase Thrift server"""

transport: str = DEFAULT_TRANSPORT
"""Transport used to communicate with Hbase Thrift server"""


class HbaseOnlineStore(OnlineStore):
"""
Expand Down Expand Up @@ -59,6 +66,8 @@ def _get_conn(self, config: RepoConfig):
host=store_config.host,
port=int(store_config.port),
size=int(store_config.connection_pool_size),
protocol=store_config.protocol,
transport=store_config.transport,
)
return self._conn

Expand Down

0 comments on commit 9a6ecd3

Please sign in to comment.