Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable auth for realtime write #2674

Merged
merged 2 commits into from
May 8, 2023
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
2 changes: 1 addition & 1 deletion charts/graphscope-store/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ image:
registry: registry.cn-hongkong.aliyuncs.com
repository: graphscope/graphscope-store
# Overrides the image tag whose default is the chart appVersion.
tag: "0.20.0"
tag: ""
digest: ""
## Specify a imagePullPolicy
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
Expand Down
10 changes: 7 additions & 3 deletions python/graphscope/client/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,20 +154,24 @@ def gremlin(self):
def _get_client_id(self):
if self._client_id is None:
request = write_service_pb2.GetClientIdRequest()
response = self._write_service_stub.getClientId(request)
response = self._write_service_stub.getClientId(
request, metadata=self._metadata
)
self._client_id = response.client_id
return self._client_id

def batch_write(self, request):
request.client_id = self._get_client_id()
response = self._write_service_stub.batchWrite(request)
response = self._write_service_stub.batchWrite(request, metadata=self._metadata)
return response.snapshot_id

def remote_flush(self, snapshot_id, timeout_ms=3000):
request = write_service_pb2.RemoteFlushRequest()
request.snapshot_id = snapshot_id
request.wait_time_ms = timeout_ms
response = self._write_service_stub.remoteFlush(request)
response = self._write_service_stub.remoteFlush(
request, metadata=self._metadata
)
return response.success

def _encode_metadata(self, username, password):
Expand Down