Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 76C86200B13 for ; Wed, 15 Jun 2016 19:59:24 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 753EE160A19; Wed, 15 Jun 2016 17:59:24 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C22B2160A4D for ; Wed, 15 Jun 2016 19:59:23 +0200 (CEST) Received: (qmail 32512 invoked by uid 500); 15 Jun 2016 17:59:21 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 32406 invoked by uid 99); 15 Jun 2016 17:59:21 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Jun 2016 17:59:21 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 1DAD6E03AF; Wed, 15 Jun 2016 17:59:21 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: oleewere@apache.org To: commits@ambari.apache.org Message-Id: <1f81aa8b212f46239c8db151c08a397e@git.apache.org> X-Mailer: ASF-Git Admin Mailer 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 +0000 (UTC) archived-at: Wed, 15 Jun 2016 17:59:24 -0000 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 Authored: Wed Jun 15 19:57:33 2016 +0200 Committer: oleewere 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