[
https://issues.apache.org/jira/browse/YARN-11276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17584696#comment-17584696
]
ASF GitHub Bot commented on YARN-11276:
---------------------------------------
slfan1989 commented on code in PR #4793:
URL: https://github.com/apache/hadoop/pull/4793#discussion_r954628152
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/CacheNode.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.hadoop.yarn.util;
+
+public class CacheNode<V>{
+ private V value;
+ private long cacheTime;
+
+ public CacheNode(V value){
+ this.value = value;
+ cacheTime = System.currentTimeMillis();
Review Comment:
TIme.now()
> Add lru cache for RMWebServices.getApps
> ---------------------------------------
>
> Key: YARN-11276
> URL: https://issues.apache.org/jira/browse/YARN-11276
> Project: Hadoop YARN
> Issue Type: Improvement
> Components: resourcemanager
> Affects Versions: 3.4.0
> Reporter: Xianming Lei
> Priority: Minor
> Labels: pull-request-available
>
> In our YARN cluster, there are thousands of apps running at the same time,
> the return result of getApps reaches about 10M, and many requests are the
> same input parameters, we can add cache for RMWebServices.getApps to reduce
> processing delay
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]