Skip to content

Commit 1d118e9

Browse files
authored
fix(coordinator): Minor fix for coordinator (#4331)
Some minor bug fix for coordinator.
1 parent c3e9e21 commit 1d118e9

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

charts/graphscope-store/templates/portal/statefulset.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ spec:
115115
value: {{ .Values.portal.runtimePath | quote }}
116116
- name: STUDIO_WRAPPER_ENDPOINT
117117
value: {{ .Values.portal.studioWrapperEndpoint | quote }}
118+
- name: BASEID
119+
value: {{ .Values.portal.baseId | quote }}
118120
- name: SOLUTION
119121
value: "GRAPHSCOPE_INSIGHT"
120122
{{- range $key, $value := .Values.env }}

charts/graphscope-store/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,9 @@ portal:
295295
## Request for data loading
296296
##
297297
studioWrapperEndpoint: ""
298+
##
299+
## baseId is the id used for creating odps dataloading job
300+
baseId: ""
298301
## @param hostIPC Specify if host IPC should be enabled for pods
299302
##
300303
hostIPC: false

coordinator/gscoordinator/flex/core/insight/job.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import datetime
2020
import http.client
2121
import json
22+
import logging
2223
import time
2324
import urllib.parse
2425

@@ -35,6 +36,7 @@
3536
from gscoordinator.flex.core.utils import encode_datetime
3637
from gscoordinator.flex.models import JobStatus
3738

39+
logger = logging.getLogger("graphscope")
3840

3941
class FetchDataloadingJobStatus(object):
4042
def __init__(self, graph, status: JobStatus):
@@ -307,12 +309,14 @@ def run(self):
307309
json.dumps(configini),
308310
headers={"Content-type": "application/json"},
309311
)
310-
r = conn.getresponse()
311-
if r.status > 400 and r.status < 600:
312+
resp = conn.getresponse()
313+
data = resp.read().decode("utf-8")
314+
if resp.status != 200:
315+
logger.error("Failed to submit dataloading job, code: ", resp.status, ", data: ", data)
312316
raise RuntimeError(
313-
"Failed to submit dataloading job: " + r.read().decode("utf-8")
317+
"Failed to submit dataloading job, code: ", resp.status, ", data: ", data
314318
)
315-
rlt = json.loads(r.read().decode("utf-8"))
319+
rlt = json.loads(data)
316320
if rlt["success"]:
317321
self._jobid = rlt["data"]
318322
status = self.generate_job_status(
@@ -325,6 +329,7 @@ def run(self):
325329
log=rlt["message"],
326330
)
327331
except Exception as e:
332+
logger.error("Exception occured: ", str(e))
328333
status = self.generate_job_status(
329334
status="FAILED", end_time=datetime.datetime.now(), log=str(e)
330335
)

0 commit comments

Comments
 (0)