From 3fa48f5e00c205a461d6e621f20628e28f2a8a54 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Tue, 11 Feb 2025 09:52:43 -0800 Subject: [PATCH] ATLAS-4968: checkstyle compliance updates - tools module (#281) (cherry picked from commit c482cc3c0d07920439fa333b6841e3a224f3aae2) --- tools/atlas-index-repair/pom.xml | 13 +-- .../org/apache/atlas/tools/RepairIndex.java | 77 ++++++------- tools/classification-updater/pom.xml | 16 +-- .../atlas/tools/BulkFetchAndUpdate.java | 108 +++++++++--------- tools/notification-analyzer/pom.xml | 11 +- .../atlas/tools/NotificationAnalyzer.java | 22 +++- 6 files changed, 114 insertions(+), 133 deletions(-) diff --git a/tools/atlas-index-repair/pom.xml b/tools/atlas-index-repair/pom.xml index 228105661d..3bce662516 100644 --- a/tools/atlas-index-repair/pom.xml +++ b/tools/atlas-index-repair/pom.xml @@ -18,40 +18,37 @@ --> 4.0.0 - org.apache.atlas apache-atlas 2.5.0-SNAPSHOT ../../ - atlas-index-repair-tool jar - Apache Atlas index repair tool Apache Atlas index repair Module + + true + false + - org.apache.atlas atlas-client-v2 ${project.version} - org.apache.atlas atlas-graphdb-janus ${project.version} - org.apache.atlas atlas-repository ${project.version} - org.janusgraph janusgraph-core @@ -67,7 +64,5 @@ - - diff --git a/tools/atlas-index-repair/src/main/java/org/apache/atlas/tools/RepairIndex.java b/tools/atlas-index-repair/src/main/java/org/apache/atlas/tools/RepairIndex.java index 8a8e8cafc3..4d362cdbd6 100644 --- a/tools/atlas-index-repair/src/main/java/org/apache/atlas/tools/RepairIndex.java +++ b/tools/atlas-index-repair/src/main/java/org/apache/atlas/tools/RepairIndex.java @@ -26,7 +26,6 @@ import org.apache.atlas.repository.graphdb.AtlasVertex; import org.apache.atlas.repository.graphdb.janus.AtlasJanusGraphDatabase; import org.apache.atlas.repository.store.graph.v2.AtlasGraphUtilsV2; -import org.apache.atlas.security.SecurityProperties; import org.apache.atlas.utils.AuthenticationUtil; import org.apache.atlas.utils.SSLUtil; import org.apache.commons.cli.CommandLine; @@ -57,29 +56,28 @@ public class RepairIndex { private static final Logger LOG = LoggerFactory.getLogger(RepairIndex.class); - private static final int EXIT_CODE_SUCCESS = 0; - private static final int EXIT_CODE_FAILED = 1; - private static final int MAX_TRIES_ON_FAILURE = 3; - - private static final String INDEX_NAME_VERTEX_INDEX = "vertex_index"; - private static final String INDEX_NAME_FULLTEXT_INDEX = "fulltext_index"; - private static final String INDEX_NAME_EDGE_INDEX = "edge_index"; - private static final String DEFAULT_ATLAS_URL = "http://localhost:21000/"; + private static final int EXIT_CODE_SUCCESS = 0; + private static final int EXIT_CODE_FAILED = 1; + private static final int MAX_TRIES_ON_FAILURE = 3; + private static final String INDEX_NAME_VERTEX_INDEX = "vertex_index"; + private static final String INDEX_NAME_FULLTEXT_INDEX = "fulltext_index"; + private static final String INDEX_NAME_EDGE_INDEX = "edge_index"; + private static final String DEFAULT_ATLAS_URL = "http://localhost:21000/"; private static final String APPLICATION_PROPERTY_ATLAS_ENDPOINT = "atlas.rest.address"; - private static JanusGraph graph; + private static JanusGraph graph; private static AtlasClientV2 atlasClientV2; - private static boolean isSelectiveRestore; + private static boolean isSelectiveRestore; public static void main(String[] args) { int exitCode = EXIT_CODE_FAILED; LOG.info("Started index repair"); try { - CommandLine cmd = getCommandLine(args); - String guid = cmd.getOptionValue("g"); + CommandLine cmd = getCommandLine(args); + String guid = cmd.getOptionValue("g"); - if(guid != null && !guid.isEmpty()){ + if (guid != null && !guid.isEmpty()) { isSelectiveRestore = true; String uid = cmd.getOptionValue("u"); String pwd = cmd.getOptionValue("p"); @@ -108,7 +106,7 @@ private static void process(String guid) throws Exception { if (isSelectiveRestore) { repairIndex.restoreSelective(guid); - }else{ + } else { repairIndex.restoreAll(); } @@ -131,24 +129,24 @@ private static void setupGraph() { } private static String[] getIndexes() { - return new String[]{ INDEX_NAME_VERTEX_INDEX, INDEX_NAME_EDGE_INDEX, INDEX_NAME_FULLTEXT_INDEX}; + return new String[] {INDEX_NAME_VERTEX_INDEX, INDEX_NAME_EDGE_INDEX, INDEX_NAME_FULLTEXT_INDEX}; } private static void setupAtlasClient(String uid, String pwd) throws AtlasException { String[] atlasEndpoint = getAtlasRESTUrl(); if (atlasEndpoint == null || atlasEndpoint.length == 0) { - atlasEndpoint = new String[]{DEFAULT_ATLAS_URL}; + atlasEndpoint = new String[] {DEFAULT_ATLAS_URL}; } - atlasClientV2 = getAtlasClientV2(atlasEndpoint, new String[]{uid, pwd}); + atlasClientV2 = getAtlasClientV2(atlasEndpoint, new String[] {uid, pwd}); } private void restoreAll() throws Exception { - for (String indexName : getIndexes()){ + for (String indexName : getIndexes()) { displayCrlf("Restoring: " + indexName); long startTime = System.currentTimeMillis(); - ManagementSystem mgmt = (ManagementSystem) graph.openManagement(); - JanusGraphIndex index = mgmt.getGraphIndex(indexName); + ManagementSystem mgmt = (ManagementSystem) graph.openManagement(); + JanusGraphIndex index = mgmt.getGraphIndex(indexName); mgmt.updateIndex(index, SchemaAction.REINDEX).get(); mgmt.commit(); @@ -159,15 +157,14 @@ private void restoreAll() throws Exception { } } - - private void restoreSelective(String guid) throws Exception { + private void restoreSelective(String guid) throws Exception { Set referencedGUIDs = new HashSet<>(getEntityAndReferenceGuids(guid)); - displayCrlf("processing referencedGuids => "+ referencedGUIDs); + displayCrlf("processing referencedGuids => " + referencedGUIDs); - StandardJanusGraph janusGraph = (StandardJanusGraph) graph; - IndexSerializer indexSerializer = janusGraph.getIndexSerializer(); + StandardJanusGraph janusGraph = (StandardJanusGraph) graph; + IndexSerializer indexSerializer = janusGraph.getIndexSerializer(); - for (String indexName : getIndexes()){ + for (String indexName : getIndexes()) { displayCrlf("Restoring: " + indexName); long startTime = System.currentTimeMillis(); reindexVertex(indexName, indexSerializer, referencedGUIDs); @@ -179,19 +176,19 @@ private void restoreSelective(String guid) throws Exception { private static void reindexVertex(String indexName, IndexSerializer indexSerializer, Set entityGUIDs) throws Exception { Map>> documentsPerStore = new java.util.HashMap<>(); - ManagementSystem mgmt = (ManagementSystem) graph.openManagement(); - StandardJanusGraphTx tx = mgmt.getWrappedTx(); - BackendTransaction mutator = tx.getTxHandle(); - JanusGraphIndex index = mgmt.getGraphIndex(indexName); - MixedIndexType indexType = (MixedIndexType) mgmt.getSchemaVertex(index).asIndexType(); + ManagementSystem mgmt = (ManagementSystem) graph.openManagement(); + StandardJanusGraphTx tx = mgmt.getWrappedTx(); + BackendTransaction mutator = tx.getTxHandle(); + JanusGraphIndex index = mgmt.getGraphIndex(indexName); + MixedIndexType indexType = (MixedIndexType) mgmt.getSchemaVertex(index).asIndexType(); - for (String entityGuid : entityGUIDs){ + for (String entityGuid : entityGUIDs) { for (int attemptCount = 1; attemptCount <= MAX_TRIES_ON_FAILURE; attemptCount++) { AtlasVertex vertex = AtlasGraphUtilsV2.findByGuid(entityGuid); try { indexSerializer.reindexElement(vertex.getWrappedElement(), indexType, documentsPerStore); break; - }catch (Exception e){ + } catch (Exception e) { displayCrlf("Exception: " + e.getMessage()); displayCrlf("Pausing before retry.."); Thread.sleep(2000 * attemptCount); @@ -204,8 +201,8 @@ private static void reindexVertex(String indexName, IndexSerializer indexSeriali private static Set getEntityAndReferenceGuids(String guid) throws Exception { Set set = new HashSet<>(); set.add(guid); - AtlasEntityWithExtInfo entity = atlasClientV2.getEntityByGuid(guid); - Map map = entity.getReferredEntities(); + AtlasEntityWithExtInfo entity = atlasClientV2.getEntityByGuid(guid); + Map map = entity.getReferredEntities(); if (map == null || map.isEmpty()) { return set; } @@ -230,21 +227,19 @@ private static void displayFn(Consumer fn, String... formatMessage) { } private static String[] getAtlasRESTUrl() { - Configuration atlasConf = null; + Configuration atlasConf; try { atlasConf = ApplicationProperties.get(); return atlasConf.getStringArray(APPLICATION_PROPERTY_ATLAS_ENDPOINT); } catch (AtlasException e) { - return new String[]{DEFAULT_ATLAS_URL}; + return new String[] {DEFAULT_ATLAS_URL}; } } private static AtlasClientV2 getAtlasClientV2(String[] atlasEndpoint, String[] uidPwdFromCommandLine) throws AtlasException { AtlasClientV2 atlasClientV2; if (!AuthenticationUtil.isKerberosAuthenticationEnabled()) { - String[] uidPwd = (uidPwdFromCommandLine[0] == null || uidPwdFromCommandLine[1] == null) - ? AuthenticationUtil.getBasicAuthenticationInput() - : uidPwdFromCommandLine; + String[] uidPwd = (uidPwdFromCommandLine[0] == null || uidPwdFromCommandLine[1] == null) ? AuthenticationUtil.getBasicAuthenticationInput() : uidPwdFromCommandLine; atlasClientV2 = new AtlasClientV2(atlasEndpoint, uidPwd); } else { diff --git a/tools/classification-updater/pom.xml b/tools/classification-updater/pom.xml index 64a95fdb21..c86ec12d66 100644 --- a/tools/classification-updater/pom.xml +++ b/tools/classification-updater/pom.xml @@ -18,50 +18,41 @@ --> 4.0.0 - org.apache.atlas apache-atlas 2.5.0-SNAPSHOT ../../ - atlas-classification-updater jar - Apache Atlas classification updater Apache Atlas classification updater Module - 0.9.2-incubating + true + false - - - com.fasterxml.jackson.core jackson-databind ${jackson.databind.version} - org.apache.atlas atlas-client-v1 - org.apache.atlas atlas-client-v2 ${project.version} - org.apache.atlas atlas-notification - org.mockito mockito-all @@ -71,17 +62,14 @@ org.slf4j slf4j-api - org.slf4j slf4j-log4j12 - org.testng testng - diff --git a/tools/classification-updater/src/main/java/org/apache/atlas/tools/BulkFetchAndUpdate.java b/tools/classification-updater/src/main/java/org/apache/atlas/tools/BulkFetchAndUpdate.java index 91ff89a00d..e554f54144 100644 --- a/tools/classification-updater/src/main/java/org/apache/atlas/tools/BulkFetchAndUpdate.java +++ b/tools/classification-updater/src/main/java/org/apache/atlas/tools/BulkFetchAndUpdate.java @@ -45,6 +45,7 @@ import org.slf4j.LoggerFactory; import javax.ws.rs.core.MultivaluedMap; + import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; @@ -64,20 +65,23 @@ public class BulkFetchAndUpdate { private static final Logger LOG = LoggerFactory.getLogger(BulkFetchAndUpdate.class); - private static final String DATE_FORMAT_SUPPORTED = "yyyy-MM-dd'T'HH:mm:ss"; - private static final String OPTION_FROM = "f"; - + private static final String DATE_FORMAT_SUPPORTED = "yyyy-MM-dd'T'HH:mm:ss"; + private static final String OPTION_FROM = "f"; private static final String APPLICATION_PROPERTY_ATLAS_ENDPOINT = "atlas.rest.address"; - private static final String SYSTEM_PROPERTY_USER_DIR = "user.dir"; - private static final String STEP_PREPARE = "prepare"; - private static final String STEP_UPDATE = "update"; - private static final int EXIT_CODE_SUCCESS = 0; - private static final int EXIT_CODE_FAILED = 1; - private static final String DEFAULT_ATLAS_URL = "http://localhost:21000/"; - private static final String FILE_CLASSIFICATION_DEFS = "classification-definitions.json"; - private static final String FILE_ENTITY_HEADERS = "entity-headers.json"; - - private final static String[] filesToUse = new String[] { + private static final String SYSTEM_PROPERTY_USER_DIR = "user.dir"; + private static final String STEP_PREPARE = "prepare"; + private static final String STEP_UPDATE = "update"; + private static final String DEFAULT_ATLAS_URL = "http://localhost:21000/"; + private static final String FILE_CLASSIFICATION_DEFS = "classification-definitions.json"; + private static final String FILE_ENTITY_HEADERS = "entity-headers.json"; + private static final int EXIT_CODE_SUCCESS = 0; + private static final int EXIT_CODE_FAILED = 1; + + private BulkFetchAndUpdate() { + // to block instantiation + } + + private static final String[] filesToUse = new String[] { FILE_CLASSIFICATION_DEFS, FILE_ENTITY_HEADERS }; @@ -86,21 +90,21 @@ public static void main(String[] args) { int exitCode = EXIT_CODE_FAILED; try { - long fromTimestamp = 0L; - CommandLine cmd = getCommandLine(args); + long fromTimestamp = 0L; + CommandLine cmd = getCommandLine(args); String stepToExecute = cmd.getOptionValue("s").trim(); - String uid = cmd.getOptionValue("u"); - String pwd = cmd.getOptionValue("p"); - String directory = cmd.getOptionValue("d"); - String fromTime = cmd.getOptionValue(OPTION_FROM); - String basePath = getDirectory(directory); + String uid = cmd.getOptionValue("u"); + String pwd = cmd.getOptionValue("p"); + String directory = cmd.getOptionValue("d"); + String fromTime = cmd.getOptionValue(OPTION_FROM); + String basePath = getDirectory(directory); displayCrLf(basePath); String[] atlasEndpoint = getAtlasRESTUrl(); if (atlasEndpoint == null || atlasEndpoint.length == 0) { - atlasEndpoint = new String[]{DEFAULT_ATLAS_URL}; + atlasEndpoint = new String[] {DEFAULT_ATLAS_URL}; } if (StringUtils.equals(stepToExecute, STEP_PREPARE)) { @@ -138,7 +142,7 @@ private static long getTimestamp(String str) { return 0; } - TimeZone utc = TimeZone.getDefault(); + TimeZone utc = TimeZone.getDefault(); SimpleDateFormat simpleDateFormat = new SimpleDateFormat(DATE_FORMAT_SUPPORTED); simpleDateFormat.setTimeZone(utc); @@ -150,7 +154,7 @@ private static long getTimestamp(String str) { } private static void process(String stepToExecute, String basePath, String[] atlasEndpoint, String uid, String pwd, long fromTimestamp) throws Exception { - AtlasClientV2 atlasClientV2 = getAtlasClientV2(atlasEndpoint, new String[]{uid, pwd}); + AtlasClientV2 atlasClientV2 = getAtlasClientV2(atlasEndpoint, new String[] {uid, pwd}); switch (stepToExecute) { case STEP_PREPARE: { @@ -207,24 +211,21 @@ private static void printUsage() { } private static String[] getAtlasRESTUrl() { - Configuration atlasConf = null; + Configuration atlasConf; try { atlasConf = ApplicationProperties.get(); return atlasConf.getStringArray(APPLICATION_PROPERTY_ATLAS_ENDPOINT); } catch (AtlasException e) { - return new String[]{DEFAULT_ATLAS_URL}; + return new String[] {DEFAULT_ATLAS_URL}; } } private static AtlasClientV2 getAtlasClientV2(String[] atlasEndpoint, String[] uidPwdFromCommandLine) throws IOException { AtlasClientV2 atlasClientV2; if (!AuthenticationUtil.isKerberosAuthenticationEnabled()) { - String[] uidPwd = (uidPwdFromCommandLine[0] == null || uidPwdFromCommandLine[1] == null) - ? AuthenticationUtil.getBasicAuthenticationInput() - : uidPwdFromCommandLine; + String[] uidPwd = (uidPwdFromCommandLine[0] == null || uidPwdFromCommandLine[1] == null) ? AuthenticationUtil.getBasicAuthenticationInput() : uidPwdFromCommandLine; atlasClientV2 = new AtlasClientV2(atlasEndpoint, uidPwd); - } else { UserGroupInformation ugi = UserGroupInformation.getCurrentUser(); atlasClientV2 = new AtlasClientV2(ugi, ugi.getShortUserName(), atlasEndpoint); @@ -247,6 +248,7 @@ private static void displayFn(Consumer fn, String... formatMessage) { fn.accept(String.format(formatMessage[0], formatMessage[1])); } } + private static void closeReader(BufferedReader bufferedReader) { try { if (bufferedReader == null) { @@ -273,7 +275,7 @@ private static boolean fileCheck(String basePath, String[] files, boolean existC } private static boolean fileCheck(String basePath, String file, boolean existCheck) { - String errorMessage = existCheck ? "does not exist" : "exists" ; + String errorMessage = existCheck ? "does not exist" : "exists"; if (checkFileExists(basePath + file) != existCheck) { displayCrLf(String.format("File '%s' %s!", basePath + file, errorMessage)); return false; @@ -299,17 +301,19 @@ private static FileWriter getFileWriter(String basePath, String fileName) throws } private static class Preparer { - private static final String ATTR_NAME_QUALIFIED_NAME = "qualifiedName"; + private static final String ATTR_NAME_QUALIFIED_NAME = "qualifiedName"; - private AtlasClientV2 atlasClientV2; - private Map typeNameUniqueAttributeNameMap = new HashMap<>(); + private final AtlasClientV2 atlasClientV2; + private final Map typeNameUniqueAttributeNameMap = new HashMap<>(); public Preparer(AtlasClientV2 atlasClientV2) { this.atlasClientV2 = atlasClientV2; } public void run(String basePath, long fromTimestamp) throws Exception { - if (!fileCheck(basePath, filesToUse, false)) return; + if (!fileCheck(basePath, filesToUse, false)) { + return; + } displayCrLf("Starting: from: " + fromTimestamp + " to: " + "current time (" + System.currentTimeMillis() + ")..."); writeClassificationDefs(basePath, FILE_CLASSIFICATION_DEFS, getAllClassificationsDefs()); @@ -318,9 +322,7 @@ public void run(String basePath, long fromTimestamp) throws Exception { } private void writeClassificationDefs(String basePath, String fileName, List classificationDefs) throws IOException { - FileWriter fileWriter = null; - try { - fileWriter = getFileWriter(basePath, fileName); + try (FileWriter fileWriter = getFileWriter(basePath, fileName)) { for (AtlasClassificationDef classificationDef : classificationDefs) { try { classificationDef.setGuid(null); @@ -332,15 +334,10 @@ private void writeClassificationDefs(String basePath, String fileName, List getAllClassificationsDefs() throws Exceptio } private static class Updater { - private AtlasClientV2 atlasClientV2; + private final AtlasClientV2 atlasClientV2; public Updater(AtlasClientV2 atlasClientV2) { - this.atlasClientV2 = atlasClientV2; } public void run(String basePath) throws Exception { - if (!fileCheck(basePath, filesToUse, true)) return; + if (!fileCheck(basePath, filesToUse, true)) { + return; + } displayCrLf("Starting..."); readAndCreateOrUpdateClassificationDefs(basePath, FILE_CLASSIFICATION_DEFS); @@ -508,9 +506,10 @@ private void readEntityUpdates(String basePath, String fileName) throws IOExcept private void readAndCreateOrUpdateClassificationDefs(String basePath, String fileName) throws Exception { BufferedReader bufferedReader = null; try { + String cd; bufferedReader = getBufferedReader(basePath, fileName); - for (String cd; (cd = bufferedReader.readLine()) != null; ) { + while ((cd = bufferedReader.readLine()) != null) { AtlasClassificationDef classificationDef = AtlasType.fromJson(cd, AtlasClassificationDef.class); createOrUpdateClassification(classificationDef); } @@ -520,7 +519,7 @@ private void readAndCreateOrUpdateClassificationDefs(String basePath, String fil } private void createOrUpdateClassification(AtlasClassificationDef classificationDef) { - String name = classificationDef.getName(); + String name = classificationDef.getName(); AtlasTypesDef typesDef = new AtlasTypesDef(null, null, Collections.singletonList(classificationDef), null, null); try { display("%s -> ", name); @@ -538,15 +537,12 @@ private void createOrUpdateClassification(AtlasClassificationDef classificationD } private void updateClassification(AtlasClassificationDef classificationDef) { - String name = classificationDef.getName(); + String name = classificationDef.getName(); AtlasTypesDef typesDef = new AtlasTypesDef(null, null, Collections.singletonList(classificationDef), null, null); try { display("Update: %s -> ", name); atlasClientV2.updateAtlasTypeDefs(typesDef); displayCrLf(" [Done]"); - } catch (AtlasServiceException e) { - LOG.error("{} skipped!", name, e); - displayCrLf(" [Skipped]", name); } catch (Exception ex) { LOG.error("{} skipped!", name, ex); displayCrLf(" [Skipped]", name); diff --git a/tools/notification-analyzer/pom.xml b/tools/notification-analyzer/pom.xml index 25e5d95bea..3def0a3763 100644 --- a/tools/notification-analyzer/pom.xml +++ b/tools/notification-analyzer/pom.xml @@ -18,20 +18,20 @@ --> 4.0.0 - org.apache.atlas apache-atlas 2.5.0-SNAPSHOT ../../ - atlas-notification-analyzer jar - Apache Atlas Notification Analyzer Apache Atlas Notification Analyzer - + + true + false + commons-cli @@ -43,7 +43,6 @@ commons-collections ${commons-collections.version} - org.apache.atlas atlas-notification @@ -54,14 +53,12 @@ slf4j-api ${slf4j.version} - org.slf4j slf4j-log4j12 ${slf4j.version} - dist diff --git a/tools/notification-analyzer/src/main/java/org/apache/atlas/tools/NotificationAnalyzer.java b/tools/notification-analyzer/src/main/java/org/apache/atlas/tools/NotificationAnalyzer.java index 20b1065467..67f1093f4f 100644 --- a/tools/notification-analyzer/src/main/java/org/apache/atlas/tools/NotificationAnalyzer.java +++ b/tools/notification-analyzer/src/main/java/org/apache/atlas/tools/NotificationAnalyzer.java @@ -21,6 +21,10 @@ import org.apache.atlas.model.instance.AtlasEntity; import org.apache.atlas.model.instance.AtlasObjectId; import org.apache.atlas.model.notification.HookNotification; +import org.apache.atlas.model.notification.HookNotification.EntityCreateRequestV2; +import org.apache.atlas.model.notification.HookNotification.EntityDeleteRequestV2; +import org.apache.atlas.model.notification.HookNotification.EntityPartialUpdateRequestV2; +import org.apache.atlas.model.notification.HookNotification.EntityUpdateRequestV2; import org.apache.atlas.notification.AtlasNotificationMessageDeserializer; import org.apache.atlas.notification.NotificationInterface.NotificationType; import org.apache.atlas.utils.AtlasJson; @@ -29,10 +33,6 @@ import org.apache.atlas.v1.model.notification.HookNotificationV1.EntityDeleteRequest; import org.apache.atlas.v1.model.notification.HookNotificationV1.EntityPartialUpdateRequest; import org.apache.atlas.v1.model.notification.HookNotificationV1.EntityUpdateRequest; -import org.apache.atlas.model.notification.HookNotification.EntityCreateRequestV2; -import org.apache.atlas.model.notification.HookNotification.EntityDeleteRequestV2; -import org.apache.atlas.model.notification.HookNotification.EntityPartialUpdateRequestV2; -import org.apache.atlas.model.notification.HookNotification.EntityUpdateRequestV2; import org.apache.commons.cli.BasicParser; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; @@ -40,8 +40,18 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.io.*; -import java.util.*; +import java.io.BufferedReader; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.HashMap; +import java.util.HashSet; +import java.util.IntSummaryStatistics; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Set; +import java.util.TreeMap; import java.util.concurrent.atomic.AtomicInteger; public class NotificationAnalyzer {