jdbc-hive2 0.11.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 4058ed7f8676aa524f0c8fe82cf6175caca56059
4
+ data.tar.gz: 47b8964142700e0372ea248fe15d3b9fe76c9ff1
5
+ SHA512:
6
+ metadata.gz: 7d735b3d11d688c84c551d6fd5416deec284c992661cf7d6382da0d768c29cc2989cd78fcc3513c62680e62903d661b165bc34d4628d7fd143e16820745bf373
7
+ data.tar.gz: 4f43fa0df32b6fca48139092b341b04060be3882aad2e7bb4fd677e7017b39c7fd37cdbfeac9177900e8463cc57637b7b5ef0ff6d8b2c6a76446fa365dc36fee
@@ -0,0 +1 @@
1
+ Gemfile.lock
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --colour --profile
2
+ --format documentation
3
+ --format progress
@@ -0,0 +1 @@
1
+ jruby-1.7.9
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gemspec
@@ -0,0 +1,13 @@
1
+ Copyright (c) 2012 Chris Parker <mrcsparker@gmail.com>
2
+
3
+ Permission to use, copy, modify, and/or distribute this software for any
4
+ purpose with or without fee is hereby granted, provided that the above
5
+ copyright notice and this permission notice appear in all copies.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1,12 @@
1
+ # jdbc-hive2
2
+
3
+ Hive2 JDBC driver that allows Java programs to connect to a HiveServer2
4
+ or Impala cluster using standard, database independent Java code.
5
+
6
+ ## Usage
7
+
8
+ To make the driver accessible to JDBC and ActiveRecord code running in
9
+ JRuby :
10
+
11
+ require 'jdbc/hive2'
12
+ Jdbc::Hive2.load_driver
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -0,0 +1,21 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = 'jdbc-hive2'
3
+ s.version = '0.11.0.1'
4
+ s.authors = ['Josh Ferguson']
5
+ s.email = %w(josh@modeanalytics.com)
6
+ s.homepage = 'https://github.com/mode/jdbc-hive2'
7
+ s.summary = %q{Hive2 JDBC driver for JRuby}
8
+ s.description = %q{Use this driver to connect to Hive and Impala clusters}
9
+
10
+ s.rubyforge_project = 'jdbc-hive2'
11
+
12
+ s.files = `git ls-files`.split("\n")
13
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
14
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
15
+ s.require_paths = %w(lib)
16
+
17
+ s.add_development_dependency 'rake'
18
+ s.add_development_dependency 'rspec'
19
+
20
+ s.add_development_dependency 'sequel'
21
+ end
@@ -0,0 +1,443 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
203
+
204
+
205
+ APACHE HIVE SUBCOMPONENTS:
206
+
207
+ The Apache Hive project contains subcomponents with separate copyright
208
+ notices and license terms. Your use of the source code for the these
209
+ subcomponents is subject to the terms and conditions of the following
210
+ licenses.
211
+
212
+ For the org.apache.hadoop.hive.ql.util.jdbm.* classes:
213
+
214
+ /**
215
+ * JDBM LICENSE v1.00
216
+ *
217
+ * Redistribution and use of this software and associated documentation
218
+ * ("Software"), with or without modification, are permitted provided
219
+ * that the following conditions are met:
220
+ *
221
+ * 1. Redistributions of source code must retain copyright
222
+ * statements and notices. Redistributions must also contain a
223
+ * copy of this document.
224
+ *
225
+ * 2. Redistributions in binary form must reproduce the
226
+ * above copyright notice, this list of conditions and the
227
+ * following disclaimer in the documentation and/or other
228
+ * materials provided with the distribution.
229
+ *
230
+ * 3. The name "JDBM" must not be used to endorse or promote
231
+ * products derived from this Software without prior written
232
+ * permission of Cees de Groot. For written permission,
233
+ * please contact cg@cdegroot.com.
234
+ *
235
+ * 4. Products derived from this Software may not be called "JDBM"
236
+ * nor may "JDBM" appear in their names without prior written
237
+ * permission of Cees de Groot.
238
+ *
239
+ * 5. Due credit should be given to the JDBM Project
240
+ * (http://jdbm.sourceforge.net/).
241
+ *
242
+ * THIS SOFTWARE IS PROVIDED BY THE JDBM PROJECT AND CONTRIBUTORS
243
+ * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
244
+ * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
245
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
246
+ * CEES DE GROOT OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
247
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
248
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
249
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
250
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
251
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
252
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
253
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
254
+ *
255
+ * Copyright 2000 (C) Cees de Groot. All Rights Reserved.
256
+ * Copyright 2000-2001 (C) Alex Boisvert. All Rights Reserved.
257
+ * Contributions are Copyright (C) 2000 by their associated contributors.
258
+ *
259
+ * $Id: RecordManager.java,v 1.3 2005/06/25 23:12:31 doomdark Exp $
260
+ */
261
+
262
+
263
+ For the ANTLR libraries:
264
+
265
+ Copyright (c) 2003-2008, Terence Parr
266
+ All rights reserved.
267
+
268
+ Redistribution and use in source and binary forms, with or without
269
+ modification, are permitted provided that the following conditions are
270
+ met:
271
+
272
+ Redistributions of source code must retain the above copyright notice,
273
+ this list of conditions and the following disclaimer. Redistributions
274
+ in binary form must reproduce the above copyright notice, this list of
275
+ conditions and the following disclaimer in the documentation and/or
276
+ other materials provided with the distribution. Neither the name of
277
+ the author nor the names of its contributors may be used to endorse or
278
+ promote products derived from this software without specific prior
279
+ written permission.
280
+
281
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
282
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
283
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
284
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
285
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
286
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
287
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
288
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
289
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
290
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
291
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
292
+
293
+
294
+ For the StringTemplate library:
295
+
296
+ Copyright (c) 2008, Terence Parr
297
+ All rights reserved.
298
+
299
+ Redistribution and use in source and binary forms, with or without
300
+ modification, are permitted provided that the following conditions are
301
+ met:
302
+
303
+ Redistributions of source code must retain the above copyright notice,
304
+ this list of conditions and the following disclaimer. Redistributions
305
+ in binary form must reproduce the above copyright notice, this list of
306
+ conditions and the following disclaimer in the documentation and/or
307
+ other materials provided with the distribution. Neither the name of
308
+ the author nor the names of its contributors may be used to endorse or
309
+ promote products derived from this software without specific prior
310
+ written permission.
311
+
312
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
313
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
314
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
315
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
316
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
317
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
318
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
319
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
320
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
321
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
322
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
323
+
324
+
325
+ For the ASM library:
326
+
327
+ Copyright (c) 2000-2005 INRIA, France Telecom
328
+ All rights reserved.
329
+
330
+ Redistribution and use in source and binary forms, with or without
331
+ modification, are permitted provided that the following conditions
332
+ are met:
333
+
334
+ 1. Redistributions of source code must retain the above copyright
335
+ notice, this list of conditions and the following disclaimer.
336
+
337
+ 2. Redistributions in binary form must reproduce the above copyright
338
+ notice, this list of conditions and the following disclaimer in the
339
+ documentation and/or other materials provided with the distribution.
340
+
341
+ 3. Neither the name of the copyright holders nor the names of its
342
+ contributors may be used to endorse or promote products derived from
343
+ this software without specific prior written permission.
344
+
345
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
346
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
347
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
348
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
349
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
350
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
351
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
352
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
353
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
354
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
355
+ THE POSSIBILITY OF SUCH DAMAGE.
356
+
357
+
358
+ For the org.json library:
359
+
360
+ Copyright (c) 2002 JSON.org
361
+
362
+ Permission is hereby granted, free of charge, to any person obtaining
363
+ a copy of this software and associated documentation files (the
364
+ "Software"), to deal in the Software without restriction, including
365
+ without limitation the rights to use, copy, modify, merge, publish,
366
+ distribute, sublicense, and/or sell copies of the Software, and to
367
+ permit persons to whom the Software is furnished to do so, subject to
368
+ the following conditions:
369
+
370
+ The above copyright notice and this permission notice shall be
371
+ included in all copies or substantial portions of the Software.
372
+
373
+ The Software shall be used for Good, not Evil.
374
+
375
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
376
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
377
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
378
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
379
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
380
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
381
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
382
+
383
+
384
+ For the JLine library:
385
+
386
+ Copyright (c) 2002-2006, Marc Prud'hommeaux <mwp1@cornell.edu>
387
+ All rights reserved.
388
+
389
+ Redistribution and use in source and binary forms, with or
390
+ without modification, are permitted provided that the following
391
+ conditions are met:
392
+
393
+ Redistributions of source code must retain the above copyright
394
+ notice, this list of conditions and the following disclaimer.
395
+
396
+ Redistributions in binary form must reproduce the above copyright
397
+ notice, this list of conditions and the following disclaimer
398
+ in the documentation and/or other materials provided with
399
+ the distribution.
400
+
401
+ Neither the name of JLine nor the names of its contributors
402
+ may be used to endorse or promote products derived from this
403
+ software without specific prior written permission.
404
+
405
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
406
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
407
+ BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
408
+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
409
+ EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
410
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
411
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
412
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
413
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
414
+ AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
415
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
416
+ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
417
+ OF THE POSSIBILITY OF SUCH DAMAGE.
418
+
419
+
420
+ For the SLF4J library:
421
+
422
+ Copyright (c) 2004-2008 QOS.ch
423
+ All rights reserved.
424
+
425
+ Permission is hereby granted, free of charge, to any person obtaining
426
+ a copy of this software and associated documentation files (the
427
+ "Software"), to deal in the Software without restriction, including
428
+ without limitation the rights to use, copy, modify, merge, publish,
429
+ distribute, sublicense, and/or sell copies of the Software, and to
430
+ permit persons to whom the Software is furnished to do so, subject to
431
+ the following conditions:
432
+
433
+ The above copyright notice and this permission notice shall be
434
+ included in all copies or substantial portions of the Software.
435
+
436
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
437
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
438
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
439
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
440
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
441
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
442
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
443
+
@@ -0,0 +1,25 @@
1
+ Hive JDBC drivers and libraries
2
+ -------------------------------
3
+
4
+ Installation instructions:
5
+
6
+ The contents of the package can be extracted to any folder.
7
+
8
+ Linux:
9
+ - To extract and install the drivers, run: tar -xzf hive-jdbc-0.11.0.tar.gz
10
+
11
+ Windows:
12
+ - Download and install 7-Zip from http://www.7-zip.org
13
+ - Launch 7-Zip, and in the 7-Zip UI navigate to hive-jdbc-0.11.0.tar.gz
14
+ - Open hive-jdbc-0.11.0.tar.gz in the 7-Zip UI (double click on it)
15
+ - Select hive-jdbc-0.11.0.tar, and click Extract
16
+
17
+
18
+ General information:
19
+
20
+ - For instructions on how to use the drivers to set up a jdbc client to run queries against Hive, see: http://docs.amazonwebservices.com/ElasticMapReduce/latest/DeveloperGuide/UsingEMR_Hive.html#UsingEMR_JDBC
21
+ - For information about Amazon Elastic MapReduce, see: http://aws.amazon.com/elasticmapreduce/
22
+ - For general information about Hive, see: https://cwiki.apache.org/confluence/display/Hive
23
+
24
+
25
+ Copyright 2010-2012, Amazon Web Services LLC or its affiliates. All rights reserved.
@@ -0,0 +1,37 @@
1
+ warn 'jdbc-hive2 is only for use with JRuby' if (JRUBY_VERSION.nil? rescue true)
2
+
3
+ module Jdbc
4
+ module Hive2
5
+ DRIVER_VERSION = '0.11.0'
6
+ VERSION = DRIVER_VERSION + '.1'
7
+
8
+ def self.driver_jar
9
+ %W(
10
+ driver/libfb303-0.9.0.jar
11
+ driver/slf4j-api-1.6.1.jar
12
+ driver/hadoop-core-1.0.3.jar
13
+ driver/commons-logging-1.0.4.jar
14
+ driver/hive-exec-0.11.0.jar
15
+ driver/hive-jdbc-0.11.0.jar
16
+ driver/hive-metastore-0.11.0.jar
17
+ driver/hive-service-0.11.0.jar
18
+ )
19
+ end
20
+
21
+ def self.load_driver(method = :load)
22
+ driver_jar.each do |jar|
23
+ send method, jar
24
+ end
25
+ end
26
+
27
+ def self.driver_name
28
+ 'org.apache.hive.jdbc.HiveDriver'
29
+ end
30
+
31
+ if defined?(JRUBY_VERSION) && # enable backwards-compat behavior
32
+ (Java::JavaLang::Boolean.get_boolean('jdbc.driver.autoload'))
33
+ warn "autoloading jdbc driver on require 'jdbc/hive2'" if $VERBOSE
34
+ load_driver :require
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,10 @@
1
+ require 'jdbc/hive2'
2
+ Jdbc::Hive2::load_driver
3
+
4
+ # JDBC_CONFIG = {
5
+ # :adapter => 'jdbc',
6
+ # :driver => 'org.apache.hive.jdbc.HiveDriver',
7
+ # :url => 'jdbc:hive2://localhost:10000/test',
8
+ # :username => 'test',
9
+ # :password => 'test'
10
+ # }
metadata ADDED
@@ -0,0 +1,107 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jdbc-hive2
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.11.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Josh Ferguson
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-04-02 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ version_requirements: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ requirement: !ruby/object:Gem::Requirement
21
+ requirements:
22
+ - - '>='
23
+ - !ruby/object:Gem::Version
24
+ version: '0'
25
+ prerelease: false
26
+ type: :development
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ requirement: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - '>='
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ prerelease: false
40
+ type: :development
41
+ - !ruby/object:Gem::Dependency
42
+ name: sequel
43
+ version_requirements: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ requirement: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - '>='
51
+ - !ruby/object:Gem::Version
52
+ version: '0'
53
+ prerelease: false
54
+ type: :development
55
+ description: Use this driver to connect to Hive and Impala clusters
56
+ email:
57
+ - josh@modeanalytics.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - .gitignore
63
+ - .rspec
64
+ - .ruby-version
65
+ - Gemfile
66
+ - Gemfile.lock
67
+ - LICENSE.txt
68
+ - README.md
69
+ - Rakefile
70
+ - jdbc-hive2.gemspec
71
+ - lib/driver/LICENSE
72
+ - lib/driver/README.txt
73
+ - lib/driver/commons-logging-1.0.4.jar
74
+ - lib/driver/hadoop-core-1.0.3.jar
75
+ - lib/driver/hive-exec-0.11.0.jar
76
+ - lib/driver/hive-jdbc-0.11.0.jar
77
+ - lib/driver/hive-metastore-0.11.0.jar
78
+ - lib/driver/hive-service-0.11.0.jar
79
+ - lib/driver/libfb303-0.9.0.jar
80
+ - lib/driver/slf4j-api-1.6.1.jar
81
+ - lib/jdbc/hive2.rb
82
+ - spec/spec_helper.rb
83
+ homepage: https://github.com/mode/jdbc-hive2
84
+ licenses: []
85
+ metadata: {}
86
+ post_install_message:
87
+ rdoc_options: []
88
+ require_paths:
89
+ - lib
90
+ required_ruby_version: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - '>='
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
95
+ required_rubygems_version: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - '>='
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
100
+ requirements: []
101
+ rubyforge_project: jdbc-hive2
102
+ rubygems_version: 2.1.9
103
+ signing_key:
104
+ specification_version: 4
105
+ summary: Hive2 JDBC driver for JRuby
106
+ test_files:
107
+ - spec/spec_helper.rb