Skip to content
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

Bind UI related resources on a secondary port. #64

Open
wants to merge 229 commits into
base: twitter-master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 222 commits
Commits
Show all changes
229 commits
Select commit Hold shift + click to select a range
cc95c27
Ignore if the partitions have no corresponfing hdfs valid path.
Sep 25, 2015
bce8187
Append nulls for missing values in Parquet.
Oct 1, 2015
5e68e6b
Merge pull request #1 from twitter-forks/twtr-filenotfound-bypass
saileshmittal Oct 1, 2015
2fef94e
Merge pull request #2 from twitter-forks/appendNullsForMissingParquet…
saileshmittal Oct 1, 2015
3bbcbb7
[maven-release-plugin] prepare for tw-0.1 release.
Oct 1, 2015
ca8560f
[maven-release-plugin] prepare for release 0.119-tw-0.1.
Oct 1, 2015
eff7e3b
Merge branch 'master' into twitter-master
Oct 2, 2015
ec109d1
Compare types ignoring cases. This is not complete solution and shoul…
Oct 2, 2015
413468d
Merge branch 'master' into twitter-master
Oct 2, 2015
d5cb455
Merge branch 'twitter-master' into case-insensitive-types
Oct 2, 2015
cc53eb2
Merge pull request #3 from twitter-forks/case-insensitive-types
saileshmittal Oct 2, 2015
c76b42e
Revert "Reduce allocation of hadoop configuration objects"
Oct 9, 2015
4e1dd9e
Merge branch 'master' into twitter-master
Oct 9, 2015
f0d9ab0
Bump up zookeeper version to 3.4.6
Oct 13, 2015
3bbabce
Read metastore info from zookeeper.
Oct 13, 2015
202e620
Add some tests and fix injection issue.
Oct 13, 2015
93f55bb
Remove Created by comments added by Idea.
Oct 14, 2015
37bd730
Merge pull request #5 from twitter-forks/zookeeperBasedMetastore
saileshmittal Oct 14, 2015
2154bf1
Merge branch 'master' into twitter-master
Oct 21, 2015
6083339
Fix some warnings after merging latest master.
Oct 22, 2015
972d5d1
Create ParquetHiveRecordCursor as user, so that hdfs reads happen as …
Oct 23, 2015
d014001
Propagate user session information throughout hive metastore.
Oct 26, 2015
bae9de6
Revert 972d5d166bc8174c9cef50b1066f6efc9a07a02b
Oct 26, 2015
a393158
Load splits as user so that hdfs reads happen as that user.
Oct 26, 2015
1b65e2f
UserBasedHiveMetastore to access metastore as user issuing the query.
Oct 26, 2015
32c7e9d
Merge pull request #6 from twitter-forks/run-queries-as-user
saileshmittal Oct 26, 2015
7cbc53a
Import missed import.
Oct 26, 2015
acfd0c7
Use standard charset for UTF-8 instead of string.
Oct 26, 2015
a5a4f8c
Pick username from unix system and disallow overriding it.
Nov 3, 2015
d1d87ac
Merge pull request #7 from twitter-forks/disable-setting-user
saileshmittal Nov 3, 2015
e26fd78
Revert "Propagate user session information throughout hive metastore."
Nov 23, 2015
8c99eeb
Revert "Load splits as user so that hdfs reads happen as that user."
Nov 23, 2015
884902f
Revert "UserBasedHiveMetastore to access metastore as user issuing th…
Nov 23, 2015
318bbaf
Merge pull request #8 from twitter-forks/revert-user-based-metastore
saileshmittal Nov 23, 2015
4a8c8bd
Merge tag '0.126' into twitter-master
Nov 23, 2015
fe37227
Prepare for release 0.126-tw-0.7.
Nov 23, 2015
344c8f0
HiveSplitManager to start HiveSplitLoader as session user
Dec 8, 2015
378c4ed
fixing indentation
Dec 8, 2015
484e255
fixing indentation
Dec 8, 2015
54bb135
Merge pull request #9 from billonahill/billg/IQ-23_runAsUser
saileshmittal Dec 8, 2015
4300a90
Updating version from to 0.126-tw-0.8
Dec 9, 2015
b00c53a
Revert runAsUser in preparation for 0.130 upgrade
Dec 17, 2015
adb149c
Changing pom version to 0.130 to avoid merge conflicts when merging i…
Dec 17, 2015
72b408d
Merge 0.130 from master
Dec 17, 2015
e84c4a4
Prepare for release 0.130-tw-0.9
Dec 17, 2015
fb45efb
Merge pull request #10 from billonahill/billg/revert_run_as
saileshmittal Dec 17, 2015
3861dc3
Remove empty line to fix stylecheck error
Dec 17, 2015
500fd08
Merge pull request #11 from billonahill/upgrade_to_130
Dec 17, 2015
7dd60e5
Allow Hive queries to read as the querying user
Dec 23, 2015
efc25af
add links to jiras
Dec 23, 2015
ef06e47
Clean up comments and constant order
Dec 23, 2015
2c22d81
Merge pull request #12 from billonahill/billg/IQ-39_hive_run_as_user
Jan 4, 2016
2200cde
Upgrading to 0.130-tw-0.10
Jan 4, 2016
1b38bdf
Updating unit tests for ReadAsQueryUser flag
Jan 4, 2016
44bd89e
Merge pull request #13 from billonahill/billg/IQ-39_hive_run_as_user_…
Jan 4, 2016
9f646d1
Avoid NPE when ZK changed state is related to connection change.
Jan 6, 2016
347e913
Merge pull request #14 from twitter-forks/IQ-96_zk_metastore_NPE
Jan 6, 2016
4897330
Cache the UGI object per user in BackgroundHiveSplitLoader
Jan 12, 2016
a40603c
Merge pull request #15 from billonahill/billg/IQ-93_hive_ugi_leak
Jan 12, 2016
53ae65b
Upgrading version to 0.130-tw-0.11
Jan 12, 2016
d2d2923
Merge pull request #16 from billonahill/upgrade_to_130_11
Jan 12, 2016
eff466b
Change version to 0.132.
Jan 13, 2016
84a1cb1
Merge tag '0.132' into upgrade_to_0.132_12
Jan 13, 2016
14fdca1
Change version to 0.132-tw-0.12.
Jan 13, 2016
f32a4ba
Merge pull request #17 from saileshmittal/upgrade_to_0.132_12
Jan 14, 2016
310441d
HivePageSourceProvider to support query as user from workers
Jan 15, 2016
75713e7
Merge pull request #18 from billonahill/billg/IQ-122_presto_tasks_as_…
Jan 15, 2016
cab14e9
Upgrading presto to 0.132-tw-13
Jan 15, 2016
d8e5545
Merge pull request #19 from billonahill/upgrade_to_132_13
saileshmittal Jan 15, 2016
cfc2113
Revert PR#3, case insensitive types, since it is now supported.
Jan 31, 2016
b25b9f0
Update to use UGI.createProxyUser instead of createRemoteUser
Feb 3, 2016
3fe2d59
Merge pull request #21 from billonahill/billg/IQ-85_fix_run_as
Feb 3, 2016
ea2c8c3
Upgrade to 0.132-tw-0.14
Feb 3, 2016
228255b
Merge pull request #22 from billonahill/upgrade_to_132_14
Feb 3, 2016
6ac4bc4
Whitelist zeppelin temporarily
Feb 4, 2016
99f824d
Merge pull request #23 from billonahill/billg/IQ-152_zeppelin_whitelist
Feb 4, 2016
6d857e6
Upgrade to 0.132-tw-0.15
Feb 4, 2016
ddc1960
Merge pull request #24 from billonahill/upgrade_to_132_15
Feb 4, 2016
91a7875
Merge pull request #20 from saileshmittal/revert-pr-3
Feb 8, 2016
207a2cc
Rolling back Zeppelin auth hack, add some logging
Feb 11, 2016
b71b9f7
Merge pull request #25 from billonahill/billg/IQ-152_roll_back_zeppel…
Feb 11, 2016
daa3773
Upgrading to 0.132-tw-0.16
Feb 11, 2016
b71195c
Merge pull request #26 from billonahill/upgrade_to_132_16
Feb 11, 2016
f4fed25
Change version to 0.139 to not conflict with merge
Feb 24, 2016
b3a94e1
merge from 0.139
Feb 24, 2016
2c9da60
upgrade pom version to 0.139-tw-0.17
Feb 24, 2016
d295eea
Merge pull request #27 from billonahill/upgrade_to_139_17
Feb 24, 2016
582df38
Adding query logging to presto queries
Feb 24, 2016
04e60cc
Add a few logs in DiscoveryNodeManager to debug 'No worker nodes' error.
Feb 29, 2016
56582c3
Merge pull request #29 from saileshmittal/add-logs-to-discovery
saileshmittal Feb 29, 2016
280e37c
Merge pull request #28 from billonahill/billg/log_presto_queries
saileshmittal Feb 29, 2016
4ca01a7
Upgrade to 0.139-tw-0.18
Feb 29, 2016
3a4a156
Merge pull request #30 from saileshmittal/upgrade_to_139_18
saileshmittal Feb 29, 2016
f1085e0
Look up parquet columns by name case-insensitive
Mar 1, 2016
775eee8
Merge pull request #31 from billonahill/billg/case_insensitive_parque…
Mar 2, 2016
5b4647a
Upgrading to 0.139-tw-0.19
Mar 2, 2016
f766a0c
Handle hive keywords when doing a name-based parquet field lookup
Mar 2, 2016
a062c56
Merge branch 'billg/keyword_aware_parquet_column_match' into upgrade_…
Mar 2, 2016
ca9961e
Refactor to make diff cleaner
Mar 2, 2016
423f5cf
Merge branch 'billg/keyword_aware_parquet_column_match' into upgrade_…
Mar 2, 2016
a1807ed
Merge pull request #32 from billonahill/billg/keyword_aware_parquet_c…
Mar 2, 2016
d687155
Merge branch 'twitter-master' into upgrade_to_139_19
Mar 2, 2016
7eb8909
Merge pull request #33 from billonahill/upgrade_to_139_19
Mar 2, 2016
d7d66a2
Upgrade to 0.141.
Mar 11, 2016
a7a5233
Merge tag '0.141' into upgrade_to_141_20
Mar 11, 2016
94bcf3e
Upgrade to 0.141-tw-0.20.
Mar 11, 2016
dc6bebe
Merge pull request #34 from saileshmittal/upgrade_to_141_20
Mar 11, 2016
3de1ca4
Use modules and query events for logging
Mar 24, 2016
f055db6
Add javadocs
Mar 24, 2016
3c1c7b6
Add javadocs
Mar 24, 2016
d8afd62
fix imports
Mar 24, 2016
251db4d
add splits, rows and bytes
Mar 24, 2016
95035ec
Change to use QueryComplete
Mar 24, 2016
c95c702
Merge pull request #36 from billonahill/billg/IQ-192_refactor_logging
Mar 24, 2016
dbb4c42
Add event process and handlers and scribe query completion events
Mar 29, 2016
38e6d09
code clean-up
Mar 29, 2016
2ac4c42
Fix package leakage
Mar 29, 2016
a8d1ffc
Move twitter classes to a twitter package
Mar 29, 2016
73c5302
Default package is presto and thrift is custom
Mar 29, 2016
850e71c
Merge pull request #38 from billonahill/billg/twitter_specific_cleanup
Mar 30, 2016
fadd0f1
Removing test from scribe category
Mar 30, 2016
c45e721
Merge pull request #37 from billonahill/billg/scribe_query_complete_e…
Mar 30, 2016
2e5c3f2
change version to avoid merge conflicts
Mar 30, 2016
06134ba
Merge from 0.143
Mar 30, 2016
1673479
Update version to 0.143-tw-21
Mar 30, 2016
4e48cbd
Fixed to not use illegal import
Mar 30, 2016
55a3960
Reduce logging of unsupported HttpRequest events
Mar 30, 2016
57b91f2
Merge pull request #39 from billonahill/upgrade_to_143_21
Mar 30, 2016
8729a4e
Fix version from 0.143-tw-21 to 0.143-tw-0.21
Mar 30, 2016
e6579ab
Fix name of log category
Mar 31, 2016
a1ba15b
Fix scala dependency issues with twitter-master; removed scala 2.11 d…
Jul 22, 2016
0e573f8
Merge pull request #41 from dabaitu/fix-twitter-master
Jul 22, 2016
4844593
Cherry pick Tableau connector fix with bad defaults
Aug 9, 2016
1df4359
Cherry pick Tableau connector fix with bad defaults
Aug 15, 2016
ed7186a
Merge pull request #45 from dabaitu/fix-tableau-connector
dabaitu Aug 15, 2016
1e07aea
Cherry pick Tableau connector fix with bad defaults
Aug 9, 2016
8d08d22
merge local twitter-master to origin/twitter-master
Aug 15, 2016
795ab44
Merge pull request #46 from dabaitu/twitter-master
dabaitu Aug 16, 2016
6e9bfea
add hack to javascript to make requests in https if page was visited …
Aug 18, 2016
bf4dec2
address Zhihao's comment to mind case where nextUri might already hav…
Aug 18, 2016
785fc53
Merge pull request #1 from dabaitu/fix-tableau-connector-js
dabaitu Aug 18, 2016
c49e1d1
Merge pull request #47 from dabaitu/twitter-master
dabaitu Aug 18, 2016
443f76b
update tag to 0.143-tw-0.23
Aug 18, 2016
fb6fe59
Merge pull request #48 from dabaitu/twitter-master
dabaitu Aug 19, 2016
67d22d7
Added shuffle for metastores in order to balance connection load
Yaliang Oct 25, 2016
ecfa6c0
Added log for hive connection and log for RetryDriver
Yaliang Oct 28, 2016
dee6336
Used RuntimeException to replace PrestoException, prevent whitelist s…
Yaliang Oct 31, 2016
56d7c36
Used formatter for logs
Yaliang Nov 1, 2016
36175ec
remove obsolete event listener implementation - part 1 of 3 for upgra…
Nov 2, 2016
f89cc40
update version first
Nov 8, 2016
4932c5f
resolve conflicts
Nov 8, 2016
9b5d000
use new twitter version
Nov 8, 2016
53dcebe
avoid java version check for twitter
Nov 8, 2016
e5084e2
Merge pull request #51 from dabaitu/upgrade_to_149
dabaitu Nov 17, 2016
488d786
Added shuffle for metastores in order to balance connection load
Yaliang Oct 25, 2016
b33652e
Added log for hive connection and log for RetryDriver
Yaliang Oct 28, 2016
c438569
Used RuntimeException to replace PrestoException, prevent whitelist s…
Yaliang Oct 31, 2016
43eff7d
Used formatter for logs
Yaliang Nov 1, 2016
1c1f249
Merge branch 'yaliang/hiveConnectionRetry' of https://github.com/Yali…
Yaliang Nov 18, 2016
abe1d34
Fix bug for tableau webapp
Yaliang Nov 18, 2016
39e908b
Release version update
Yaliang Nov 18, 2016
4b18ac1
pull fix from 0.157 for tableau connector
Nov 21, 2016
717b64e
Merge pull request #52 from dabaitu/twitter-master
dabaitu Nov 21, 2016
a4cc265
Merged from twitter-master
Yaliang Nov 22, 2016
58355af
Merge pull request #49 from Yaliang/yaliang/hiveConnectionRetry
Yaliang Nov 22, 2016
35f71d2
Undo erroneous merge of commit 36175ec6d47d24ff3d7519f68d3e5c0d0af0fc…
Nov 22, 2016
3063079
update tag to 0.149-tw-0.27
Nov 22, 2016
5f21b82
take out swap file
Nov 22, 2016
4fb5a4d
Merge pull request #53 from dabaitu/twitter-master
dabaitu Nov 22, 2016
1613f3c
update tag to 0.157 to avoid unnecessary conflicts
Dec 1, 2016
6960462
Upgrade to 0.157, resolve conflicts and add twitter event listener
Dec 1, 2016
50b4884
update tag
Dec 1, 2016
56fc857
remove current impl of twitter event scriber - upgrade to 0.157 part …
Dec 1, 2016
5edff82
Merge pull request #55 from dabaitu/remove-current-twitter-event-scriber
dabaitu Dec 1, 2016
77b5d27
upgrade to oss 0.157 without new twitter event scriber
Dec 1, 2016
a184a61
resolve conflicts
Dec 1, 2016
70dc428
merge dabaitu-upgrade_to_oss_157
Dec 1, 2016
16db1d7
Merge pull request #57 from dabaitu/twitter-master
dabaitu Dec 2, 2016
c6fe499
add new twitter event scriber impl as plugin
Dec 2, 2016
978c186
add twitter-eventlistener-plugin as module to top level pom
Dec 2, 2016
3df6fed
address Bill's comments
Dec 3, 2016
86917ea
back out version change, address comments
Dec 5, 2016
1d36d64
constructor first then public, private methods
Dec 5, 2016
41a0ab3
remove accidental commit
Dec 5, 2016
a286397
Merge pull request #58 from dabaitu/twitter-master
dabaitu Dec 6, 2016
0ed477a
Prepare for 0.157-tw-0.28 internal release
Dec 6, 2016
bd81063
Merge pull request #59 from dabaitu/twitter-master
dabaitu Dec 7, 2016
c0ada2b
Added TTransportPool
Yaliang Dec 8, 2016
46031f8
Added PooledTTransportFactory
Yaliang Dec 9, 2016
94991f2
Correct errors
Yaliang Dec 9, 2016
0f1a826
Remove Transport in PooledObjectFactory
Yaliang Dec 9, 2016
65e2bea
Added logs
Yaliang Dec 9, 2016
090cd4a
Try to cast class before return
Yaliang Dec 9, 2016
30b6d59
Changed mapping key as String
Yaliang Dec 9, 2016
646106a
Removed logging
Yaliang Dec 10, 2016
eca3b40
Added validation, added log to print mean wait time for each pool
Yaliang Dec 12, 2016
9c0e9f2
Added more values for logging
Yaliang Dec 12, 2016
6123869
Set Eviction Configs
Yaliang Dec 13, 2016
cdc7433
Added support to pass transport pool config
Yaliang Dec 14, 2016
604d9d2
Update ZKMConfig test set
Yaliang Dec 14, 2016
602acb0
Enforce thread safety
Yaliang Dec 14, 2016
518c27e
Remove default constructor
Yaliang Dec 14, 2016
e2bc692
Apply 100 ruler
Yaliang Dec 15, 2016
53e2d02
Merge pull request #60 from Yaliang/yaliangw/addConnectionPool
Yaliang Dec 16, 2016
ae66897
Update release version to 0.157-tw-0.29
Yaliang Dec 16, 2016
c1c4575
Merge pull request #61 from Yaliang/yaliangw/updateReleaseVersion
Yaliang Dec 16, 2016
aba8854
invoke isReachable to test connection
Yaliang Dec 20, 2016
b1c4854
switch to 0.161 tag first
Jan 4, 2017
95819b7
resolve merge conflict to 0.161
Jan 4, 2017
dcb3a39
revert back to old twitter tag
Jan 4, 2017
0b0da52
correct revert version
Jan 5, 2017
dad17c2
disable ui in coordinator
Yaliang Jan 6, 2017
0cf760d
Merge pull request #63 from dabaitu/twitter-master
dabaitu Jan 6, 2017
76f4364
Merge pull request #62 from Yaliang/yaliangw/connectionValidate
dabaitu Jan 6, 2017
96681ee
Disable ui and added ui module
Yaliang Jan 6, 2017
a2dbd99
Added ui module
Yaliang Jan 6, 2017
11255bd
Merge branch 'twitter-master' into yaliangw/seperateUI
Yaliang Jan 6, 2017
bcc8c18
bind port
Yaliang Jan 7, 2017
4dcee6a
Fixed json encoder
Yaliang Jan 8, 2017
97bdf30
Add ui port enable config, clean code
Yaliang Jan 8, 2017
5953046
clearup
Yaliang Jan 8, 2017
36f14d7
Changed config property name
Yaliang Jan 8, 2017
495a22f
remove unused modules
Yaliang Jan 10, 2017
228dbd7
remove more modules
Yaliang Jan 10, 2017
432dcfb
reuse initialized json mapper
Yaliang Jan 10, 2017
fa6456c
remove more resource
Yaliang Jan 12, 2017
52f1a14
Correct ui announcement
Yaliang Jan 13, 2017
37fe86a
use rerandomed node id to register ui service
Yaliang Jan 14, 2017
b5fe62f
allow override the resouce binding code
Yaliang Jan 17, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.161</version>
<version>0.157-tw-0.29</version>
<packaging>pom</packaging>

