{"action":"created","comment":{"url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/pulls/comments/169601177","pull_request_review_id":98150151,"id":169601177,"diff_hunk":"@@ -276,4 +291,28 @@ private JestClient initializeJestClient(ElasticsearchConfiguration esConfig) {\n \n         return tempFilesContentList;\n     }\n+\n+    private ArrayList<String> getExternalDirectoryContent(String path) {\n+        ArrayList<String> tempFilesContentList = new ArrayList<>();\n+\n+        File directory = new File(path);\n+        if (!directory.isDirectory()) {\n+            throw new RuntimeException(\"Did not find any files under \"+ path +\"!\");\n+        }\n+\n+        File[] documents = directory.listFiles();\n+\n+        if (documents == null || documents.length == 0) {\n+            throw new RuntimeException(\"Did not find any files under \"+ path +\"!\");\n+        }\n+\n+        for (File doc : documents) {\n+            try {\n+                tempFilesContentList.add(String.join(\"\", Files.readLines(doc, StandardCharsets.UTF_8)));\n+            } catch (IOException e) {\n+                logger.info(\"Could not read file {}\", doc.getAbsolutePath());\n+            }\n+        }\n+        return tempFilesContentList;","path":"src/main/java/io/logz/benchmarks/elasticsearch/elasticsearch/ElasticsearchController.java","position":77,"original_position":77,"commit_id":"ea5b18f2a1f879904e9fb7ef12f5be460505348f","original_commit_id":"ea5b18f2a1f879904e9fb7ef12f5be460505348f","user":{"login":"roiravhon","id":8061130,"avatar_url":"https://avatars0.githubusercontent.com/u/8061130?v=4","gravatar_id":"","url":"https://api.github.com/users/roiravhon","html_url":"https://github.com/roiravhon","followers_url":"https://api.github.com/users/roiravhon/followers","following_url":"https://api.github.com/users/roiravhon/following{/other_user}","gists_url":"https://api.github.com/users/roiravhon/gists{/gist_id}","starred_url":"https://api.github.com/users/roiravhon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roiravhon/subscriptions","organizations_url":"https://api.github.com/users/roiravhon/orgs","repos_url":"https://api.github.com/users/roiravhon/repos","events_url":"https://api.github.com/users/roiravhon/events{/privacy}","received_events_url":"https://api.github.com/users/roiravhon/received_events","type":"User","site_admin":false},"body":"Need another RuntimeException here if after iterating on all files this is still empty (in case IOException while reading)","created_at":"2018-02-21T11:02:54Z","updated_at":"2018-02-21T11:03:09Z","html_url":"https://github.com/logzio/elasticsearch-benchmark-tool/pull/5#discussion_r169601177","pull_request_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/pulls/5","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/pulls/comments/169601177"},"html":{"href":"https://github.com/logzio/elasticsearch-benchmark-tool/pull/5#discussion_r169601177"},"pull_request":{"href":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/pulls/5","id":170238318,"html_url":"https://github.com/logzio/elasticsearch-benchmark-tool/pull/5","diff_url":"https://github.com/logzio/elasticsearch-benchmark-tool/pull/5.diff","patch_url":"https://github.com/logzio/elasticsearch-benchmark-tool/pull/5.patch","issue_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/issues/5","number":5,"state":"open","locked":false,"title":"load external docs and searches","user":{"login":"oririechman","id":8677585,"avatar_url":"https://avatars3.githubusercontent.com/u/8677585?v=4","gravatar_id":"","url":"https://api.github.com/users/oririechman","html_url":"https://github.com/oririechman","followers_url":"https://api.github.com/users/oririechman/followers","following_url":"https://api.github.com/users/oririechman/following{/other_user}","gists_url":"https://api.github.com/users/oririechman/gists{/gist_id}","starred_url":"https://api.github.com/users/oririechman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oririechman/subscriptions","organizations_url":"https://api.github.com/users/oririechman/orgs","repos_url":"https://api.github.com/users/oririechman/repos","events_url":"https://api.github.com/users/oririechman/events{/privacy}","received_events_url":"https://api.github.com/users/oririechman/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-02-20T16:14:53Z","updated_at":"2018-02-21T11:03:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a145f4e7377bc486f2208fe3bbb402eb9cb8cab4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/pulls/5/commits","review_comments_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/pulls/5/comments","review_comment_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/pulls/comments{/number}","comments_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/issues/5/comments","statuses_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/statuses/ea5b18f2a1f879904e9fb7ef12f5be460505348f","head":{"label":"logzio:load-external-docs-and-searches","ref":"load-external-docs-and-searches","sha":"ea5b18f2a1f879904e9fb7ef12f5be460505348f","user":{"login":"logzio","id":7902073,"avatar_url":"https://avatars3.githubusercontent.com/u/7902073?v=4","gravatar_id":"","url":"https://api.github.com/users/logzio","html_url":"https://github.com/logzio","followers_url":"https://api.github.com/users/logzio/followers","following_url":"https://api.github.com/users/logzio/following{/other_user}","gists_url":"https://api.github.com/users/logzio/gists{/gist_id}","starred_url":"https://api.github.com/users/logzio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/logzio/subscriptions","organizations_url":"https://api.github.com/users/logzio/orgs","repos_url":"https://api.github.com/users/logzio/repos","events_url":"https://api.github.com/users/logzio/events{/privacy}","received_events_url":"https://api.github.com/users/logzio/received_events","type":"Organization","site_admin":false},"repo":{"id":68591926,"name":"elasticsearch-benchmark-tool","full_name":"logzio/elasticsearch-benchmark-tool","owner":{"login":"logzio","id":7902073,"avatar_url":"https://avatars3.githubusercontent.com/u/7902073?v=4","gravatar_id":"","url":"https://api.github.com/users/logzio","html_url":"https://github.com/logzio","followers_url":"https://api.github.com/users/logzio/followers","following_url":"https://api.github.com/users/logzio/following{/other_user}","gists_url":"https://api.github.com/users/logzio/gists{/gist_id}","starred_url":"https://api.github.com/users/logzio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/logzio/subscriptions","organizations_url":"https://api.github.com/users/logzio/orgs","repos_url":"https://api.github.com/users/logzio/repos","events_url":"https://api.github.com/users/logzio/events{/privacy}","received_events_url":"https://api.github.com/users/logzio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/logzio/elasticsearch-benchmark-tool","description":"Stress test tool that benchmark indexing and searching in Elasticsearch","fork":false,"url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool","forks_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/forks","keys_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/keys{/key_id}","collaborators_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/teams","hooks_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/hooks","issue_events_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/issues/events{/number}","events_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/events","assignees_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/assignees{/user}","branches_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/branches{/branch}","tags_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/tags","blobs_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/git/refs{/sha}","trees_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/git/trees{/sha}","statuses_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/statuses/{sha}","languages_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/languages","stargazers_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/stargazers","contributors_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/contributors","subscribers_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/subscribers","subscription_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/subscription","commits_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/commits{/sha}","git_commits_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/git/commits{/sha}","comments_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/comments{/number}","issue_comment_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/issues/comments{/number}","contents_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/contents/{+path}","compare_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/compare/{base}...{head}","merges_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/merges","archive_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/downloads","issues_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/issues{/number}","pulls_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/pulls{/number}","milestones_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/milestones{/number}","notifications_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/labels{/name}","releases_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/releases{/id}","deployments_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/deployments","created_at":"2016-09-19T09:45:21Z","updated_at":"2017-11-30T14:58:52Z","pushed_at":"2018-02-21T09:16:00Z","git_url":"git://github.com/logzio/elasticsearch-benchmark-tool.git","ssh_url":"git@github.com:logzio/elasticsearch-benchmark-tool.git","clone_url":"https://github.com/logzio/elasticsearch-benchmark-tool.git","svn_url":"https://github.com/logzio/elasticsearch-benchmark-tool","homepage":"","size":66,"stargazers_count":11,"watchers_count":11,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":1,"watchers":11,"default_branch":"master"}},"base":{"label":"logzio:master","ref":"master","sha":"13e2a580877fa1df9e5befeefc5adc293909f1fc","user":{"login":"logzio","id":7902073,"avatar_url":"https://avatars3.githubusercontent.com/u/7902073?v=4","gravatar_id":"","url":"https://api.github.com/users/logzio","html_url":"https://github.com/logzio","followers_url":"https://api.github.com/users/logzio/followers","following_url":"https://api.github.com/users/logzio/following{/other_user}","gists_url":"https://api.github.com/users/logzio/gists{/gist_id}","starred_url":"https://api.github.com/users/logzio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/logzio/subscriptions","organizations_url":"https://api.github.com/users/logzio/orgs","repos_url":"https://api.github.com/users/logzio/repos","events_url":"https://api.github.com/users/logzio/events{/privacy}","received_events_url":"https://api.github.com/users/logzio/received_events","type":"Organization","site_admin":false},"repo":{"id":68591926,"name":"elasticsearch-benchmark-tool","full_name":"logzio/elasticsearch-benchmark-tool","owner":{"login":"logzio","id":7902073,"avatar_url":"https://avatars3.githubusercontent.com/u/7902073?v=4","gravatar_id":"","url":"https://api.github.com/users/logzio","html_url":"https://github.com/logzio","followers_url":"https://api.github.com/users/logzio/followers","following_url":"https://api.github.com/users/logzio/following{/other_user}","gists_url":"https://api.github.com/users/logzio/gists{/gist_id}","starred_url":"https://api.github.com/users/logzio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/logzio/subscriptions","organizations_url":"https://api.github.com/users/logzio/orgs","repos_url":"https://api.github.com/users/logzio/repos","events_url":"https://api.github.com/users/logzio/events{/privacy}","received_events_url":"https://api.github.com/users/logzio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/logzio/elasticsearch-benchmark-tool","description":"Stress test tool that benchmark indexing and searching in Elasticsearch","fork":false,"url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool","forks_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/forks","keys_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/keys{/key_id}","collaborators_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/teams","hooks_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/hooks","issue_events_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/issues/events{/number}","events_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/events","assignees_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/assignees{/user}","branches_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/branches{/branch}","tags_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/tags","blobs_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/git/refs{/sha}","trees_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/git/trees{/sha}","statuses_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/statuses/{sha}","languages_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/languages","stargazers_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/stargazers","contributors_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/contributors","subscribers_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/subscribers","subscription_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/subscription","commits_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/commits{/sha}","git_commits_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/git/commits{/sha}","comments_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/comments{/number}","issue_comment_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/issues/comments{/number}","contents_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/contents/{+path}","compare_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/compare/{base}...{head}","merges_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/merges","archive_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/downloads","issues_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/issues{/number}","pulls_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/pulls{/number}","milestones_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/milestones{/number}","notifications_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/labels{/name}","releases_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/releases{/id}","deployments_url":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/deployments","created_at":"2016-09-19T09:45:21Z","updated_at":"2017-11-30T14:58:52Z","pushed_at":"2018-02-21T09:16:00Z","git_url":"git://github.com/logzio/elasticsearch-benchmark-tool.git","ssh_url":"git@github.com:logzio/elasticsearch-benchmark-tool.git","clone_url":"https://github.com/logzio/elasticsearch-benchmark-tool.git","svn_url":"https://github.com/logzio/elasticsearch-benchmark-tool","homepage":"","size":66,"stargazers_count":11,"watchers_count":11,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":1,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/pulls/5"},"html":{"href":"https://github.com/logzio/elasticsearch-benchmark-tool/pull/5"},"issue":{"href":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/issues/5"},"comments":{"href":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/logzio/elasticsearch-benchmark-tool/statuses/ea5b18f2a1f879904e9fb7ef12f5be460505348f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"roiravhon"}}