Member since
11-07-2016
11
Posts
4
Kudos Received
2
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
2271 | 08-13-2018 12:53 PM | |
4120 | 11-07-2016 11:41 AM |
08-28-2018
05:05 PM
1 Kudo
Did you try this? Fetch the HDFS usage report: https://cloudera.github.io/cm_api/apidocs/v19/path__clusters_-clusterName-_services_-serviceName-_reports_hdfsUsageReport.html It works for me: https://<cm_host>:7183/api/v19/clusters/<ClusterName>/services/<ServiceName>/reports/hdfsUsageReport https://cmmanager.domain.com:7183/api/v19/clusters/Production%20US/services/hdfs/reports/hdfsUsageReport You notice I use for ClusterName the chars %20 that represents a blank (my ClusterName is "Production US"), so I made the URL understand that is a blank Regards, Nic
... View more
08-13-2018
12:53 PM
Did you try INVALIDATE METADATA? https://www.cloudera.com/documentation/enterprise/5-14-x/topics/impala_invalidate_metadata.html Nic
... View more
07-25-2018
03:55 PM
1 Kudo
Someone might find below link useful. I used it when I had to migrate MySQL to different machines. https://gist.github.com/bugcy013/91cd7767e5306d1703e5 Regards, Nic
... View more
11-07-2016
11:41 AM
2 Kudos
Hello Esteban, My problem was that I couldn't get more than 100 records for export due to the CM webpage limitation with the same message you showed: "More queries match your filter than can be displayed. Try narrowing your search filter or decreasing the time range over which you are searching". Below is an answer I got from Cloudera how to get more rows and for a bigger period using API. The way I managed with it after having the output is a bit customized but pretty quick for me as I'm an Oracle admin. I created an external table in Oracle some database with the output file and then just took out the sql text from there or any other info I needed. Here is the answer from Cloudera: << Here is a little bit instruction on extracting Impala out of CM: 1. click support dropdown in top right 2. click api documentation 3. find the endpoint "impalaQueries" click this link Use the endpoint address it specifics in the docs, add the filter information to the URL and set the limit parameter to a value greater than 100 (the default). If it takes a very long time to dump this data you can also page through it using the 'offset' parameter, or you could use 'from' and 'to' with a small sliding window to grab for the time period you're interested in. You can use the URL that CM directs you to when doing your export and simple add a "&limit=200" to the end of it to get more than 100 >> It worked for me using: ...api/v7/clusters/cluster/services/impala/impalaQueries?from=2016-11-07T18%3A50%3A21.758Z&to=2016-11-07T19%3A20%3A21.758Z&limit=200&filter= ## Parsing the output using Oracle external table: ################################################## drop table admin_task.impala; create table admin_task.impala ( column_text varchar2(4000) ) organization external ( type oracle_loader default directory data_pump_dir access parameters ( records delimited by newline fields terminated by '#' missing field values are null ) location ('impala.txt') ); alter table admin_task.impala reject limit unlimited; create table admin_task.impala_text (text varchar2(4000)); create or replace procedure admin_task.generate_impala_sql as cursor c is select * from admin_task.impala; v_count1 number(10); v_count2 number(10); v_query varchar2(4000); begin for r in c loop if r.column_text like '%"statement"%' then v_count1 := instr(upper(r.column_text),'SELECT', 1, 1); v_count2 := instr(r.column_text,'",', 1, 1) - v_count1; v_query := substr(r.column_text, v_count1, v_count2) || ';' || chr(13) || chr(10); insert into admin_task.impala_text values(v_query); dbms_output.put_line(r.column_text || ' / ' || v_count1 || ' / ' || v_count2 || ' / ' || v_query); -- dbms_output.put_line(v_query); end if; end loop; commit; end; / show errors procedure admin_task.generate_impala_sql; set serveroutput on set serveroutput on size 5000000 set line 10000 exec admin_task.generate_impala_sql; Regards, nicusan
... View more