[ https://issues.apache.org/jira/browse/KNOX-2402?focusedWorklogId=476448&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-476448 ]
ASF GitHub Bot logged work on KNOX-2402: ---------------------------------------- Author: ASF GitHub Bot Created on: 31/Aug/20 08:55 Start Date: 31/Aug/20 08:55 Worklog Time Spent: 10m Work Description: smolnar82 commented on a change in pull request #365: URL: https://github.com/apache/knox/pull/365#discussion_r479990543 ########## File path: gateway-performance-test/src/main/java/org/apache/knox/gateway/performance/test/knoxtoken/KnoxTokenCache.java ########## @@ -0,0 +1,41 @@ +/* + * 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.knox.gateway.performance.test.knoxtoken; + +import java.util.Queue; +import java.util.concurrent.ConcurrentLinkedQueue; + +class KnoxTokenCache { + private static final int CAPACITY = 500; + private final Queue<String> knoxTokens = new ConcurrentLinkedQueue<>(); + + void saveKnoxToken(String knoxToken) { + cleanIfNecessary(); + this.knoxTokens.offer(knoxToken); Review comment: As discussed offline, it is acceptable: this cache works only as a storage to make sure there is an already acquired Knox DT to be renewed/used. It really does not matter if we miss some. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 476448) Time Spent: 1h 10m (was: 1h) > Develop a performance-test framework to test token state service > ---------------------------------------------------------------- > > Key: KNOX-2402 > URL: https://issues.apache.org/jira/browse/KNOX-2402 > Project: Apache Knox > Issue Type: Task > Affects Versions: 1.4.0 > Reporter: Sandor Molnar > Assignee: Sandor Molnar > Priority: Major > Fix For: 1.5.0 > > Time Spent: 1h 10m > Remaining Estimate: 0h > > The general goal is to have an extendable performance test framework that > will drive the Knox Gateway configured by different use cases. > Some initial requirements of this framework: > - easy to extend with new use-cases > - has the ability to execute long-running jobs > - has the ability to connect to it and query different metrics > - generate meaningful and easy-to-read reports of those metrics automatically > (in configurable time periods) > In the first phase, the task is to conduct and codify performance testing for > scalability and performance benchmarking with concurrent clients, with > long-running jobs that stress the backend of the token state server store: > - use different token state server implementations > - turn on/off the token state service mechanism > - use concurrent clients who dealing with tokens (make sure they actually use > the tokens and periodically renew them) -- This message was sent by Atlassian Jira (v8.3.4#803005)