Skip to content

Commit

Permalink
Merge branch 'pinterest:master' into feature/disable_logstream_fleet_…
Browse files Browse the repository at this point in the history
…decider
  • Loading branch information
jfzunigac committed Jan 13, 2024
2 parents 79fafc9 + 2373420 commit bdb1a45
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.pinterest.singer</groupId>
<artifactId>singer-package</artifactId>
<version>0.8.0.78</version>
<version>0.8.0.79</version>
<packaging>pom</packaging>
<description>Singer Logging Agent modules</description>
<inceptionYear>2013</inceptionYear>
Expand Down
2 changes: 1 addition & 1 deletion singer-commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<groupId>com.pinterest.singer</groupId>
<artifactId>singer-package</artifactId>
<version>0.8.0.78</version>
<version>0.8.0.79</version>
<relativePath>../pom.xml</relativePath>
</parent>
<developers>
Expand Down
2 changes: 1 addition & 1 deletion singer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.pinterest.singer</groupId>
<artifactId>singer-package</artifactId>
<version>0.8.0.78</version>
<version>0.8.0.79</version>
<relativePath>../pom.xml</relativePath>
</parent>
<licenses>
Expand Down
4 changes: 2 additions & 2 deletions singer/src/main/java/com/pinterest/singer/config/Decider.java
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,16 @@ public Map<String, Integer> getDeciderMap() {
* @return the disable decider name if it exists, null otherwise
*/
public String getDisableDecider(String logName) {
LOG.warn("Calling get disable decider");
Set<String> disableDeciderList = new HashSet<>();
String deciderName = null;
for (String key : mDeciderMap.keySet()) {
if (key.startsWith("singer_disable_" + logName + "___")) {
disableDeciderList.add(key);
}
}
String convertedHostname = SingerUtils.HOSTNAME.replace("-", "_");
for (String decider : disableDeciderList) {
if (SingerUtils.HOSTNAME.startsWith(decider.split("___")[1])) {
if (convertedHostname.startsWith(decider.split("___")[1])) {
deciderName =
deciderName != null && deciderName.length() > decider.length() ? deciderName : decider;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ public static void reset() {
}

private boolean checkIgnoreDirectory(String podName) {
if (ignorePodDirectory == null || ignorePodDirectory.isEmpty()) return false;
return Files.exists(Paths.get(podLogDirectory, podName, ignorePodDirectory));
}
}
2 changes: 1 addition & 1 deletion thrift-logger/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.pinterest.singer</groupId>
<artifactId>singer-package</artifactId>
<version>0.8.0.78</version>
<version>0.8.0.79</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>thrift-logger</artifactId>
Expand Down

0 comments on commit bdb1a45

Please sign in to comment.