<name>presto-root</name>
Expand All @@ -28,9 +28,9 @@
</licenses>

<scm>
<connection>scm:git:git://github.com/facebook/presto.git</connection>
<url>https://github.com/facebook/presto</url>
<tag>0.161</tag>
<connection>scm:git:git://github.com/twitter-forks/presto.git</connection>
<url>https://github.com/twitter-forks/presto</url>
<tag>0.157-tw-0.29</tag>
</scm>

<properties>
Expand Down Expand Up @@ -91,6 +91,7 @@
<module>presto-hive-cdh5</module>
<module>presto-teradata-functions</module>
<module>presto-example-http</module>
<module>twitter-eventlistener-plugin</module>
<module>presto-local-file</module>
<module>presto-tpch</module>
<module>presto-raptor</module>
Expand Down Expand Up @@ -643,6 +644,12 @@
<version>3.2</version>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
<version>2.4.2</version>
</dependency>

<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion presto-accumulo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.161</version>
<version>0.157-tw-0.29</version>
</parent>

<artifactId>presto-accumulo</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion presto-array/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.161</version>
<version>0.157-tw-0.29</version>
</parent>

<artifactId>presto-array</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion presto-atop/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.161</version>
<version>0.157-tw-0.29</version>
</parent>

<artifactId>presto-atop</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion presto-base-jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.161</version>
<version>0.157-tw-0.29</version>
</parent>

