(pid uint64)
| 190 | } |
| 191 | |
| 192 | func (mc *MetaHttpClient) GetMetaPartition(pid uint64) (cursor uint64, err error) { |
| 193 | defer func() { |
| 194 | if err != nil { |
| 195 | log.LogErrorf("action[GetMetaPartition],pid:%v,err:%v", pid, err) |
| 196 | } |
| 197 | }() |
| 198 | request := newAPIRequest(http.MethodGet, "/getPartitionById") |
| 199 | request.params["pid"] = fmt.Sprintf("%v", pid) |
| 200 | respData, err := mc.serveRequest(request) |
| 201 | log.LogInfof("err:%v,respData:%v\n", err, string(respData)) |
| 202 | if err != nil { |
| 203 | return |
| 204 | } |
| 205 | type RstData struct { |
| 206 | Cursor uint64 |
| 207 | } |
| 208 | body := &RstData{} |
| 209 | if err = json.Unmarshal(respData, body); err != nil { |
| 210 | return |
| 211 | } |
| 212 | return body.Cursor, nil |
| 213 | } |
| 214 | |
| 215 | func (mc *MetaHttpClient) GetAllDentry(pid uint64) (dentryMap map[string]*metanode.Dentry, err error) { |
| 216 | defer func() { |
no test coverage detected