修改密码

请输入密码
请输入密码 请输入8-64长度密码 和 email 地址不相同 至少包括数字、大写字母、小写字母、半角符号中的 3 个
请输入密码
提交

修改昵称

当前昵称:
提交

申请证书

证书详情

Please complete this required field.

  • Ultipa Graph V4

Standalone

Please complete this required field.

Please complete this required field.

服务器的MAC地址

Please complete this required field.

Please complete this required field.

取消
申请
ID
产品
状态
核数
申请天数
审批时间
过期时间
MAC地址
申请理由
审核信息
关闭
基础信息
  • 用户昵称:
  • 手机号:
  • 公司名称:
  • 公司邮箱:
  • 地区:
  • 语言:
修改密码
申请证书

当前未申请证书.

申请证书
Certificate Issued at Valid until Serial No. File
Serial No. Valid until File

Not having one? Apply now! >>>

ProductName CreateTime ID Price File
ProductName CreateTime ID Price File

No Invoice

v5.0
搜索
    v5.0

      进程与作业

      本节介绍用于管理进程和作业的方法。

      进程

      top()

      获取数据库中全部正在运行的进程。

      参数

      • config: RequestConfig(可选):请求配置。

      返回值

      • List[Process]:获取的进程列表。

      # Retrieves all running processes in the database
      
      processes = Conn.top()
      for process in processes:
          print(process.processId, "-", process.processQuery)
      

      1049542 - MATCH p = ()->{1,3}() RETURN p LIMIT 5000
      

      kill()

      终止数据库中正在运行的进程。

      参数

      • id: str:进程ID;用*可指定全部正在运行的进程。
      • config: RequestConfig(可选):请求配置。

      返回值

      • Response:请求结果。

      # Retrieves all running processes in the database and kills them all
      
      processes = Conn.top()
      for process in processes:
          response = Conn.kill(process.processId)
          print(process.processId, "-", process.processQuery, "- Kill", response.status.code.name)
      

      1049607 - MATCH p = ()->{1,3}() RETURN p LIMIT 5000 - Kill SUCCESS
      

      作业

      showJob()

      获取图的全部作业。

      参数

      • id: str(可选):作业ID。
      • config: RequestConfig(可选):请求配置。

      返回值

      • List[Job]:获取的作业列表。

      # Retrieves all failed jobs in the graph 'miniCircle'
      
      requestConfig = RequestConfig(graph="miniCircle")
      
      jobs = Conn.showJob(config=requestConfig)
      failed_jobs = [job for job in jobs if job.status == "FAILED"]
      
      if failed_jobs:
          for job in failed_jobs:
              print(job.id, "-", job.type, "-", job.errMsg)
      else:
          print("No failed jobs")
      

      51 - Fulltext name already exists. - CREATE_FULLTEXT
      42 - Fulltext name already exists. - CREATE_FULLTEXT
      26 - [engine] uuids should be unsigned integer - HDC_ALGO
      26_1 -  - HDC_ALGO
      17 - [engine] all failed, because some nodes do not exist in db - HDC_ALGO
      17_1 -  - HDC_ALGO
      

      stopJob()

      停止图中一个正在运行的作业。

      参数

      • id: str:待停止的作业ID。
      • config: RequestConfig(可选):请求配置。

      返回值

      • Response:请求结果。

      # Retrieves all running jobs in the graph 'miniCircle' and stops them all
      
      requestConfig = RequestConfig(graph="miniCircle")
      
      jobs = Conn.showJob(config=requestConfig)
      running_jobs = [job for job in jobs if job.status == "RUNNING"]
      
      for running_job in running_jobs:
          response = Conn.stopJob(running_job.id, requestConfig)
          print(running_job.id, "-", running_job.type, "- Stop", response.status.code.name)
      

      10 - CREATE_FULLTEXT - Stop FAILED
      10_1- CREATE_FULLTEXT - Stop SUCCESS
      10_2 - CREATE_FULLTEXT - Stop SUCCESS
      

      clearJob()

      清除图中一个非正在运行的作业。

      参数

      • id: str:待清除的作业ID。
      • config: RequestConfig(可选):请求配置。

      返回值

      • Response:请求结果。

      # Retrieves all failed jobs in the graph 'miniCircle' and clears them all
      
      requestConfig = RequestConfig(graph="miniCircle")
      
      jobs = Conn.showJob(config=requestConfig)
      failed_jobs = [job for job in jobs if job.status == "FAILED"]
      
      if failed_jobs:
          for job in failed_jobs:
              response = Conn.clearJob(job.id, requestConfig)
              print("Clear", job.id, response.status.code.name)
      else:
          print("No failed jobs")
      

      Clear 51 SUCCESS
      Clear 42 SUCCESS
      Clear 26 SUCCESS
      Clear 26_1 SUCCESS
      Clear 17 SUCCESS
      Clear 17_1 SUCCESS
      

      完整示例

      from ultipa import UltipaConfig, Connection, RequestConfig
      
      ultipaConfig = UltipaConfig()
      # URI example: ultipaConfig.hosts = ["https://mqj4zouys.us-east-1.cloud.ultipa.com:60010"]
      ultipaConfig.hosts = ["192.168.1.85:60061", "192.168.1.87:60061", "192.168.1.88:60061"]
      ultipaConfig.username = "<username>"
      ultipaConfig.password = "<password>"
      
      Conn = Connection.NewConnection(defaultConfig=ultipaConfig)
      
      # Retrieves all failed jobs in the graph 'miniCircle'
      
      requestConfig = RequestConfig(graph="miniCircle")
      
      jobs = Conn.showJob(config=requestConfig)
      failed_jobs = [job for job in jobs if job.status == "FAILED"]
      
      if failed_jobs:
          for job in failed_jobs:
              print(job.id, "-", job.type, "-", job.errMsg)
      else:
          print("No failed jobs")
      
      请完成以下信息后可下载此书
      *
      公司名称不能为空
      *
      公司邮箱必须填写
      *
      你的名字必须填写
      *
      你的电话必须填写
      *
      你的电话必须填写