{"action":"created","comment":{"url":"https://api.github.com/repos/cloudera/impyla/pulls/comments/35458831","id":35458831,"diff_hunk":"@@ -0,0 +1,68 @@\n+#!/usr/bin/env python\n+# Copyright (c) 2012 Cloudera, Inc. All rights reserved.\n+#\n+# Licensed under the Apache License, Version 2.0 (the \"License\");\n+# you may not use this file except in compliance with the License.\n+# 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+# Thrift utility functions\n+\n+from thrift.transport.TSocket import TSocket\n+from thrift.transport.TTransport import TBufferedTransport","path":"impala/_rpc/thrift_util.py","position":19,"original_position":19,"commit_id":"0d8a2ad4d673606e22849bba68adc32fbb697c0d","original_commit_id":"0d8a2ad4d673606e22849bba68adc32fbb697c0d","user":{"login":"laserson","id":118141,"avatar_url":"https://avatars.githubusercontent.com/u/118141?v=3","gravatar_id":"","url":"https://api.github.com/users/laserson","html_url":"https://github.com/laserson","followers_url":"https://api.github.com/users/laserson/followers","following_url":"https://api.github.com/users/laserson/following{/other_user}","gists_url":"https://api.github.com/users/laserson/gists{/gist_id}","starred_url":"https://api.github.com/users/laserson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laserson/subscriptions","organizations_url":"https://api.github.com/users/laserson/orgs","repos_url":"https://api.github.com/users/laserson/repos","events_url":"https://api.github.com/users/laserson/events{/privacy}","received_events_url":"https://api.github.com/users/laserson/received_events","type":"User","site_admin":false},"body":"These classes actually need to be imported from the `_thrift_api` submodule.  Looking at this, it appears there's some unnecessary duplication there as well.  Perhaps this whole `thrift_util.py` file can be moved into `_thrift_api/__init__.py`?  And `TSocket` and `TBufferedTransport` can be moved into the common `__init__.py`?","created_at":"2015-07-24T19:43:31Z","updated_at":"2015-07-24T19:43:31Z","html_url":"https://github.com/cloudera/impyla/pull/93#discussion_r35458831","pull_request_url":"https://api.github.com/repos/cloudera/impyla/pulls/93","_links":{"self":{"href":"https://api.github.com/repos/cloudera/impyla/pulls/comments/35458831"},"html":{"href":"https://github.com/cloudera/impyla/pull/93#discussion_r35458831"},"pull_request":{"href":"https://api.github.com/repos/cloudera/impyla/pulls/93"}}},"pull_request":{"url":"https://api.github.com/repos/cloudera/impyla/pulls/93","id":40751139,"html_url":"https://github.com/cloudera/impyla/pull/93","diff_url":"https://github.com/cloudera/impyla/pull/93.diff","patch_url":"https://github.com/cloudera/impyla/pull/93.patch","issue_url":"https://api.github.com/repos/cloudera/impyla/issues/93","number":93,"state":"open","locked":false,"title":"Add support for configuring authentication mechanisms (required for H…","user":{"login":"lskuff","id":1679299,"avatar_url":"https://avatars.githubusercontent.com/u/1679299?v=3","gravatar_id":"","url":"https://api.github.com/users/lskuff","html_url":"https://github.com/lskuff","followers_url":"https://api.github.com/users/lskuff/followers","following_url":"https://api.github.com/users/lskuff/following{/other_user}","gists_url":"https://api.github.com/users/lskuff/gists{/gist_id}","starred_url":"https://api.github.com/users/lskuff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lskuff/subscriptions","organizations_url":"https://api.github.com/users/lskuff/orgs","repos_url":"https://api.github.com/users/lskuff/repos","events_url":"https://api.github.com/users/lskuff/events{/privacy}","received_events_url":"https://api.github.com/users/lskuff/received_events","type":"User","site_admin":false},"body":"…ive)\r\n\r\nHive's default transport is PLAIN SASL where Impala does not use SASL. Impala and Impyla\r\nsupport supported PLAIN SASL, but only for LDAP connections. This change updates Impyla\r\nto allow the authentication mechanism to be specified as part of the connect() call.\r\n\r\nFor example, connections to Hive can be made using:\r\nconn = connect(host='host', port=10000, auth_mechanism='PLAIN')\r\n\r\nThe valid values for auth_mechanism are:\r\n- LDAP - Uses plain SASL, but there are some differences in how passwords are handled.\r\n- PLAIN - Authenticate using plain SASL\r\n- GSSAPI - Authenticate using SASL with GSSAPI (Kerberos)\r\n- NOSASL - Don't use sasl.\r\n\r\nauth_mechanism is optional and if it is not specifieid the default stays will be the same\r\nas it is today - NOSASL. Support for the use_kerberos / use_ldap flags also is allowed\r\nin which case the mechanism will be set to the appropriate value.\r\n\r\nAs part of this change there was a bunch of duplication between Beeswax and HS2 so this\r\nfixes that problem by putting the common code in a thrift_util module.","created_at":"2015-07-24T08:00:57Z","updated_at":"2015-07-24T19:43:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"523a53dc65e572e89b72868418d7beddcbda04e1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cloudera/impyla/pulls/93/commits","review_comments_url":"https://api.github.com/repos/cloudera/impyla/pulls/93/comments","review_comment_url":"https://api.github.com/repos/cloudera/impyla/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cloudera/impyla/issues/93/comments","statuses_url":"https://api.github.com/repos/cloudera/impyla/statuses/0d8a2ad4d673606e22849bba68adc32fbb697c0d","head":{"label":"lskuff:master","ref":"master","sha":"0d8a2ad4d673606e22849bba68adc32fbb697c0d","user":{"login":"lskuff","id":1679299,"avatar_url":"https://avatars.githubusercontent.com/u/1679299?v=3","gravatar_id":"","url":"https://api.github.com/users/lskuff","html_url":"https://github.com/lskuff","followers_url":"https://api.github.com/users/lskuff/followers","following_url":"https://api.github.com/users/lskuff/following{/other_user}","gists_url":"https://api.github.com/users/lskuff/gists{/gist_id}","starred_url":"https://api.github.com/users/lskuff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lskuff/subscriptions","organizations_url":"https://api.github.com/users/lskuff/orgs","repos_url":"https://api.github.com/users/lskuff/repos","events_url":"https://api.github.com/users/lskuff/events{/privacy}","received_events_url":"https://api.github.com/users/lskuff/received_events","type":"User","site_admin":false},"repo":{"id":39619234,"name":"impyla","full_name":"lskuff/impyla","owner":{"login":"lskuff","id":1679299,"avatar_url":"https://avatars.githubusercontent.com/u/1679299?v=3","gravatar_id":"","url":"https://api.github.com/users/lskuff","html_url":"https://github.com/lskuff","followers_url":"https://api.github.com/users/lskuff/followers","following_url":"https://api.github.com/users/lskuff/following{/other_user}","gists_url":"https://api.github.com/users/lskuff/gists{/gist_id}","starred_url":"https://api.github.com/users/lskuff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lskuff/subscriptions","organizations_url":"https://api.github.com/users/lskuff/orgs","repos_url":"https://api.github.com/users/lskuff/repos","events_url":"https://api.github.com/users/lskuff/events{/privacy}","received_events_url":"https://api.github.com/users/lskuff/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lskuff/impyla","description":"Python client and Numba-based UDFs for Impala","fork":true,"url":"https://api.github.com/repos/lskuff/impyla","forks_url":"https://api.github.com/repos/lskuff/impyla/forks","keys_url":"https://api.github.com/repos/lskuff/impyla/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lskuff/impyla/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lskuff/impyla/teams","hooks_url":"https://api.github.com/repos/lskuff/impyla/hooks","issue_events_url":"https://api.github.com/repos/lskuff/impyla/issues/events{/number}","events_url":"https://api.github.com/repos/lskuff/impyla/events","assignees_url":"https://api.github.com/repos/lskuff/impyla/assignees{/user}","branches_url":"https://api.github.com/repos/lskuff/impyla/branches{/branch}","tags_url":"https://api.github.com/repos/lskuff/impyla/tags","blobs_url":"https://api.github.com/repos/lskuff/impyla/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lskuff/impyla/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lskuff/impyla/git/refs{/sha}","trees_url":"https://api.github.com/repos/lskuff/impyla/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lskuff/impyla/statuses/{sha}","languages_url":"https://api.github.com/repos/lskuff/impyla/languages","stargazers_url":"https://api.github.com/repos/lskuff/impyla/stargazers","contributors_url":"https://api.github.com/repos/lskuff/impyla/contributors","subscribers_url":"https://api.github.com/repos/lskuff/impyla/subscribers","subscription_url":"https://api.github.com/repos/lskuff/impyla/subscription","commits_url":"https://api.github.com/repos/lskuff/impyla/commits{/sha}","git_commits_url":"https://api.github.com/repos/lskuff/impyla/git/commits{/sha}","comments_url":"https://api.github.com/repos/lskuff/impyla/comments{/number}","issue_comment_url":"https://api.github.com/repos/lskuff/impyla/issues/comments{/number}","contents_url":"https://api.github.com/repos/lskuff/impyla/contents/{+path}","compare_url":"https://api.github.com/repos/lskuff/impyla/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lskuff/impyla/merges","archive_url":"https://api.github.com/repos/lskuff/impyla/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lskuff/impyla/downloads","issues_url":"https://api.github.com/repos/lskuff/impyla/issues{/number}","pulls_url":"https://api.github.com/repos/lskuff/impyla/pulls{/number}","milestones_url":"https://api.github.com/repos/lskuff/impyla/milestones{/number}","notifications_url":"https://api.github.com/repos/lskuff/impyla/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lskuff/impyla/labels{/name}","releases_url":"https://api.github.com/repos/lskuff/impyla/releases{/id}","created_at":"2015-07-24T07:57:47Z","updated_at":"2015-07-24T07:57:48Z","pushed_at":"2015-07-24T07:58:28Z","git_url":"git://github.com/lskuff/impyla.git","ssh_url":"git@github.com:lskuff/impyla.git","clone_url":"https://github.com/lskuff/impyla.git","svn_url":"https://github.com/lskuff/impyla","homepage":null,"size":2998,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"cloudera:master","ref":"master","sha":"6b137897b02c2ede8c35fdf567068f8afe13622f","user":{"login":"cloudera","id":87383,"avatar_url":"https://avatars.githubusercontent.com/u/87383?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudera","html_url":"https://github.com/cloudera","followers_url":"https://api.github.com/users/cloudera/followers","following_url":"https://api.github.com/users/cloudera/following{/other_user}","gists_url":"https://api.github.com/users/cloudera/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudera/subscriptions","organizations_url":"https://api.github.com/users/cloudera/orgs","repos_url":"https://api.github.com/users/cloudera/repos","events_url":"https://api.github.com/users/cloudera/events{/privacy}","received_events_url":"https://api.github.com/users/cloudera/received_events","type":"Organization","site_admin":false},"repo":{"id":18780981,"name":"impyla","full_name":"cloudera/impyla","owner":{"login":"cloudera","id":87383,"avatar_url":"https://avatars.githubusercontent.com/u/87383?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudera","html_url":"https://github.com/cloudera","followers_url":"https://api.github.com/users/cloudera/followers","following_url":"https://api.github.com/users/cloudera/following{/other_user}","gists_url":"https://api.github.com/users/cloudera/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudera/subscriptions","organizations_url":"https://api.github.com/users/cloudera/orgs","repos_url":"https://api.github.com/users/cloudera/repos","events_url":"https://api.github.com/users/cloudera/events{/privacy}","received_events_url":"https://api.github.com/users/cloudera/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cloudera/impyla","description":"Python client and Numba-based UDFs for Impala","fork":false,"url":"https://api.github.com/repos/cloudera/impyla","forks_url":"https://api.github.com/repos/cloudera/impyla/forks","keys_url":"https://api.github.com/repos/cloudera/impyla/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cloudera/impyla/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cloudera/impyla/teams","hooks_url":"https://api.github.com/repos/cloudera/impyla/hooks","issue_events_url":"https://api.github.com/repos/cloudera/impyla/issues/events{/number}","events_url":"https://api.github.com/repos/cloudera/impyla/events","assignees_url":"https://api.github.com/repos/cloudera/impyla/assignees{/user}","branches_url":"https://api.github.com/repos/cloudera/impyla/branches{/branch}","tags_url":"https://api.github.com/repos/cloudera/impyla/tags","blobs_url":"https://api.github.com/repos/cloudera/impyla/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cloudera/impyla/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cloudera/impyla/git/refs{/sha}","trees_url":"https://api.github.com/repos/cloudera/impyla/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cloudera/impyla/statuses/{sha}","languages_url":"https://api.github.com/repos/cloudera/impyla/languages","stargazers_url":"https://api.github.com/repos/cloudera/impyla/stargazers","contributors_url":"https://api.github.com/repos/cloudera/impyla/contributors","subscribers_url":"https://api.github.com/repos/cloudera/impyla/subscribers","subscription_url":"https://api.github.com/repos/cloudera/impyla/subscription","commits_url":"https://api.github.com/repos/cloudera/impyla/commits{/sha}","git_commits_url":"https://api.github.com/repos/cloudera/impyla/git/commits{/sha}","comments_url":"https://api.github.com/repos/cloudera/impyla/comments{/number}","issue_comment_url":"https://api.github.com/repos/cloudera/impyla/issues/comments{/number}","contents_url":"https://api.github.com/repos/cloudera/impyla/contents/{+path}","compare_url":"https://api.github.com/repos/cloudera/impyla/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cloudera/impyla/merges","archive_url":"https://api.github.com/repos/cloudera/impyla/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cloudera/impyla/downloads","issues_url":"https://api.github.com/repos/cloudera/impyla/issues{/number}","pulls_url":"https://api.github.com/repos/cloudera/impyla/pulls{/number}","milestones_url":"https://api.github.com/repos/cloudera/impyla/milestones{/number}","notifications_url":"https://api.github.com/repos/cloudera/impyla/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cloudera/impyla/labels{/name}","releases_url":"https://api.github.com/repos/cloudera/impyla/releases{/id}","created_at":"2014-04-14T23:52:07Z","updated_at":"2015-06-29T08:45:24Z","pushed_at":"2015-07-24T08:00:57Z","git_url":"git://github.com/cloudera/impyla.git","ssh_url":"git@github.com:cloudera/impyla.git","clone_url":"https://github.com/cloudera/impyla.git","svn_url":"https://github.com/cloudera/impyla","homepage":null,"size":2998,"stargazers_count":107,"watchers_count":107,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":27,"mirror_url":null,"open_issues_count":23,"forks":27,"open_issues":23,"watchers":107,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cloudera/impyla/pulls/93"},"html":{"href":"https://github.com/cloudera/impyla/pull/93"},"issue":{"href":"https://api.github.com/repos/cloudera/impyla/issues/93"},"comments":{"href":"https://api.github.com/repos/cloudera/impyla/issues/93/comments"},"review_comments":{"href":"https://api.github.com/repos/cloudera/impyla/pulls/93/comments"},"review_comment":{"href":"https://api.github.com/repos/cloudera/impyla/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cloudera/impyla/pulls/93/commits"},"statuses":{"href":"https://api.github.com/repos/cloudera/impyla/statuses/0d8a2ad4d673606e22849bba68adc32fbb697c0d"}}}}