<blockID>+<tenantID>+vParquet
(filename string)
| 895 | |
| 896 | // <blockID>+<tenantID>+vParquet |
| 897 | func parseName(filename string) (uuid.UUID, string, string, error) { |
| 898 | splits := strings.Split(filename, "+") |
| 899 | |
| 900 | if len(splits) != 3 { |
| 901 | return uuid.UUID{}, "", "", fmt.Errorf("unable to parse %s. unexpected number of segments", filename) |
| 902 | } |
| 903 | |
| 904 | // first segment is blockID |
| 905 | id, err := uuid.Parse(splits[0]) |
| 906 | if err != nil { |
| 907 | return uuid.UUID{}, "", "", fmt.Errorf("unable to parse %s. error parsing uuid: %w", filename, err) |
| 908 | } |
| 909 | |
| 910 | // second segment is tenant |
| 911 | tenant := splits[1] |
| 912 | if len(tenant) == 0 { |
| 913 | return uuid.UUID{}, "", "", fmt.Errorf("unable to parse %s. 0 length tenant", filename) |
| 914 | } |
| 915 | |
| 916 | // third segment is version |
| 917 | version := splits[2] |
| 918 | if version != VersionString { |
| 919 | return uuid.UUID{}, "", "", fmt.Errorf("unable to parse %s. unexpected version %s", filename, version) |
| 920 | } |
| 921 | |
| 922 | return id, tenant, version, nil |
| 923 | } |
| 924 | |
| 925 | // rowIterator is used to iterate a parquet file and implement iterIterator |
| 926 | // traces are iterated according to the given row numbers, because there is |