jetstream-api 0.15.0__tar.gz → 0.17.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {jetstream_api-0.15.0/jetstream_api.egg-info → jetstream_api-0.17.0}/PKG-INFO +56 -1
- jetstream_api-0.15.0/PKG-INFO → jetstream_api-0.17.0/README.md +854 -849
- {jetstream_api-0.15.0 → jetstream_api-0.17.0}/ilink/__init__.py +1 -1
- {jetstream_api-0.15.0 → jetstream_api-0.17.0}/ilink/admin.py +65 -57
- {jetstream_api-0.15.0 → jetstream_api-0.17.0}/ilink/common.py +1228 -1226
- {jetstream_api-0.15.0 → jetstream_api-0.17.0}/ilink/exception.py +14 -1
- {jetstream_api-0.15.0 → jetstream_api-0.17.0}/ilink/producer.py +4 -0
- {jetstream_api-0.15.0 → jetstream_api-0.17.0}/ilink/properties.py +6095 -5692
- {jetstream_api-0.15.0 → jetstream_api-0.17.0}/ilink/util.py +539 -507
- jetstream_api-0.15.0/README.md → jetstream_api-0.17.0/jetstream_api.egg-info/PKG-INFO +904 -799
- {jetstream_api-0.15.0 → jetstream_api-0.17.0}/pyproject.toml +1 -1
- {jetstream_api-0.15.0 → jetstream_api-0.17.0}/LICENSE.txt +0 -0
- {jetstream_api-0.15.0 → jetstream_api-0.17.0}/ilink/_codec.py +0 -0
- {jetstream_api-0.15.0 → jetstream_api-0.17.0}/ilink/admintopic.py +0 -0
- {jetstream_api-0.15.0 → jetstream_api-0.17.0}/ilink/connectivity.py +0 -0
- {jetstream_api-0.15.0 → jetstream_api-0.17.0}/ilink/msg.py +0 -0
- {jetstream_api-0.15.0 → jetstream_api-0.17.0}/ilink/partitioner.py +0 -0
- {jetstream_api-0.15.0 → jetstream_api-0.17.0}/ilink/pattern.py +0 -0
- {jetstream_api-0.15.0 → jetstream_api-0.17.0}/ilink/py.typed +0 -0
- {jetstream_api-0.15.0 → jetstream_api-0.17.0}/ilink/qmgr.py +0 -0
- {jetstream_api-0.15.0 → jetstream_api-0.17.0}/ilink/topic.py +0 -0
- {jetstream_api-0.15.0 → jetstream_api-0.17.0}/jetstream_api.egg-info/SOURCES.txt +0 -0
- {jetstream_api-0.15.0 → jetstream_api-0.17.0}/jetstream_api.egg-info/dependency_links.txt +0 -0
- {jetstream_api-0.15.0 → jetstream_api-0.17.0}/jetstream_api.egg-info/requires.txt +0 -0
- {jetstream_api-0.15.0 → jetstream_api-0.17.0}/jetstream_api.egg-info/top_level.txt +0 -0
- {jetstream_api-0.15.0 → jetstream_api-0.17.0}/setup.cfg +0 -0
- {jetstream_api-0.15.0 → jetstream_api-0.17.0}/tests/test_example.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: jetstream-api
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.17.0
|
|
4
4
|
Summary: Python client API for iLink M.O.M. (Message Oriented Middleware)
|
|
5
5
|
Author: snowjeans
|
|
6
6
|
License: Boost Software License - Version 1.0 - August 17th, 2003
|
|
@@ -60,6 +60,61 @@ lz4 배치 압축을 쓰려면 `pip install "jetstream-api[lz4]"`, zstd 배치
|
|
|
60
60
|
## 설치 방법
|
|
61
61
|
pip install jetstream-api
|
|
62
62
|
|
|
63
|
+
## 0.17.0 변경 - 클러스터 API 를 컨트롤러 정족수 모델로 (자바 v2.13.0 과 같음, 엔진은 해당 판 이상)
|
|
64
|
+
|
|
65
|
+
판사 · MAIN · SUB 세 정의를 각각 만들던 모델이 **없어졌습니다.** 이제 클러스터 하나에 정의 하나이고, 그 안에 **노드 전부**를 적습니다. 역할은 정의의 종류가 아니라 **노드의 성질**입니다 - 큐 관리자가 있으면 브로커, `coordinator` 를 세우면 컨트롤러이고, 둘은 **겹칠 수 있습니다.**
|
|
66
|
+
|
|
67
|
+
```python
|
|
68
|
+
c = ILClusterProperty("C1")
|
|
69
|
+
c.nodes = [
|
|
70
|
+
ILClusterNode("QM1", "10.10.1.12", 12345, 9000, node_id=1),
|
|
71
|
+
ILClusterNode("QM2", "10.10.1.13", 12345, 9000, node_id=2),
|
|
72
|
+
ILClusterNode("QM3", "10.10.1.14", 12345, 9000, node_id=3),
|
|
73
|
+
]
|
|
74
|
+
for n in c.nodes:
|
|
75
|
+
n.coordinator = True # ilsc 의 COORDS(1,2,3)
|
|
76
|
+
svc.createCluster(c)
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
- **컨트롤러 포트가 노드마다 하나입니다**(`ILClusterNode.ctrlPort`). 클러스터 한 개에 하나였던 `ilccPort` 는 없어졌습니다.
|
|
80
|
+
- **노드 번호(`nodeId`)는 자리 이름이지 위치가 아닙니다.** 노드를 지우면 번호에 구멍이 남고 메우지 않습니다 - `nodes[n-1]` 로 찾지 말고 `getNode(n)` 을 쓰십시오.
|
|
81
|
+
- 큐 관리자 없이 투표만 하는 노드를 만들 수 있습니다: `ILClusterNode(None, "10.10.1.15", 0, 9000, node_id=4)`.
|
|
82
|
+
- `getBrokerNodes()` / `getControllerNodes()` / `getNode(n)` / `ILClusterNode.getRoles()` 가 새로 있습니다.
|
|
83
|
+
- **`coordinator` 는 참/거짓이 아니라 세 상태입니다** - `True`(맞다) / `False`(아니다) / `None`(**모름**). `is None` 으로 먼저 가르십시오. `isCoordinator()` 도 세 값을 그대로 줍니다.
|
|
84
|
+
- **`replicas` / `minSync` 는 비워 두는 것이 기본이고, 비운 채로 왕복합니다.** 비우면 엔진이 **브로커 역할 노드 전부**를 복제본 수로 치므로 노드를 더하면 따라 늘어납니다. 숫자를 명시하면 그 진술이 고정되어 노드를 더할 때 같이 고쳐 보내야 합니다. **`0` 은 정상값이고 "안 정함" 은 `None` 뿐입니다** - `if not p.replicas` 로 판정하지 마십시오.
|
|
85
|
+
- ☠ **`minSync` 는 Kafka 의 `min.insync.replicas` 와 이름만 같고 계약이 다릅니다.** ISR 이 이 아래로 떨어져도 **쓰기를 거절하지 않습니다** - 가용성을 택하고 내구성을 내립니다.
|
|
86
|
+
- **`setClusterProperty` 는 읽어서 고쳐 되보내십시오.** 정의에는 클라이언트가 읽기만 하는 자리(`clusterId` · `signature` · `(defTerm, defVersion)`)가 있고, `getClusterProperty` 로 받은 객체가 그 바이트를 그대로 들고 있습니다. 새로 만든 객체로 ALTER 하면 그 자리가 빈칸으로 나갑니다.
|
|
87
|
+
- **`createCluster` 는 더 이상 클라이언트에서 규칙을 미리 검사하지 않습니다.** 규칙은 엔진이 정본이고, 클라이언트에 한 벌 더 적으면 두 벌이 갈립니다(옛 `TYPE` 사전검사가 그 경로로 생겼습니다).
|
|
88
|
+
- 와이어 레이아웃이 바뀌었습니다 - 고정부 512 → **768**, 노드 256 → **384**(`ILC.MIMQ_VO_CLUSTER_LEN` / `MIMQ_VO_CLUSTER_NODE_LEN`). 블롭 앞머리에 판 표시 `"V2"` 가 붙고, **표시가 없는 옛 블롭은 거절합니다**(길이로는 가릴 수 없습니다 - 옛 512+5+256 과 새 768+5+0 이 둘 다 773 입니다).
|
|
89
|
+
- **없어진 이름**: `ILClusterProperty.judge()` · `ILClusterProperty.coordinator()`(클래스 메서드) · `clusterType` / `getClusterType` / `setClusterType` · `ilccPort` / `getIlccPort` / `setIlccPort`(클러스터와 노드 양쪽) · `authorityHolder` / `getAuthorityHolder` / `getAuthorityHolderType` · `isJudge` · `ILClusterNode.get_ilcc_address` / `getIlccAddress` · `ILClusterProperty(name, ilcc_port, is_auto_start, cluster_type)` 의 `ilcc_port` · `cluster_type` 인자.
|
|
90
|
+
없어진 이름에 **대입하면** 무엇으로 바뀌었는지까지 알려 주는 `AttributeError` 가 납니다.
|
|
91
|
+
|
|
92
|
+
## 0.16.0 변경 - 세그먼트 이름을 토픽과 같은 형식으로, 오타 대입 거부 (자바 v2.12.0 과 같음)
|
|
93
|
+
|
|
94
|
+
- **이름 규칙이 정해졌습니다 - 개수는 맨 복수형, 목록은 `...List` 접미.** 토픽이 `partitions` 를 쓰는 형식 그대로입니다.
|
|
95
|
+
0.15.0 이 하루 쓴 이름 둘을 여기로 옮깁니다.
|
|
96
|
+
|
|
97
|
+
| 자리 | 0.15.0 | **0.16.0** |
|
|
98
|
+
|---|---|---|
|
|
99
|
+
| 세그먼트 **개수** (`ILQueueProperty`) | `numberOfSegment` | **`segments`** |
|
|
100
|
+
| 세그먼트 **목록** (`ILQueueRealTimeInfo`) | `segments` | **`segmentInfoList`** |
|
|
101
|
+
|
|
102
|
+
- ★ **0.15.0 의 두 이름은 남기지 않고 지웠습니다.** 남기면 개수에 이름이 셋이 되고, 더 나쁘게는 `segments` 가
|
|
103
|
+
클래스마다 다른 뜻(개수 vs 목록)이 됩니다. 0.15.0 은 하루짜리였고, 아래 가드 덕분에 **지운 것이 조용하지 않습니다.**
|
|
104
|
+
- **`numberOfPartition` 과 `partitions` 는 그대로 있습니다.** 예전부터 쓰던 이름이라 영구 별칭으로 남습니다.
|
|
105
|
+
- 큐에 진짜 분산 파티션이 생기면 그 수는 **토픽과 같은 이름(`partitions`)** 으로 따로 들어옵니다. 지금 있는 이름을
|
|
106
|
+
그쪽으로 돌리지 않습니다 - **재사용은 제거보다 나쁩니다.** 제거는 그 자리에서 터지지만 재사용은 조용히 다른 값을 줍니다.
|
|
107
|
+
- **속성 객체가 모르는 필드 이름 대입을 거부합니다.** 지금까지는 `prop.numberOfSegmnet = 4` 같은 오타가 **예외도 없이**
|
|
108
|
+
쓰레기 속성을 만들고 실제 값은 그대로였습니다 - 읽기는 원래 `AttributeError` 였는데 **쓰기만 침묵**해서 옛 값이 그대로
|
|
109
|
+
서버로 나갔습니다.
|
|
110
|
+
- 이름이 바뀐 필드는 **무엇으로 바뀌었는지까지** 알려 줍니다:
|
|
111
|
+
`AttributeError: ILQueueProperty has no attribute numberOfSegment - 0.16.0 에서 segments 로 바뀌었다`
|
|
112
|
+
- 정말 임의 속성을 얹어야 하면 `object.__setattr__(obj, name, value)` 로 우회할 수 있습니다. 그 값은 **와이어에 실리지
|
|
113
|
+
않습니다.**
|
|
114
|
+
- 생성자가 도는 동안은 열려 있습니다(필드를 만들어야 하므로). 상속해 쓰는 응용도 `super().__init__()` 뒤에 자기 필드를
|
|
115
|
+
만들 수 있습니다.
|
|
116
|
+
- **와이어는 달라지지 않습니다.** 0.15.0 과 바이트가 같습니다(큐 속성 2200 · 구엔진 4096 · 실시간정보). 이 판도 엔진 판을 가리지 않습니다.
|
|
117
|
+
|
|
63
118
|
## 0.15.0 변경 - 큐의 "파티션" 이 "세그먼트" 가 됩니다 (자바 v2.11.0 과 같음)
|
|
64
119
|
|
|
65
120
|
- **`ILQueueProperty.numberOfPartition` 이 `numberOfSegment` 로 바뀝니다.** 값도 자리도 그대로이고 **이름만** 바뀝니다.
|