@Test public void shouldResolveCombinations() { String resolvedPath = new S3LogPathResolver().getResolvedPath("my_s3_path/$cluster/$host", "filename.log", "cl1"); assertEquals("my_s3_path/cl1/"+ LogFeederUtil.hostName + "/filename.log", resolvedPath); }
public String getResolvedPath(String baseKeyPrefix, String keySuffix, String cluster) { HashMap<String, String> contextParam = buildContextParam(cluster); String resolvedKeyPrefix = PlaceholderUtil.replaceVariables(baseKeyPrefix, contextParam); return resolvedKeyPrefix + LogFeederConstants.S3_PATH_SEPARATOR + keySuffix; }
S3LogPathResolver { public String getResolvedPath(String baseKeyPrefix, String keySuffix, String cluster) { HashMap<String, String> contextParam = buildContextParam(cluster); String resolvedKeyPrefix = PlaceholderUtil.replaceVariables(baseKeyPrefix, contextParam); return resolvedKeyPrefix + LogFeederConstants.S3_PATH_SEPARATOR + keySuffix; } }
S3LogPathResolver { public String getResolvedPath(String baseKeyPrefix, String keySuffix, String cluster) { HashMap<String, String> contextParam = buildContextParam(cluster); String resolvedKeyPrefix = PlaceholderUtil.replaceVariables(baseKeyPrefix, contextParam); return resolvedKeyPrefix + LogFeederConstants.S3_PATH_SEPARATOR + keySuffix; }  }
S3LogPathResolver { public String getResolvedPath(String baseKeyPrefix, String keySuffix, String cluster) { HashMap<String, String> contextParam = buildContextParam(cluster); String resolvedKeyPrefix = PlaceholderUtil.replaceVariables(baseKeyPrefix, contextParam); return resolvedKeyPrefix + LogFeederConstants.S3_PATH_SEPARATOR + keySuffix; }  String getResolvedPath(String baseKeyPrefix, String keySuffix, String cluster); }
S3LogPathResolver { public String getResolvedPath(String baseKeyPrefix, String keySuffix, String cluster) { HashMap<String, String> contextParam = buildContextParam(cluster); String resolvedKeyPrefix = PlaceholderUtil.replaceVariables(baseKeyPrefix, contextParam); return resolvedKeyPrefix + LogFeederConstants.S3_PATH_SEPARATOR + keySuffix; }  String getResolvedPath(String baseKeyPrefix, String keySuffix, String cluster);  }