Utils { public static List<Long> traverse1RowFile(String fileName) throws IOException { logger.debug("Parsing bucket file from: " + fileName); ArrayList<Long> fileToArraylist = new ArrayList<>(); String[] splitString = readFile(fileName).trim().split(","); logger.debug("Bucket list contains " + splitString.length + " buckets."); for (int i = 0; i < splitString.length; i++) { try { fileToArraylist.add(new Long(splitString[i])); } catch (NumberFormatException e) { logger.error("Could not parse token: " + splitString[i] + " from file: " + fileName + " at index: " + i, e); throw e; } } logger.debug("Done parsing bucket file from: " + fileName); return fileToArraylist; }  static String calculateITableName(String databaseName, String tableName, String indexName); static String calculateITableName(Index index); static String calculateITableName(IndexIdentifier indexId); @Deprecated static void initDatabase(String cqlPath, Session session); static void initDatabase(boolean dropDb, String replicationString, Session session); static void initDatabaseSingleReplication(boolean dropDb, Session session); static void setField(String value, IndexField fieldData, BoundStatement bs, int index); static boolean setField(DBObject jsonObject, IndexField fieldData, BoundStatement bs, int index); static String join(String delimiter, Object... objects); static String join(String delimiter, Collection<? extends Object> objects); static boolean equalLists(List<String> one, List<String> two); static void writeFile(String toWrite, String fileName); static String readFile(String fileName); static List<Long> traverse1RowFile(String fileName); static final String EMPTY_STRING; }
@Test public void testtraverse1RowFile() throws IOException { List list = Utils.traverse1RowFile("/buckets/text.buckets"); assertNotNull(list); assertFalse(list.isEmpty()); }