Make NNA constructor that accepts configuration #61
Labels
good first issue
Good for newcomers
refactor
Code structures needs to be reorganized
tests
Tests need to be changed or added
Milestone
If you take a look at the main class,
NNAnalyticsRestAPI.java
, particularly here:NNAnalytics/src/main/java/com/paypal/namenode/NNAnalyticsRestAPI.java
Line 153 in b17e8e6
You'll see that NNA's bootstrap has a sequence and there are opportunities to override values via parameters. These parameters are set by tests.
It would be nice to refactor this whole bootstrap phase to instead (1) allow a passing of the NNA configuration object
SecurityContext
(today; to be renamed) and (2) overall simplify testing logic by just calling 1 method to initialize NNA and just passing the desired pre-set configuration object.Using HDFS's MiniClusters as an example -- we want to simply be able to pass in a configuration object during the bootstrap process for testing. In the production case we will pass null and NNA will utilize the ClassLoader stream method like it does today for loading configuration.
The text was updated successfully, but these errors were encountered: