@Test public void testGetTSDRLogKeyWithTimeStamp() { String key = FormatUtil.getTSDRLogKeyWithTimeStamp(createLogRecord()); List<RecordKeys> list = FormatUtil.getRecordKeysFromTSDRKey(key); Assert.assertEquals(list.size(), 1); Assert.assertEquals("Test2", list.get(0).getKeyName()); }
public static String getTSDRLogKeyWithTimeStamp(TSDRLog log) { StringBuilder sb = new StringBuilder(getTSDRLogKey(log)); sb.append(KEY_TIMESTAMP); sb.append(log.getTimeStamp()); sb.append("]"); return sb.toString(); }
FormatUtil { public static String getTSDRLogKeyWithTimeStamp(TSDRLog log) { StringBuilder sb = new StringBuilder(getTSDRLogKey(log)); sb.append(KEY_TIMESTAMP); sb.append(log.getTimeStamp()); sb.append("]"); return sb.toString(); } }
FormatUtil { public static String getTSDRLogKeyWithTimeStamp(TSDRLog log) { StringBuilder sb = new StringBuilder(getTSDRLogKey(log)); sb.append(KEY_TIMESTAMP); sb.append(log.getTimeStamp()); sb.append("]"); return sb.toString(); } private  FormatUtil(); }
FormatUtil { public static String getTSDRLogKeyWithTimeStamp(TSDRLog log) { StringBuilder sb = new StringBuilder(getTSDRLogKey(log)); sb.append(KEY_TIMESTAMP); sb.append(log.getTimeStamp()); sb.append("]"); return sb.toString(); } private  FormatUtil(); static boolean isDataCategory(String str); static boolean isDataCategoryKey(String tsdrKey); static String getFormattedTimeStamp(long timestamp, String formatString); static String getTSDRLogKeyWithTimeStamp(TSDRLog log); static String getTSDRLogKey(TSDRLog log); static String getTSDRBinaryKey(TSDRBinaryRecord record); static boolean isValidTSDRKey(String str); static boolean isValidTSDRLogKey(String str); static String getDataCategoryFromTSDRKey(String tsdrKey); static Long getTimeStampFromTSDRKey(String tsdrKey); static String getMetriNameFromTSDRKey(String tsdrKey); static String getNodeIdFromTSDRKey(String tsdrKey); static List<RecordKeys> getRecordKeysFromTSDRKey(String tsdrKey); static List<RecordAttributes> getRecordAttributesFromTSDRKey(String tsdrKey); static String getTSDRMetricKeyWithTimeStamp(TSDRMetric metric); static String getTSDRLogKeyWithRecordAttributes(TSDRLog log); static String getTSDRMetricKey(TSDRMetric metric); static BigDecimal toMetricValue(Counter32 counter32); static BigDecimal toMetricValue(Counter64 counter64); static BigDecimal toMetricValue(BigInteger bigInteger); static String getFixedFormatString(String value, long length); }
FormatUtil { public static String getTSDRLogKeyWithTimeStamp(TSDRLog log) { StringBuilder sb = new StringBuilder(getTSDRLogKey(log)); sb.append(KEY_TIMESTAMP); sb.append(log.getTimeStamp()); sb.append("]"); return sb.toString(); } private  FormatUtil(); static boolean isDataCategory(String str); static boolean isDataCategoryKey(String tsdrKey); static String getFormattedTimeStamp(long timestamp, String formatString); static String getTSDRLogKeyWithTimeStamp(TSDRLog log); static String getTSDRLogKey(TSDRLog log); static String getTSDRBinaryKey(TSDRBinaryRecord record); static boolean isValidTSDRKey(String str); static boolean isValidTSDRLogKey(String str); static String getDataCategoryFromTSDRKey(String tsdrKey); static Long getTimeStampFromTSDRKey(String tsdrKey); static String getMetriNameFromTSDRKey(String tsdrKey); static String getNodeIdFromTSDRKey(String tsdrKey); static List<RecordKeys> getRecordKeysFromTSDRKey(String tsdrKey); static List<RecordAttributes> getRecordAttributesFromTSDRKey(String tsdrKey); static String getTSDRMetricKeyWithTimeStamp(TSDRMetric metric); static String getTSDRLogKeyWithRecordAttributes(TSDRLog log); static String getTSDRMetricKey(TSDRMetric metric); static BigDecimal toMetricValue(Counter32 counter32); static BigDecimal toMetricValue(Counter64 counter64); static BigDecimal toMetricValue(BigInteger bigInteger); static String getFixedFormatString(String value, long length); static final String QUERY_TIMESTAMP; static final String COMMAND_OUT_TIMESTAMP; static final String KEY_NODEID; static final String KEY_CATEGORY; static final String KEY_METRICNAME; static final String KEY_RECORDKEYS; static final String KEY_TIMESTAMP; static final String KEY_RECORD_ATTRIBUTES; }