@Test public void testGranularityFromStateCol() { Granularity myGranularity = serDes.granularityFromStateCol("metrics_full,1,okay"); Assert.assertNotNull(myGranularity); Assert.assertEquals(myGranularity, Granularity.FULL); myGranularity = serDes.granularityFromStateCol("FULL"); Assert.assertNull(myGranularity); }
protected static Granularity granularityFromStateCol(String s) { String field = s.split(",", -1)[0]; for (Granularity g : Granularity.granularities()) if (g.name().startsWith(field)) return g; return null; }
SlotStateSerDes { protected static Granularity granularityFromStateCol(String s) { String field = s.split(",", -1)[0]; for (Granularity g : Granularity.granularities()) if (g.name().startsWith(field)) return g; return null; } }
SlotStateSerDes { protected static Granularity granularityFromStateCol(String s) { String field = s.split(",", -1)[0]; for (Granularity g : Granularity.granularities()) if (g.name().startsWith(field)) return g; return null; }  }
SlotStateSerDes { protected static Granularity granularityFromStateCol(String s) { String field = s.split(",", -1)[0]; for (Granularity g : Granularity.granularities()) if (g.name().startsWith(field)) return g; return null; }  static SlotState deserialize(String stateStr); String serialize(SlotState state); String serialize(Granularity gran, int slot, UpdateStamp.State state); }
SlotStateSerDes { protected static Granularity granularityFromStateCol(String s) { String field = s.split(",", -1)[0]; for (Granularity g : Granularity.granularities()) if (g.name().startsWith(field)) return g; return null; }  static SlotState deserialize(String stateStr); String serialize(SlotState state); String serialize(Granularity gran, int slot, UpdateStamp.State state);  }