<artifactId>presto-base-jdbc</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion presto-benchmark-driver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.161</version>
<version>0.157-tw-0.29</version>
</parent>

<artifactId>presto-benchmark-driver</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion presto-benchmark/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>presto-root</artifactId>
<groupId>com.facebook.presto</groupId>
<version>0.161</version>
<version>0.157-tw-0.29</version>
</parent>

<artifactId>presto-benchmark</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion presto-blackhole/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.161</version>
<version>0.157-tw-0.29</version>
</parent>

<artifactId>presto-blackhole</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion presto-bytecode/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.161</version>
<version>0.157-tw-0.29</version>
</parent>

<artifactId>presto-bytecode</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion presto-cassandra/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.161</version>
<version>0.157-tw-0.29</version>
</parent>

<artifactId>presto-cassandra</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion presto-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.161</version>
<version>0.157-tw-0.29</version>
</parent>

<artifactId>presto-cli</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import com.google.common.base.Splitter;
import com.google.common.collect.ImmutableMap;
import com.google.common.net.HostAndPort;
import com.sun.security.auth.module.UnixSystem;
import io.airlift.airline.Option;
import io.airlift.http.client.spnego.KerberosConfig;
import io.airlift.units.Duration;
Expand Down Expand Up @@ -72,15 +73,16 @@ public class ClientOptions
@Option(name = "--keystore-password", title = "keystore password", description = "Keystore password")
public String keystorePassword;

