OpenVectorPartyFileForRead : Opens the vector party file at the specified batchVersion for read.
(table string, columnID int, shard, batchID int, batchVersion uint32, seqNum uint32)
| 300 | |
| 301 | // OpenVectorPartyFileForRead : Opens the vector party file at the specified batchVersion for read. |
| 302 | func (l LocalDiskStore) OpenVectorPartyFileForRead(table string, columnID int, shard, batchID int, batchVersion uint32, |
| 303 | seqNum uint32) (io.ReadCloser, error) { |
| 304 | batchIDTimeStr := daysSinceEpochToTimeStr(batchID) |
| 305 | vectorPartyFilePath := GetPathForTableArchiveBatchColumnFile(l.rootPath, table, shard, batchIDTimeStr, batchVersion, |
| 306 | seqNum, columnID) |
| 307 | f, err := os.OpenFile(vectorPartyFilePath, os.O_RDONLY, 0644) |
| 308 | if os.IsNotExist(err) { |
| 309 | return nil, os.ErrNotExist |
| 310 | } else if err != nil { |
| 311 | return nil, utils.StackError(err, "Failed to open vector party file: %s for read", vectorPartyFilePath) |
| 312 | } |
| 313 | return f, nil |
| 314 | } |
| 315 | |
| 316 | // OpenVectorPartyFileForWrite : Creates/truncates the vector party file at the specified batchVersion for write. |
| 317 | func (l LocalDiskStore) OpenVectorPartyFileForWrite(table string, columnID int, shard, batchID int, batchVersion uint32, |
nothing calls this directly
no test coverage detected