<blockID>+<tenantID>+vParquet
(filename string)
| 940 | |
| 941 | // <blockID>+<tenantID>+vParquet |
| 942 | func parseName(filename string) (uuid.UUID, string, string, error) { |
| 943 | splits := strings.Split(filename, "+") |
| 944 | |
| 945 | if len(splits) != 3 { |
| 946 | return uuid.UUID{}, "", "", fmt.Errorf("unable to parse %s. unexpected number of segments", filename) |
| 947 | } |
| 948 | |
| 949 | // first segment is blockID |
| 950 | id, err := uuid.Parse(splits[0]) |
| 951 | if err != nil { |
| 952 | return uuid.UUID{}, "", "", fmt.Errorf("unable to parse %s. error parsing uuid: %w", filename, err) |
| 953 | } |
| 954 | |
| 955 | // second segment is tenant |
| 956 | tenant := splits[1] |
| 957 | if len(tenant) == 0 { |
| 958 | return uuid.UUID{}, "", "", fmt.Errorf("unable to parse %s. 0 length tenant", filename) |
| 959 | } |
| 960 | |
| 961 | // third segment is version |
| 962 | version := splits[2] |
| 963 | if version != VersionString { |
| 964 | return uuid.UUID{}, "", "", fmt.Errorf("unable to parse %s. unexpected version %s", filename, version) |
| 965 | } |
| 966 | |
| 967 | return id, tenant, version, nil |
| 968 | } |
| 969 | |
| 970 | // rowIterator is used to iterate a parquet file and implement iterIterator |
| 971 | // traces are iterated according to the given row numbers, because there is |