virajjasani commented on a change in pull request #1901: URL: https://github.com/apache/hbase/pull/1901#discussion_r447120082
########## File path: hbase-server/src/main/java/org/apache/hadoop/hbase/util/RegionMover.java ########## @@ -653,41 +673,45 @@ private void deleteFile(String filename) { } /** - * @return List of servers from the exclude file in format 'hostname:port'. + * @param filename The file should have 'host:port' per line + * @return List of servers from the file in format 'hostname:port'. */ - private List<String> readExcludes(String excludeFile) throws IOException { - List<String> excludeServers = new ArrayList<>(); - if (excludeFile == null) { - return excludeServers; - } else { + private List<String> readServersFromFile(String filename) throws IOException { + List<String> servers = new ArrayList<>(); + if (filename != null) { try { - Files.readAllLines(Paths.get(excludeFile)).stream().map(String::trim) - .filter(((Predicate<String>) String::isEmpty).negate()).map(String::toLowerCase) - .forEach(excludeServers::add); + Files.readAllLines(Paths.get(filename)).stream().map(String::trim) + .filter(((Predicate<String>) String::isEmpty).negate()).map(String::toLowerCase) + .forEach(servers::add); } catch (IOException e) { - LOG.warn("Exception while reading excludes file, continuing anyways", e); + LOG.error("Exception while reading servers from file,", e); + throw e; } - return excludeServers; } + return servers; } /** - * Excludes the servername whose hostname and port portion matches the list given in exclude file + * Designates or excludes the servername whose hostname and port portion matches the list given + * in the file. Review comment: We can give examples of both `designatedFile` and `excludeFile` and how it works with `isInclude` param specifically. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org