@Test public void testEmptyTagSetting() throws Exception { OpenTSDBMessageFormatter formatter = new OpenTSDBMessageFormatter(ImmutableList.<String>of(), ImmutableMap.<String, String>of()); when(this.mockResult.getValue()).thenReturn("120021"); Iterable<String> strings = formatter.formatResults( ImmutableList.of(this.mockResult), ServerFixtures.dummyServer()); Assert.assertEquals(1, Iterables.size(strings)); Assert.assertTrue( strings.iterator().next().matches("^X-DOMAIN.PKG.CLASS-X\\.X-ATT-X 0 120021 host=[^ ]*$")); }
public Iterable<String> formatResults(Iterable<Result> results, final Server server) { return from(results).transformAndConcat(new Function<Result, List<String>>() { @Override public List<String> apply(Result input) { return formatResult(input, server); } }).toList(); }
OpenTSDBMessageFormatter { public Iterable<String> formatResults(Iterable<Result> results, final Server server) { return from(results).transformAndConcat(new Function<Result, List<String>>() { @Override public List<String> apply(Result input) { return formatResult(input, server); } }).toList(); } }
OpenTSDBMessageFormatter { public Iterable<String> formatResults(Iterable<Result> results, final Server server) { return from(results).transformAndConcat(new Function<Result, List<String>>() { @Override public List<String> apply(Result input) { return formatResult(input, server); } }).toList(); } OpenTSDBMessageFormatter(@Nonnull ImmutableList<String> typeNames,
									@Nonnull ImmutableMap<String, String> tags);  OpenTSDBMessageFormatter(@Nonnull ImmutableList<String> typeNames,
									@Nonnull ImmutableMap<String, String> tags,
									@Nonnull String tagName,
									@Nullable String metricNamingExpression,
									boolean mergeTypeNamesTags,
									boolean hostnameTag); }
OpenTSDBMessageFormatter { public Iterable<String> formatResults(Iterable<Result> results, final Server server) { return from(results).transformAndConcat(new Function<Result, List<String>>() { @Override public List<String> apply(Result input) { return formatResult(input, server); } }).toList(); } OpenTSDBMessageFormatter(@Nonnull ImmutableList<String> typeNames,
									@Nonnull ImmutableMap<String, String> tags);  OpenTSDBMessageFormatter(@Nonnull ImmutableList<String> typeNames,
									@Nonnull ImmutableMap<String, String> tags,
									@Nonnull String tagName,
									@Nullable String metricNamingExpression,
									boolean mergeTypeNamesTags,
									boolean hostnameTag); Iterable<String> formatResults(Iterable<Result> results, final Server server); }
OpenTSDBMessageFormatter { public Iterable<String> formatResults(Iterable<Result> results, final Server server) { return from(results).transformAndConcat(new Function<Result, List<String>>() { @Override public List<String> apply(Result input) { return formatResult(input, server); } }).toList(); } OpenTSDBMessageFormatter(@Nonnull ImmutableList<String> typeNames,
									@Nonnull ImmutableMap<String, String> tags);  OpenTSDBMessageFormatter(@Nonnull ImmutableList<String> typeNames,
									@Nonnull ImmutableMap<String, String> tags,
									@Nonnull String tagName,
									@Nullable String metricNamingExpression,
									boolean mergeTypeNamesTags,
									boolean hostnameTag); Iterable<String> formatResults(Iterable<Result> results, final Server server); static final String DEFAULT_TAG_NAME; }