MCPcopy Create free account
hub / github.com/OpenTSDB/opentsdb / rowKeyFromTSUID

Method rowKeyFromTSUID

test/core/TestRowKey.java:95–108  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

93 }
94
95 @Test
96 public void rowKeyFromTSUID() throws Exception {
97 final byte[] tsuid = { 0, 0, 1, 0, 0, 1, 0, 0, 2 };
98 byte[] key = { 0, 0, 1, 0x50, (byte) 0xE2, 0x27, 0, 0, 0, 1, 0, 0, 2 };
99 assertArrayEquals(key, RowKey.rowKeyFromTSUID(tsdb, tsuid, 1356998400));
100
101 // zero timestamp
102 key = new byte[] { 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2 };
103 assertArrayEquals(key, RowKey.rowKeyFromTSUID(tsdb, tsuid, 0));
104
105 // negative timestamp; honey badger don't care
106 key = new byte[] { 0, 0, 1, -1, -21, 88, -128, 0, 0, 1, 0, 0, 2 };
107 assertArrayEquals(key, RowKey.rowKeyFromTSUID(tsdb, tsuid, -1356998400));
108 }
109
110 @Test (expected = NullPointerException.class)
111 public void rowKeyFromTSUIDNullTsuid() throws Exception {

Callers

nothing calls this directly

Calls 1

rowKeyFromTSUIDMethod · 0.95

Tested by

no test coverage detected