mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-20 10:41:02 +02:00
kg-manager in place
This commit is contained in:
parent
0cd5340bb1
commit
40c0f84b36
8 changed files with 15 additions and 8 deletions
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
from pulsar.schema import Record, Bytes, String, Array, Long
|
||||
from pulsar.schema import Record, Bytes, String, Array, Long, Boolean
|
||||
from . types import Triple
|
||||
from . topic import topic
|
||||
from . types import Error
|
||||
|
|
|
|||
6
trustgraph-flow/scripts/kg-manager
Normal file
6
trustgraph-flow/scripts/kg-manager
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
from trustgraph.cores import run
|
||||
|
||||
run()
|
||||
|
||||
|
|
@ -96,6 +96,7 @@ setuptools.setup(
|
|||
"scripts/kg-extract-relationships",
|
||||
"scripts/kg-extract-topics",
|
||||
"scripts/kg-store",
|
||||
"scripts/kg-manager",
|
||||
"scripts/librarian",
|
||||
"scripts/metering",
|
||||
"scripts/object-extract-row",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
from .. schema import KnowledgeResponse, Error, Triple
|
||||
from .. knowledge import hash
|
||||
from .. exceptions import RequestError
|
||||
from . table_store import TableStore
|
||||
from .. tables.knowledge import KnowledgeTableStore
|
||||
from . blob_store import BlobStore
|
||||
import base64
|
||||
|
||||
|
|
@ -15,7 +15,7 @@ class KnowledgeManager:
|
|||
keyspace,
|
||||
):
|
||||
|
||||
self.table_store = TableStore(
|
||||
self.table_store = KnowledgeTableStore(
|
||||
cassandra_host, cassandra_user, cassandra_password, keyspace
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
from .. schema import LibrarianRequest, LibrarianResponse, Error, Triple
|
||||
from .. knowledge import hash
|
||||
from .. exceptions import RequestError
|
||||
from . table_store import TableStore
|
||||
from .. tables.library import LibraryTableStore
|
||||
from . blob_store import BlobStore
|
||||
import base64
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import urllib.parse
|
|||
from ... schema import Triples, GraphEmbeddings
|
||||
from ... base import FlowProcessor, ConsumerSpec
|
||||
|
||||
from . table_store import TableStore
|
||||
from ... tables.knowledge import KnowledgeTableStore
|
||||
|
||||
default_ident = "kg-store"
|
||||
|
||||
|
|
@ -50,7 +50,7 @@ class Processor(FlowProcessor):
|
|||
)
|
||||
)
|
||||
|
||||
self.table_store = TableStore(
|
||||
self.table_store = KnowledgeTableStore(
|
||||
cassandra_host = cassandra_host.split(","),
|
||||
cassandra_user = cassandra_user,
|
||||
cassandra_password = cassandra_password,
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import uuid
|
|||
import time
|
||||
import asyncio
|
||||
|
||||
class TableStore:
|
||||
class KnowledgeTableStore:
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
|
|
@ -14,7 +14,7 @@ import uuid
|
|||
import time
|
||||
import asyncio
|
||||
|
||||
class TableStore:
|
||||
class LibraryTableStore:
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
Loading…
Add table
Add a link
Reference in a new issue