[ 
https://issues.apache.org/jira/browse/GOBBLIN-1457?focusedWorklogId=618303&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-618303
 ]

ASF GitHub Bot logged work on GOBBLIN-1457:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 03/Jul/21 00:46
            Start Date: 03/Jul/21 00:46
    Worklog Time Spent: 10m 
      Work Description: aplex commented on a change in pull request #3299:
URL: https://github.com/apache/gobblin/pull/3299#discussion_r663285475



##########
File path: 
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/troubleshooter/InMemoryMultiContextIssueRepository.java
##########
@@ -0,0 +1,98 @@
+/*
+ * 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.gobblin.runtime.troubleshooter;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.commons.collections4.map.LRUMap;
+
+import com.typesafe.config.Config;
+import com.typesafe.config.ConfigFactory;
+
+import javax.inject.Inject;
+import javax.inject.Singleton;
+
+import org.apache.gobblin.util.ConfigUtils;
+
+/**
+ * Stores issues from multiple jobs, flows or other contexts in memory.
+ *
+ * To limit the memory consumption, it will keep only the last {@link 
#MAX_CONTEXT_COUNT} contexts,
+ * and older ones will be discarded.
+ * */
+@Singleton
+public class InMemoryMultiContextIssueRepository implements 
MultiContextIssueRepository {
+  public static final int DEFAULT_MAX_CONTEXT_COUNT = 100;

Review comment:
       So each job will produce no more than a 100 issues (that's hardcoded in 
another class InMemoryIssueRepository), but realistically it will be 0-10. This 
number controls issues for how many jobs will be kept in memory. So by default 
it will be up to 100 jobs with up to 100 issues - 10 000 issues max. If the 
issues takes 20KB (with stacktrace and message), that will be 200mb extra 
memory, which should be ok. Also the number of tracked jobs is changeable with 
a config setting below.
   
   In the next PR we'll use db to store the issues. The in-memory repo is a 
fallback system.

##########
File path: 
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/Orchestrator.java
##########
@@ -104,8 +104,8 @@
   private Map<String, FlowCompiledState> flowGauges = Maps.newHashMap();
 
 
-  public Orchestrator(Config config, FlowStatusGenerator flowStatusGenerator, 
Optional<TopologyCatalog> topologyCatalog,
-      Optional<DagManager> dagManager, Optional<Logger> log, boolean 
instrumentationEnabled) {
+  public Orchestrator(Config config, Optional<TopologyCatalog> 
topologyCatalog, Optional<DagManager> dagManager, Optional<Logger> log,

Review comment:
       reverted this file

##########
File path: 
gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-server/src/main/java/org/apache/gobblin/service/FlowExecutionResourceLocalHandler.java
##########
@@ -168,6 +174,24 @@ public static FlowExecution 
convertFlowStatus(org.apache.gobblin.service.monitor
         .setJobStatuses(jobStatusArray);
   }
 
+  private static org.apache.gobblin.service.Issue convertIssue(Issue issues) {

Review comment:
       renamed the method for better clarity




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 618303)
    Time Spent: 1h 50m  (was: 1h 40m)

> Automatic troubleshooter
> ------------------------
>
>                 Key: GOBBLIN-1457
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1457
>             Project: Apache Gobblin
>          Issue Type: Improvement
>          Components: gobblin-core
>            Reporter: Alex Prokofiev
>            Assignee: Abhishek Tiwari
>            Priority: Major
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> Automatic troubleshooter will collect issues from job logs and health checks. 
> Then it will show users the root cause of the problems with action items on 
> how to resolve them.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to