[ 
https://issues.apache.org/jira/browse/AMBARI-24833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16691379#comment-16691379
 ] 

ASF GitHub Bot commented on AMBARI-24833:
-----------------------------------------

kasakrisz commented on a change in pull request #26: AMBARI-24833. Support for 
cloud logs to using filters + JSON output
URL: https://github.com/apache/ambari-logsearch/pull/26#discussion_r234520580
 
 

 ##########
 File path: 
ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/manager/operations/impl/AbstractInputConfigHandler.java
 ##########
 @@ -0,0 +1,102 @@
+/*
+ * 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.manager.operations.impl;
+
+import org.apache.ambari.logfeeder.manager.InputConfigHolder;
+import org.apache.ambari.logfeeder.manager.operations.InputConfigHandler;
+import org.apache.ambari.logfeeder.plugin.common.AliasUtil;
+import org.apache.ambari.logfeeder.plugin.filter.Filter;
+import org.apache.ambari.logfeeder.plugin.input.Input;
+import 
org.apache.ambari.logsearch.config.api.model.inputconfig.FilterDescriptor;
+import org.apache.commons.lang.BooleanUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * Holds common operations for input config handlers
+ */
+public abstract class AbstractInputConfigHandler implements InputConfigHandler 
{
+
+  private static final Logger logger = 
LogManager.getLogger(AbstractInputConfigHandler.class);
+
+  protected void loadFilters(String serviceName, InputConfigHolder 
inputConfigHolder) {
+    sortFilters(inputConfigHolder);
+
+    List<Input> toRemoveInputList = new ArrayList<>();
+    for (Input input : 
inputConfigHolder.getInputManager().getInputList(serviceName)) {
+      for (FilterDescriptor filterDescriptor : 
inputConfigHolder.getFilterConfigList()) {
+        if (filterDescriptor == null) {
+          logger.warn("Filter descriptor is smpty. Skipping...");
 
 Review comment:
   typo: smpty -> empty

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Log Feeder: send logs to cloud storage (gcs/s3 etc.)
> ----------------------------------------------------
>
>                 Key: AMBARI-24833
>                 URL: https://issues.apache.org/jira/browse/AMBARI-24833
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-logsearch
>    Affects Versions: 2.7.0
>            Reporter: Olivér Szabó
>            Assignee: Olivér Szabó
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.8.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to