Search in sources :

Example 1 with TagIndex

use of com.srotya.sidewinder.core.storage.TagIndex in project sidewinder by srotya.

the class TestPersistentMeasurement method testConstructRowKey.

@Test
public void testConstructRowKey() throws Exception {
    MiscUtils.delete(new File("target/db131/"));
    List<String> tags = Arrays.asList("test=1", "test=2");
    Measurement m = new PersistentMeasurement();
    m.configure(conf, engine, DBNAME, "m1", "target/db131/index", "target/db131/data", metadata, bgTaskPool);
    TagIndex index = m.getTagIndex();
    String encodeTagsToString = m.encodeTagsToString(index, tags);
    String key = m.constructSeriesId(tags, index);
    assertEquals(encodeTagsToString, key);
    m.close();
}
Also used : Measurement(com.srotya.sidewinder.core.storage.Measurement) TagIndex(com.srotya.sidewinder.core.storage.TagIndex) File(java.io.File) Test(org.junit.Test)

Aggregations

Measurement (com.srotya.sidewinder.core.storage.Measurement)1 TagIndex (com.srotya.sidewinder.core.storage.TagIndex)1 File (java.io.File)1 Test (org.junit.Test)1