THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block |
---|
# Gateway connection related properties perf.test.gateway.url.protocol=https perf.test.gateway.url.host=localhost perf.test.gateway.url.port=8443 perf.test.gateway.jmx.port=8888 # report generation related properties perf.test.report.generation.periodInSecs=30 perf.test.report.generation.json.enabled=true perf.test.report.generation.yaml.enabled=true # Knox Token use case related properties perf.test.usecase.knoxtoken.enabled=true perf.test.usecase.knoxtoken.topology.gateway=sandbox perf.test.usecase.knoxtoken.topology.tokenbased=tokenbased perf.test.usecase.knoxtoken.numOfThreads=3 perf.test.usecase.knoxtoken.testDurationInSecs=60 perf.test.usecase.knoxtoken.requestDelayLowerBoundInSecs=5 perf.test.usecase.knoxtoken.requestDelayUpperBoundInSecs=10 |
As of today (17 Aug 2020), there is only one use-case implementation exists to address the above-written acquire/renew/use Knox Delegation token case. The related resources (Java classes, properties files) are located in the gateway-performance-test
Maven module. Here is the list of the most relevant resources:
src/main/java
o.a.k.g.p.t.PerformanceTestRunner
- this is the entry point of the tool. This class comes with a main method that reads the given configuration file and executes all enabled use-case runnerso.a.k.g.p.t.ResponseTimeCache
- this class acts as a holder of response times and shared between the worker threads (which write into the cache) and the report generation threads (reading data from it)o.a.k.g.p.t.reporting.GatewayMetricsReporter
- this class generates the human-readable reports in JSON and YAML format in a fixed schedule marked byperf.test.report.generation.periodInSecs
o.a.k.g.p.t.knoxtoken.KnoxTokenUseCaseRunner
- this class is responsible for- start
N
worker threads that are acquiring Knox DTs parallel (marked byperf.test.usecase.knoxtoken.numOfThreads
) - and 2 more threads to
- renew an already acquired Knox DT
- do an HDFS ls command using an already acquired Knox DT
- start
- stores the already acquired Knox DTs (if the number of DTs reaches 500 the cache is cleaned automatically)o.a.k.g.p.t.knoxtoken.
KnoxTokenCache
src/test/resources
performance.test.configuration.properties
- contains the above-described configuration fileperformanceTest-log4j.properties
- the Log4j configuration of the tool. By default, it prints log messages on the STDOUT as well as writes them intotarget/logs/performanceTest.log
Knox gateway requisites
The performance test tool tries to connect to a Knox instance to
...