Member since
03-03-2017
15
Posts
0
Kudos Received
0
Solutions
08-29-2018
07:39 AM
Dear Team, I am trying to connect to cm api client with below python script. Code: import sys from datetime import datetime, timedelta from cm_api.api_client import ApiResource cm_host = "172.21.1.40" cm_port = "7183" cdh5 = None cm_host = "<IP Address>" api = ApiResource(cm_host, 7183, username=" ********", password="*********", use_tls=True) for c in api.get_all_clusters(): print c.name I get below error ... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/site-packages/cm_api/api_client.py", line 131, in get_all_clusters return clusters.get_all_clusters(self, view) File "/usr/lib/python2.7/site-packages/cm_api/endpoints/clusters.py", line 66, in get_all_clusters params=view and dict(view=view) or None) File "/usr/lib/python2.7/site-packages/cm_api/endpoints/types.py", line 139, in call ret = method(path, params=params) File "/usr/lib/python2.7/site-packages/cm_api/resource.py", line 110, in get return self.invoke("GET", relpath, params) File "/usr/lib/python2.7/site-packages/cm_api/resource.py", line 73, in invoke headers=headers) File "/usr/lib/python2.7/site-packages/cm_api/http_client.py", line 181, in execute return self._opener.open(request) File "/usr/lib64/python2.7/urllib2.py", line 431, in open response = self._open(req, data) File "/usr/lib64/python2.7/urllib2.py", line 449, in _open '_open', req) File "/usr/lib64/python2.7/urllib2.py", line 409, in _call_chain result = func(*args) File "/usr/lib64/python2.7/urllib2.py", line 1258, in https_open context=self._context, check_hostname=self._check_hostname) File "/usr/lib64/python2.7/urllib2.py", line 1214, in do_open raise URLError(err) urllib2.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:579)> I can overrided above error with below command manually[-k] curl -X post -k -u userid:**** https://******************:7183/api/v19/clusters/ADH-DEVELOPMENT001/commands/stop Now the problem statment is . I am not sure how to add -k option in python code basically don't know how to "Ignore SSL certification validation" Thanks and Regards, Naveen Srikanth D
... View more
Labels:
- Labels:
-
Cloudera Manager
07-11-2018
11:09 PM
In below mentioned post when I fire query like below, works fine select * from working.ddr2_raw_actual_test where dest_icao='NULL' But with actual file it is not working. I am getting resultset in hive which is correct but same query not able to get in impala. Thanks and Regards, Naveen Srikanth D
... View more
07-11-2018
10:32 PM
Dear Naveen, Thanks for picking up the issue. Below is the data $NToI_$NToJ,LTB,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL $NWVa,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL BENTU,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL $NXTe_B,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL $MoaR,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL LER,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL Query: select * from tbl_name where c is null; Problem is: Above query was running on 2 million records and returns attached file 6 records in hive and same query doesn't result in impala. Now what I have done is have taken this resultset alone and created new external table . Now query resultset not able to fetch in hive and impala both. Actual files are delimited with space Below is the ddl of the query: CREATE TABLE `working.tbl_test`( `a` string, `b` string, `c` string, `d` string, `e` string, `f` string, `g` smallint, `h` smallint, `i` tinyint, `j` string, `k` string, `l` string, `m` float, `n` float, `o` float, `p` float, `q` int, `r` smallint, `s` float, `t` tinyint) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' LOCATION '/tmp/tbl_test'; I will be reachable over +919791081769 and +919008482114. We could also have webex call if it is feasible for you THanks and Regards, Naveen Srikanth D
... View more
07-09-2018
04:14 AM
Dear All, Below is my problem statement: I am trying to create the external table through hive. I am getting problems when I query 1)When I query count(*) from Hive and impala results are differing . 2)When I query an column in Hive with isnull condition I am getting resultset 6 rows. In these 6 rows first 3 coulmns has data with values and from 4th column values are with NULL. But when I fire the same query in impala I am not getting any rowsl What could be the isssue please help me. Below are the last lines in ddl query ROW FORMAT DELIMITED FIELDS TERMINATED BY ' |' LOCATION '/x/f/w/' Thanks and Regards, Naveen Srikanth D
... View more
Labels:
- Labels:
-
Apache Hive
-
Apache Impala
-
Cloudera Hue