Skip to content
This repository has been archived by the owner on Jul 29, 2020. It is now read-only.

Commit

Permalink
sample creds for hdfs and working on query-data functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
cglewis committed Sep 17, 2013
1 parent 8183ba2 commit 2c5107a
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
3 changes: 3 additions & 0 deletions hemlock/clients/hdfs_creds_sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
HDFS_NAMENODE=server.fqdn
HDFS_VERSION=7
HDFS_PORT=8020
38 changes: 37 additions & 1 deletion hemlock/hemlock.py
Original file line number Diff line number Diff line change
Expand Up @@ -1517,9 +1517,45 @@ def process_action(self, debug, action, var_d, m_server, es):
vals.append(timestamp)

if "query" in action_a:
# curl example:
#
# curl -XPOST "http://l41-vsrv-es01.b.internal:9200/hemlock/_search" -d'
# {
# "size": 200,
# "query": {
# "bool": {
# "must_not": [
# {
# "match": {
# "doc.hemlock-system": "4991f644-e94d-472e-8526-c7f08a656735"
# }
# },
# {
# "match": {
# "doc.hemlock-system": "59822f6b-4646-4dd8-9be9-038c2988375a"
# }
# }
# ],
# "should": [
# {
# "match": {
# "_all": "foo"
# }
# }
# ]
# }
# }
# }'

# query the data that resides in hemlock
# !! TODO
print var_d

# !! TODO
# get the list of systems that the user has access to
# add the list of systems that the user doesn't have access to
# the 'must_not' list in the elasticsearch query

print var_d
print es
url = "http://"+es+":9200/hemlock/_search?q="+var_d['--query']
print url
Expand Down

0 comments on commit 2c5107a

Please sign in to comment.