// Pick the user name for the logged in user.
// Do not let it be overridden by users.
public String user = new UnixSystem().getUsername();

@Option(name = "--truststore-path", title = "truststore path", description = "Truststore path")
public String truststorePath;

@Option(name = "--truststore-password", title = "truststore password", description = "Truststore password")
public String truststorePassword;

@Option(name = "--user", title = "user", description = "Username")
public String user = System.getProperty("user.name");

@Option(name = "--source", title = "source", description = "Name of source making query")
public String source = "presto-cli";

Expand Down
2 changes: 1 addition & 1 deletion presto-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.161</version>
<version>0.157-tw-0.29</version>
</parent>

<artifactId>presto-client</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion presto-docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.161</version>
<version>0.157-tw-0.29</version>
</parent>

<artifactId>presto-docs</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion presto-example-http/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.161</version>
<version>0.157-tw-0.29</version>
</parent>

<artifactId>presto-example-http</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion presto-hive-cdh4/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.161</version>
<version>0.157-tw-0.29</version>
</parent>

<artifactId>presto-hive-cdh4</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion presto-hive-cdh5/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.161</version>
<version>0.157-tw-0.29</version>
</parent>

<artifactId>presto-hive-cdh5</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion presto-hive-hadoop1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.161</version>
<version>0.157-tw-0.29</version>
</parent>

