{"action":"created","comment":{"url":"https://api.github.com/repos/apache/vxquery/pulls/comments/37456383","id":37456383,"diff_hunk":"@@ -0,0 +1,131 @@\n+~~ Licensed to the Apache Software Foundation (ASF) under one or more\n+~~ contributor license agreements.  See the NOTICE file distributed with\n+~~ this work for additional information regarding copyright ownership.\n+~~ The ASF licenses this file to You under the Apache License, Version 2.0\n+~~ (the \"License\"); you may not use this file except in compliance with\n+~~ the License.  You may obtain a copy of the License at\n+~~\n+~~     http://www.apache.org/licenses/LICENSE-2.0\n+~~\n+~~ Unless required by applicable law or agreed to in writing, software\n+~~ distributed under the License is distributed on an \"AS IS\" BASIS,\n+~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+~~ See the License for the specific language governing permissions and\n+~~ limitations under the License.\n+\n+Executing a Query in HDFS\n+\n+\n+* 1. Connecting VXQuery with HDFS\n+\n+    The only variable VXQuery needs in order to access HDFS is the path to the HDFS configuration directory.\n+\n+    We define that path in the <<cluster.properties>> file that is located in <<vxquery-root/vxquery-server/src/resources/conf/>> directory.\n+\n+    Inside that file we need to change the value of the variable <<HDFS_CONF>> to the full system path of the HDFS configuration.\n+\n+    For example, <HDFS_CONF=/usr/local/hadoop/etc/hadoop> defines that the configuration files for our HDFS installation are located in </usr/local/hadoop/etc/hadoop> path.\n+\n+\n+* 2. Running the Query\n+\n+  For files stored in HDFS there are 2 ways to access them from VXQuery.\n+\n+  [[a]] Reading them as whole files.\n+\n+  [[b]] Reading them block by block.\n+\n+** a. Reading them as whole files.\n+\n+  For this option you only need to change the path to files.To define that your file(s) exist and should be read from HDFS you must add <\"hdfs:/\"> in front of the path.VXQuery will read the path of the files you request in your query and try to locate them.\n+\n+  So in order to run a query that will read the input files from HDFS you need to make sure that\n+\n+  a) The configuration path is correctly set to the one of your HDFS system.\n+\n+  b) The path defined in your query begins with <hdfs:/> and the full path to the file(s).\n+\n+  c) The path exists on HDFS and the user that runs the query has read permission to these files.\n+\n+*** Example\n+\n+  I want to find all the <books> that are published after 2004.\n+\n+  The file is located in HDFS in this path </user/hduser/store/books.xml>\n+\n+  My query will look like this:\n+\n+----------\n+for $x in collection(\"hdfs://user/hduser/store\")\n+where $x/year>2004\n+return $x/title\n+----------\n+\n+  If I want only one file, the <<books.xml>> to be parsed from HDFS, my query will look like this:\n+\n+----------\n+for $x in doc(\"hdfs://user/hduser/store/books.xml\")\n+where $x/year>2004\n+return $x/title\n+----------\n+\n+** b. Reading them block by block\n+\n+  In order to use that option you need to modify your query.Instead of using the <collection> or <doc> function to define your input file(s) you need to use <collection-with-tag>.","path":"src/site/apt/user_query_hdfs.apt","position":74,"original_position":74,"commit_id":"11266ce5986dd47dbf4d809c458ef72a3c1349f7","original_commit_id":"11266ce5986dd47dbf4d809c458ef72a3c1349f7","user":{"login":"ecarm002","id":3517157,"avatar_url":"https://avatars.githubusercontent.com/u/3517157?v=3","gravatar_id":"","url":"https://api.github.com/users/ecarm002","html_url":"https://github.com/ecarm002","followers_url":"https://api.github.com/users/ecarm002/followers","following_url":"https://api.github.com/users/ecarm002/following{/other_user}","gists_url":"https://api.github.com/users/ecarm002/gists{/gist_id}","starred_url":"https://api.github.com/users/ecarm002/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecarm002/subscriptions","organizations_url":"https://api.github.com/users/ecarm002/orgs","repos_url":"https://api.github.com/users/ecarm002/repos","events_url":"https://api.github.com/users/ecarm002/events{/privacy}","received_events_url":"https://api.github.com/users/ecarm002/received_events","type":"User","site_admin":false},"body":"Make sure you have spaces between your sentences. Also instead of writing long lines, put returns so they do not wrap (80 or 100 characters per line). I usually leave a word space gap at the end just in case later we edit the line it does not need reformatting.","created_at":"2015-08-19T19:21:55Z","updated_at":"2015-08-19T19:21:55Z","html_url":"https://github.com/apache/vxquery/pull/24#discussion_r37456383","pull_request_url":"https://api.github.com/repos/apache/vxquery/pulls/24","_links":{"self":{"href":"https://api.github.com/repos/apache/vxquery/pulls/comments/37456383"},"html":{"href":"https://github.com/apache/vxquery/pull/24#discussion_r37456383"},"pull_request":{"href":"https://api.github.com/repos/apache/vxquery/pulls/24"}}},"pull_request":{"url":"https://api.github.com/repos/apache/vxquery/pulls/24","id":42221148,"html_url":"https://github.com/apache/vxquery/pull/24","diff_url":"https://github.com/apache/vxquery/pull/24.diff","patch_url":"https://github.com/apache/vxquery/pull/24.patch","issue_url":"https://api.github.com/repos/apache/vxquery/issues/24","number":24,"state":"open","locked":false,"title":"site with documentation on hdfs queries","user":{"login":"efikalti","id":6997885,"avatar_url":"https://avatars.githubusercontent.com/u/6997885?v=3","gravatar_id":"","url":"https://api.github.com/users/efikalti","html_url":"https://github.com/efikalti","followers_url":"https://api.github.com/users/efikalti/followers","following_url":"https://api.github.com/users/efikalti/following{/other_user}","gists_url":"https://api.github.com/users/efikalti/gists{/gist_id}","starred_url":"https://api.github.com/users/efikalti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/efikalti/subscriptions","organizations_url":"https://api.github.com/users/efikalti/orgs","repos_url":"https://api.github.com/users/efikalti/repos","events_url":"https://api.github.com/users/efikalti/events{/privacy}","received_events_url":"https://api.github.com/users/efikalti/received_events","type":"User","site_admin":false},"body":"Site explaining the steps and configuration needed to run a query on HDFS. @ecarm002 @sjaco002","created_at":"2015-08-12T09:41:32Z","updated_at":"2015-08-19T19:21:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8d321254c9a8d2742ffdd8afd3c51f4c86e1b108","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/vxquery/pulls/24/commits","review_comments_url":"https://api.github.com/repos/apache/vxquery/pulls/24/comments","review_comment_url":"https://api.github.com/repos/apache/vxquery/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/vxquery/issues/24/comments","statuses_url":"https://api.github.com/repos/apache/vxquery/statuses/11266ce5986dd47dbf4d809c458ef72a3c1349f7","head":{"label":"efikalti:hdfs_site","ref":"hdfs_site","sha":"11266ce5986dd47dbf4d809c458ef72a3c1349f7","user":{"login":"efikalti","id":6997885,"avatar_url":"https://avatars.githubusercontent.com/u/6997885?v=3","gravatar_id":"","url":"https://api.github.com/users/efikalti","html_url":"https://github.com/efikalti","followers_url":"https://api.github.com/users/efikalti/followers","following_url":"https://api.github.com/users/efikalti/following{/other_user}","gists_url":"https://api.github.com/users/efikalti/gists{/gist_id}","starred_url":"https://api.github.com/users/efikalti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/efikalti/subscriptions","organizations_url":"https://api.github.com/users/efikalti/orgs","repos_url":"https://api.github.com/users/efikalti/repos","events_url":"https://api.github.com/users/efikalti/events{/privacy}","received_events_url":"https://api.github.com/users/efikalti/received_events","type":"User","site_admin":false},"repo":{"id":35159619,"name":"vxquery","full_name":"efikalti/vxquery","owner":{"login":"efikalti","id":6997885,"avatar_url":"https://avatars.githubusercontent.com/u/6997885?v=3","gravatar_id":"","url":"https://api.github.com/users/efikalti","html_url":"https://github.com/efikalti","followers_url":"https://api.github.com/users/efikalti/followers","following_url":"https://api.github.com/users/efikalti/following{/other_user}","gists_url":"https://api.github.com/users/efikalti/gists{/gist_id}","starred_url":"https://api.github.com/users/efikalti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/efikalti/subscriptions","organizations_url":"https://api.github.com/users/efikalti/orgs","repos_url":"https://api.github.com/users/efikalti/repos","events_url":"https://api.github.com/users/efikalti/events{/privacy}","received_events_url":"https://api.github.com/users/efikalti/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/efikalti/vxquery","description":"Mirror of Apache VXQuery","fork":true,"url":"https://api.github.com/repos/efikalti/vxquery","forks_url":"https://api.github.com/repos/efikalti/vxquery/forks","keys_url":"https://api.github.com/repos/efikalti/vxquery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/efikalti/vxquery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/efikalti/vxquery/teams","hooks_url":"https://api.github.com/repos/efikalti/vxquery/hooks","issue_events_url":"https://api.github.com/repos/efikalti/vxquery/issues/events{/number}","events_url":"https://api.github.com/repos/efikalti/vxquery/events","assignees_url":"https://api.github.com/repos/efikalti/vxquery/assignees{/user}","branches_url":"https://api.github.com/repos/efikalti/vxquery/branches{/branch}","tags_url":"https://api.github.com/repos/efikalti/vxquery/tags","blobs_url":"https://api.github.com/repos/efikalti/vxquery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/efikalti/vxquery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/efikalti/vxquery/git/refs{/sha}","trees_url":"https://api.github.com/repos/efikalti/vxquery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/efikalti/vxquery/statuses/{sha}","languages_url":"https://api.github.com/repos/efikalti/vxquery/languages","stargazers_url":"https://api.github.com/repos/efikalti/vxquery/stargazers","contributors_url":"https://api.github.com/repos/efikalti/vxquery/contributors","subscribers_url":"https://api.github.com/repos/efikalti/vxquery/subscribers","subscription_url":"https://api.github.com/repos/efikalti/vxquery/subscription","commits_url":"https://api.github.com/repos/efikalti/vxquery/commits{/sha}","git_commits_url":"https://api.github.com/repos/efikalti/vxquery/git/commits{/sha}","comments_url":"https://api.github.com/repos/efikalti/vxquery/comments{/number}","issue_comment_url":"https://api.github.com/repos/efikalti/vxquery/issues/comments{/number}","contents_url":"https://api.github.com/repos/efikalti/vxquery/contents/{+path}","compare_url":"https://api.github.com/repos/efikalti/vxquery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/efikalti/vxquery/merges","archive_url":"https://api.github.com/repos/efikalti/vxquery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/efikalti/vxquery/downloads","issues_url":"https://api.github.com/repos/efikalti/vxquery/issues{/number}","pulls_url":"https://api.github.com/repos/efikalti/vxquery/pulls{/number}","milestones_url":"https://api.github.com/repos/efikalti/vxquery/milestones{/number}","notifications_url":"https://api.github.com/repos/efikalti/vxquery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/efikalti/vxquery/labels{/name}","releases_url":"https://api.github.com/repos/efikalti/vxquery/releases{/id}","created_at":"2015-05-06T13:19:24Z","updated_at":"2015-05-06T13:23:10Z","pushed_at":"2015-08-19T16:01:38Z","git_url":"git://github.com/efikalti/vxquery.git","ssh_url":"git@github.com:efikalti/vxquery.git","clone_url":"https://github.com/efikalti/vxquery.git","svn_url":"https://github.com/efikalti/vxquery","homepage":null,"size":102347,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"3e40e5a712e1edfb244d1f9b67961f947fcbe8c6","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":32376873,"name":"vxquery","full_name":"apache/vxquery","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/vxquery","description":"Mirror of Apache VXQuery","fork":false,"url":"https://api.github.com/repos/apache/vxquery","forks_url":"https://api.github.com/repos/apache/vxquery/forks","keys_url":"https://api.github.com/repos/apache/vxquery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/vxquery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/vxquery/teams","hooks_url":"https://api.github.com/repos/apache/vxquery/hooks","issue_events_url":"https://api.github.com/repos/apache/vxquery/issues/events{/number}","events_url":"https://api.github.com/repos/apache/vxquery/events","assignees_url":"https://api.github.com/repos/apache/vxquery/assignees{/user}","branches_url":"https://api.github.com/repos/apache/vxquery/branches{/branch}","tags_url":"https://api.github.com/repos/apache/vxquery/tags","blobs_url":"https://api.github.com/repos/apache/vxquery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/vxquery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/vxquery/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/vxquery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/vxquery/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/vxquery/languages","stargazers_url":"https://api.github.com/repos/apache/vxquery/stargazers","contributors_url":"https://api.github.com/repos/apache/vxquery/contributors","subscribers_url":"https://api.github.com/repos/apache/vxquery/subscribers","subscription_url":"https://api.github.com/repos/apache/vxquery/subscription","commits_url":"https://api.github.com/repos/apache/vxquery/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/vxquery/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/vxquery/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/vxquery/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/vxquery/contents/{+path}","compare_url":"https://api.github.com/repos/apache/vxquery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/vxquery/merges","archive_url":"https://api.github.com/repos/apache/vxquery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/vxquery/downloads","issues_url":"https://api.github.com/repos/apache/vxquery/issues{/number}","pulls_url":"https://api.github.com/repos/apache/vxquery/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/vxquery/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/vxquery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/vxquery/labels{/name}","releases_url":"https://api.github.com/repos/apache/vxquery/releases{/id}","created_at":"2015-03-17T07:00:06Z","updated_at":"2015-07-29T21:47:07Z","pushed_at":"2015-08-19T16:01:38Z","git_url":"git://github.com/apache/vxquery.git","ssh_url":"git@github.com:apache/vxquery.git","clone_url":"https://github.com/apache/vxquery.git","svn_url":"https://github.com/apache/vxquery","homepage":null,"size":12276,"stargazers_count":6,"watchers_count":6,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":10,"mirror_url":"git://git.apache.org/vxquery.git","open_issues_count":4,"forks":10,"open_issues":4,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/vxquery/pulls/24"},"html":{"href":"https://github.com/apache/vxquery/pull/24"},"issue":{"href":"https://api.github.com/repos/apache/vxquery/issues/24"},"comments":{"href":"https://api.github.com/repos/apache/vxquery/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/vxquery/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/vxquery/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/vxquery/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/apache/vxquery/statuses/11266ce5986dd47dbf4d809c458ef72a3c1349f7"}}}}