aboutsummaryrefslogtreecommitdiffstats
path: root/aai-els-onap-logging/src/main/java/org
diff options
context:
space:
mode:
authorFrancis Toth <francis.toth@yoppworks.com>2020-07-10 07:48:56 -0400
committerFrancis Toth <francis.toth@yoppworks.com>2020-07-10 07:57:42 -0400
commitf2b425d077b4256ccdf2accab4e4e08186415ff6 (patch)
tree13f62aeed3be483dd03e93d6c8718a0912b7b4c7 /aai-els-onap-logging/src/main/java/org
parentc38fadd8e9ef0e14ea47b027bc44f5b32ca0d11d (diff)
Fix minor sonar issues
Signed-off-by: Francis Toth <francis.toth@yoppworks.com> Change-Id: Iea540bb663429d55ce90879f9d9a22888c583833 Issue-ID: AAI-2128
Diffstat (limited to 'aai-els-onap-logging/src/main/java/org')
-rw-r--r--aai-els-onap-logging/src/main/java/org/onap/aai/util/HbaseSaltPrefixer.java19
1 files changed, 3 insertions, 16 deletions
diff --git a/aai-els-onap-logging/src/main/java/org/onap/aai/util/HbaseSaltPrefixer.java b/aai-els-onap-logging/src/main/java/org/onap/aai/util/HbaseSaltPrefixer.java
index fef10a77..95f9c1b7 100644
--- a/aai-els-onap-logging/src/main/java/org/onap/aai/util/HbaseSaltPrefixer.java
+++ b/aai-els-onap-logging/src/main/java/org/onap/aai/util/HbaseSaltPrefixer.java
@@ -1,4 +1,4 @@
-/**
+/*
* ============LICENSE_START=======================================================
* org.onap.aai
* ================================================================================
@@ -27,33 +27,20 @@ package org.onap.aai.util;
* as these keys are generated in a couple places, I made a class to contain that logic
*/
public class HbaseSaltPrefixer {
- private int NUM_REGION_BUCKETS = 3; // the number of hbase region servers per cluster
+ // the number of hbase region servers per cluster
+ private static int NUM_REGION_BUCKETS = 3;
private static class SingletonHolder {
private static final HbaseSaltPrefixer INSTANCE = new HbaseSaltPrefixer();
}
- /**
- * Instantiates a new hbase salt prefixer.
- */
private HbaseSaltPrefixer() {
}
- /**
- * Gets the single instance of HbaseSaltPrefixer.
- *
- * @return single instance of HbaseSaltPrefixer
- */
public static HbaseSaltPrefixer getInstance() {
return SingletonHolder.INSTANCE;
}
- /**
- * Prepend salt.
- *
- * @param key the key
- * @return the string
- */
public String prependSalt(String key) {
int salt = Math.abs(key.hashCode()) % NUM_REGION_BUCKETS;
return salt + "-" + key;