<artifactId>presto-hive-hadoop1</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion presto-hive-hadoop2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.161</version>
<version>0.157-tw-0.29</version>
</parent>

<artifactId>presto-hive-hadoop2</artifactId>
Expand Down
51 changes: 50 additions & 1 deletion presto-hive/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.161</version>
<version>0.157-tw-0.29</version>
</parent>

<artifactId>presto-hive</artifactId>
Expand Down Expand Up @@ -53,11 +53,54 @@
<artifactId>hive-apache</artifactId>
</dependency>

<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-recipes</artifactId>
<version>2.8.0</version>
</dependency>

<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-framework</artifactId>
<version>2.8.0</version>
</dependency>

<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-client</artifactId>
<version>2.8.0</version>
</dependency>

<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-test</artifactId>
<version>2.8.0</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
<version>3.4.6</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.101tec</groupId>
<artifactId>zkclient</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.thrift</groupId>
<artifactId>libthrift</artifactId>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
</dependency>

<dependency>
<groupId>io.airlift</groupId>
<artifactId>aircompressor</artifactId>
Expand Down Expand Up @@ -93,6 +136,12 @@
<artifactId>configuration</artifactId>
</dependency>

<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1</version>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import com.facebook.presto.spi.PrestoException;
import com.facebook.presto.spi.StandardErrorCode;
import com.facebook.presto.spi.predicate.TupleDomain;
import com.facebook.presto.twitter.hive.util.UgiUtils;
import com.google.common.collect.ImmutableList;
import com.google.common.io.CharStreams;
import io.airlift.units.DataSize;
Expand All @@ -40,11 +41,13 @@
import org.apache.hadoop.mapred.InputSplit;
import org.apache.hadoop.mapred.JobConf;
import org.apache.hadoop.mapred.TextInputFormat;
import org.apache.hadoop.security.UserGroupInformation;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.security.PrivilegedExceptionAction;
import java.util.ArrayList;
import java.util.Deque;
import java.util.List;
Expand Down Expand Up @@ -151,8 +154,15 @@ public BackgroundHiveSplitLoader(
public void start(HiveSplitSource splitSource)
{
this.hiveSplitSource = splitSource;

UserGroupInformation ugi = null;

if (HiveSessionProperties.getReadAsQueryUser(session)) {
ugi = UgiUtils.getUgi(session.getUser());
}

for (int i = 0; i < maxPartitionBatchSize; i++) {
ResumableTasks.submit(executor, new HiveSplitLoaderTask());
ResumableTasks.submit(executor, new HiveSplitLoaderTask(ugi));
}
}

Expand All @@ -165,8 +175,30 @@ public void stop()
private class HiveSplitLoaderTask
implements ResumableTask
{
private UserGroupInformation ugi;

public HiveSplitLoaderTask(UserGroupInformation ugi)
{
this.ugi = ugi;
}

@Override
public TaskStatus process()
{
if (ugi != null) {
try {
return ugi.doAs((PrivilegedExceptionAction<TaskStatus>) this::doProcess);
}
catch (IOException | InterruptedException e) {
throw new RuntimeException("Could not runAs " + session.getUser(), e);
}
}
else {
return doProcess();
}
}

private TaskStatus doProcess()
{
while (true) {
if (stopped) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ public class HiveClientConfig

private boolean allowCorruptWritesForTesting;

private boolean readAsQueryUser = false;

private Duration metastoreCacheTtl = new Duration(1, TimeUnit.HOURS);
private Duration metastoreRefreshInterval = new Duration(1, TimeUnit.SECONDS);
private long metastoreCacheMaximumSize = 10000;
Expand Down Expand Up @@ -305,6 +307,19 @@ public HiveClientConfig setAllowCorruptWritesForTesting(boolean allowCorruptWrit
return this;
}

public boolean getReadAsQueryUser()
{
return readAsQueryUser;
}

@Config("hive.read-as-query-user")
@ConfigDescription("When querying hive read data as the user submitting the query instead of as the presto daemon user")
public HiveClientConfig setReadAsQueryUser(boolean readAsQueryUser)
{
this.readAsQueryUser = readAsQueryUser;
return this;
}

@NotNull
public Duration getMetastoreCacheTtl()
{
Expand Down
Loading