ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oleew...@apache.org
Subject ambari git commit: AMBARI-17246. Ignore logs for performance testing of grok patters (Hayat Behlim via oleewere)
Date Wed, 15 Jun 2016 17:59:21 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 c1782023d -> 7ec8b68a6


AMBARI-17246. Ignore logs for performance testing of grok patters (Hayat Behlim via oleewere)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7ec8b68a
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7ec8b68a
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7ec8b68a

Branch: refs/heads/branch-2.4
Commit: 7ec8b68a67043b16239681dcc68de49604166657
Parents: c178202
Author: oleewere <oleewere@gmail.com>
Authored: Wed Jun 15 19:57:33 2016 +0200
Committer: oleewere <oleewere@gmail.com>
Committed: Wed Jun 15 19:58:58 2016 +0200

----------------------------------------------------------------------
 .../ambari/logfeeder/output/OutputDevNull.java  | 37 ++++++++++++++++++++
 .../src/main/resources/alias_config.json        |  3 ++
 2 files changed, 40 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7ec8b68a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputDevNull.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputDevNull.java
b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputDevNull.java
new file mode 100644
index 0000000..b6188cb
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputDevNull.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ambari.logfeeder.output;
+
+import org.apache.ambari.logfeeder.input.InputMarker;
+import org.apache.log4j.Logger;
+
+/**
+ * Output that just ignore the logs
+ *
+ */
+public class OutputDevNull extends Output {
+
+  private static Logger logger = Logger.getLogger(OutputDevNull.class);
+
+  @Override
+  public void write(String block, InputMarker inputMarker) throws Exception {
+    // just ignore the logs
+    logger.trace("Ignore log block: " + block);
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/7ec8b68a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/resources/alias_config.json
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/resources/alias_config.json
b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/resources/alias_config.json
index d8a239a..a55b348 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/resources/alias_config.json
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/resources/alias_config.json
@@ -37,6 +37,9 @@
 		},
 		"kafka": {
 			"klass": "org.apache.ambari.logfeeder.output.OutputKafka"
+		},
+		"dev_null": {
+			"klass": "org.apache.ambari.logfeeder.output.OutputDevNull"
 		}
 	}
 }
\ No newline at end of file


Mime
View raw message