Skip to content

Commit

Permalink
Update thrift files (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aiee committed Apr 25, 2022
1 parent 4c4f2be commit 9b33922
Show file tree
Hide file tree
Showing 11 changed files with 4,676 additions and 5,614 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This repository holds the official Python API for Nebula Graph.

## Before you start

Before you start, please read this section to choose the right branch for you. The compatibility between the API and Nebula Graph service can be found in [How to choose nebula-python](##How-to-choose-nebula-python). The current master branch is compatible with Nebula Graph 3.0.
Before you start, please read this section to choose the right branch for you. The compatibility between the API and Nebula Graph service can be found in [How to choose nebula-python](##How-to-choose-nebula-python). The current master branch is compatible with Nebula Graph 3.1.

## The directory structure

Expand Down Expand Up @@ -148,6 +148,7 @@ while resp.has_next():
| 2.5.0 | 2.5.0 |
| 2.6.0 | 2.6.0/2.6.1 |
| 3.0.0 | 3.0.0 |
| 3.1.0 | 3.1.0 |
| master | master |

## How to contribute to nebula-python
Expand Down
15 changes: 12 additions & 3 deletions nebula3/common/ttypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ class ErrorCode:
E_JOB_NOT_FINISHED = -2048
E_TASK_REPORT_OUT_DATE = -2049
E_JOB_NOT_IN_SPACE = -2050
E_JOB_NEED_RECOVER = -2051
E_INVALID_JOB = -2065
E_BACKUP_BUILDING_INDEX = -2066
E_BACKUP_SPACE_NOT_FOUND = -2067
Expand Down Expand Up @@ -245,11 +246,12 @@ class ErrorCode:
E_OUTDATED_EDGE = -3072
E_WRITE_WRITE_CONFLICT = -3073
E_CLIENT_SERVER_INCOMPATIBLE = -3061
E_WORKER_ID_FAILED = -3062
E_ID_FAILED = -3062
E_RAFT_UNKNOWN_PART = -3500
E_RAFT_LOG_GAP = -3501
E_RAFT_LOG_STALE = -3502
E_RAFT_TERM_OUT_OF_DATE = -3503
E_RAFT_UNKNOWN_APPEND_LOG = -3504
E_RAFT_WAITING_SNAPSHOT = -3511
E_RAFT_SENDING_SNAPSHOT = -3512
E_RAFT_INVALID_PEER = -3513
Expand All @@ -266,6 +268,7 @@ class ErrorCode:
E_RAFT_WRITE_BLOCKED = -3528
E_RAFT_BUFFER_OVERFLOW = -3529
E_RAFT_ATOMIC_OP_FAILED = -3530
E_LEADER_LEASE_FAILED = -3531
E_UNKNOWN = -8000

_VALUES_TO_NAMES = {
Expand Down Expand Up @@ -344,6 +347,7 @@ class ErrorCode:
-2048: "E_JOB_NOT_FINISHED",
-2049: "E_TASK_REPORT_OUT_DATE",
-2050: "E_JOB_NOT_IN_SPACE",
-2051: "E_JOB_NEED_RECOVER",
-2065: "E_INVALID_JOB",
-2066: "E_BACKUP_BUILDING_INDEX",
-2067: "E_BACKUP_SPACE_NOT_FOUND",
Expand Down Expand Up @@ -392,11 +396,12 @@ class ErrorCode:
-3072: "E_OUTDATED_EDGE",
-3073: "E_WRITE_WRITE_CONFLICT",
-3061: "E_CLIENT_SERVER_INCOMPATIBLE",
-3062: "E_WORKER_ID_FAILED",
-3062: "E_ID_FAILED",
-3500: "E_RAFT_UNKNOWN_PART",
-3501: "E_RAFT_LOG_GAP",
-3502: "E_RAFT_LOG_STALE",
-3503: "E_RAFT_TERM_OUT_OF_DATE",
-3504: "E_RAFT_UNKNOWN_APPEND_LOG",
-3511: "E_RAFT_WAITING_SNAPSHOT",
-3512: "E_RAFT_SENDING_SNAPSHOT",
-3513: "E_RAFT_INVALID_PEER",
Expand All @@ -413,6 +418,7 @@ class ErrorCode:
-3528: "E_RAFT_WRITE_BLOCKED",
-3529: "E_RAFT_BUFFER_OVERFLOW",
-3530: "E_RAFT_ATOMIC_OP_FAILED",
-3531: "E_LEADER_LEASE_FAILED",
-8000: "E_UNKNOWN",
}

Expand Down Expand Up @@ -492,6 +498,7 @@ class ErrorCode:
"E_JOB_NOT_FINISHED": -2048,
"E_TASK_REPORT_OUT_DATE": -2049,
"E_JOB_NOT_IN_SPACE": -2050,
"E_JOB_NEED_RECOVER": -2051,
"E_INVALID_JOB": -2065,
"E_BACKUP_BUILDING_INDEX": -2066,
"E_BACKUP_SPACE_NOT_FOUND": -2067,
Expand Down Expand Up @@ -540,11 +547,12 @@ class ErrorCode:
"E_OUTDATED_EDGE": -3072,
"E_WRITE_WRITE_CONFLICT": -3073,
"E_CLIENT_SERVER_INCOMPATIBLE": -3061,
"E_WORKER_ID_FAILED": -3062,
"E_ID_FAILED": -3062,
"E_RAFT_UNKNOWN_PART": -3500,
"E_RAFT_LOG_GAP": -3501,
"E_RAFT_LOG_STALE": -3502,
"E_RAFT_TERM_OUT_OF_DATE": -3503,
"E_RAFT_UNKNOWN_APPEND_LOG": -3504,
"E_RAFT_WAITING_SNAPSHOT": -3511,
"E_RAFT_SENDING_SNAPSHOT": -3512,
"E_RAFT_INVALID_PEER": -3513,
Expand All @@ -561,6 +569,7 @@ class ErrorCode:
"E_RAFT_WRITE_BLOCKED": -3528,
"E_RAFT_BUFFER_OVERFLOW": -3529,
"E_RAFT_ATOMIC_OP_FAILED": -3530,
"E_LEADER_LEASE_FAILED": -3531,
"E_UNKNOWN": -8000,
}

Expand Down
9 changes: 3 additions & 6 deletions nebula3/meta/MetaService-remote
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ from nebula3.fbthrift.remote import Remote
FUNCTIONS = {
'createSpace': Function('createSpace', 'MetaService', 'ExecResp', [('CreateSpaceReq', 'req', 'CreateSpaceReq')]),
'dropSpace': Function('dropSpace', 'MetaService', 'ExecResp', [('DropSpaceReq', 'req', 'DropSpaceReq')]),
'clearSpace': Function('clearSpace', 'MetaService', 'ExecResp', [('ClearSpaceReq', 'req', 'ClearSpaceReq')]),
'getSpace': Function('getSpace', 'MetaService', 'GetSpaceResp', [('GetSpaceReq', 'req', 'GetSpaceReq')]),
'listSpaces': Function('listSpaces', 'MetaService', 'ListSpacesResp', [('ListSpacesReq', 'req', 'ListSpacesReq')]),
'alterSpace': Function('alterSpace', 'MetaService', 'ExecResp', [('AlterSpaceReq', 'req', 'AlterSpaceReq')]),
Expand All @@ -65,12 +66,6 @@ FUNCTIONS = {
'getPartsAlloc': Function('getPartsAlloc', 'MetaService', 'GetPartsAllocResp', [('GetPartsAllocReq', 'req', 'GetPartsAllocReq')]),
'listParts': Function('listParts', 'MetaService', 'ListPartsResp', [('ListPartsReq', 'req', 'ListPartsReq')]),
'getWorkerId': Function('getWorkerId', 'MetaService', 'GetWorkerIdResp', [('GetWorkerIdReq', 'req', 'GetWorkerIdReq')]),
'multiPut': Function('multiPut', 'MetaService', 'ExecResp', [('MultiPutReq', 'req', 'MultiPutReq')]),
'get': Function('get', 'MetaService', 'GetResp', [('GetReq', 'req', 'GetReq')]),
'multiGet': Function('multiGet', 'MetaService', 'MultiGetResp', [('MultiGetReq', 'req', 'MultiGetReq')]),
'remove': Function('remove', 'MetaService', 'ExecResp', [('RemoveReq', 'req', 'RemoveReq')]),
'removeRange': Function('removeRange', 'MetaService', 'ExecResp', [('RemoveRangeReq', 'req', 'RemoveRangeReq')]),
'scan': Function('scan', 'MetaService', 'ScanResp', [('ScanReq', 'req', 'ScanReq')]),
'createTagIndex': Function('createTagIndex', 'MetaService', 'ExecResp', [('CreateTagIndexReq', 'req', 'CreateTagIndexReq')]),
'dropTagIndex': Function('dropTagIndex', 'MetaService', 'ExecResp', [('DropTagIndexReq', 'req', 'DropTagIndexReq')]),
'getTagIndex': Function('getTagIndex', 'MetaService', 'GetTagIndexResp', [('GetTagIndexReq', 'req', 'GetTagIndexReq')]),
Expand Down Expand Up @@ -130,6 +125,8 @@ FUNCTIONS = {
'listCluster': Function('listCluster', 'MetaService', 'ListClusterInfoResp', [('ListClusterInfoReq', 'req', 'ListClusterInfoReq')]),
'getMetaDirInfo': Function('getMetaDirInfo', 'MetaService', 'GetMetaDirInfoResp', [('GetMetaDirInfoReq', 'req', 'GetMetaDirInfoReq')]),
'verifyClientVersion': Function('verifyClientVersion', 'MetaService', 'VerifyClientVersionResp', [('VerifyClientVersionReq', 'req', 'VerifyClientVersionReq')]),
'saveGraphVersion': Function('saveGraphVersion', 'MetaService', 'SaveGraphVersionResp', [('SaveGraphVersionReq', 'req', 'SaveGraphVersionReq')]),
'getSegmentId': Function('getSegmentId', 'MetaService', 'GetSegmentIdResp', [('GetSegmentIdReq', 'req', 'GetSegmentIdReq')]),
}

SERVICE_NAMES = ['MetaService', ]
Expand Down
Loading

0 comments on commit 9b33922

Please sign in to comment.