Attempts to find the UID matching a given name @param type The type of UID @param name The name to search for @throws IllegalArgumentException if the type is not valid @throws NoSuchUniqueName if the name was not found @since 2.1
(final UniqueIdType type, final String name)
| 694 | * @since 2.1 |
| 695 | */ |
| 696 | public Deferred<byte[]> getUIDAsync(final UniqueIdType type, final String name) { |
| 697 | if (name == null || name.isEmpty()) { |
| 698 | throw new IllegalArgumentException("Missing UID name"); |
| 699 | } |
| 700 | switch (type) { |
| 701 | case METRIC: |
| 702 | return metrics.getIdAsync(name); |
| 703 | case TAGK: |
| 704 | return tag_names.getIdAsync(name); |
| 705 | case TAGV: |
| 706 | return tag_values.getIdAsync(name); |
| 707 | default: |
| 708 | throw new IllegalArgumentException("Unrecognized UID type"); |
| 709 | } |
| 710 | } |
| 711 | |
| 712 | /** |
| 713 | * Verifies that the data and UID tables exist in HBase and optionally the |
no test coverage detected