-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get_impala_queries does not return all records #68
Comments
hi @funes79 do you have some code to show ? |
Running the query for expensive queries in the last 7 days returns just 2 record:
Result:
But looping through and calling the get_impala_queries for shorter intervals returns more results:
Result:
|
hi @funes79 |
hi @funes79 i am try to execute , it's execute normally, import ...
def impala_query(cluster):
end = datetime.now()
start = end - timedelta(days=7)
print start, end
for s in cluster.get_all_services():
if s.type == 'IMPALA':
impala = s
q = impala.get_impala_queries(start_time=start, end_time=end, filter_str='database=xxx')
for i in q.queries:
print i.queryId
if __name__ == '__main__':
try:
cm_host = 'xx'
api = ApiResource(cm_host, username='reader', password='cmreader', version=6)
clusterName = api.get_all_clusters()[0]
impala_query(clusterName) |
Cant be it somehow related to the fact, that the filtering takes some time,
and in the GUI the first two rows appears immeadiately and then the others
are fetched?
So I think if the gui uses Solr or some other kind of index, then results
are not available immeadiately, but in several steps..
This is typical for wiki search, where you get the first set of result and
then a token, and with that token you continue to fetch more results
…On Mon, Apr 23, 2018 at 4:33 AM, 刘志杰 ***@***.***> wrote:
hi @funes79 <https://github.com/funes79>
i am try to execute , it's execute normally,
this it my code
import ...
def impala_query(cluster):
end = datetime.now()
start = end - timedelta(days=7)
print start, end
for s in cluster.get_all_services():
if s.type == 'IMPALA':
impala = s
q = impala.get_impala_queries(start_time=start, end_time=end, filter_str='database=xxx')
for i in q.queries:
print i.statement
if __name__ == '__main__':
try:
cm_host = 'xx'
api = ApiResource(cm_host, username='reader', password='cmreader', version=6)
clusterName = api.get_all_clusters()[0]
impala_query(clusterName)
[image: image]
<https://user-images.githubusercontent.com/14147011/39104190-bf8489f2-46e1-11e8-9041-11e8ba1406e6.png>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#68 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ATRCidza9SCuO5RSlOB8yt_eND3MK2V1ks5trT1-gaJpZM4TdKZ6>
.
|
When I run a get_impala_queries from python it returns just 2 records, even if I use the same date range and filter.
When I filter it in the CM UI, the first two records appears immediately, and then after a second the rest of those queries.
Is it possible to get the next result somehow?
The text was updated successfully, but these errors were encountered: