Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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 runners
    • o.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 by perf.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 by perf.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
    • o.a.k.g.p.t.knoxtoken.KnoxTokenCache - stores the already acquired Knox DTs (if the number of DTs reaches 500 the cache is cleaned automatically)
  • src/test/resources
    • performance.test.configuration.properties - contains the above-described configuration file
    • performanceTest-log4j.properties - the Log4j configuration of the tool. By default, it prints log messages on the STDOUT as well as writes them into target/logs/performanceTest.log


Knox gateway requisites

The performance test tool tries to connect to a Knox instance to

...