GitHub user joshelser opened a pull request:
https://github.com/apache/phoenix/pull/217
PHOENIX-3240 Create phoenix-$VERSION-pig shaded jar
Running inside of Pig's environment creates some issues where Pig is already
providing some versions of dependencies (e.g. joda-time). Create a custom
JAR specifically to be used with Pig.
Testing approach:
1. `create table foobar(a varchar, b date not null, constraint pk primary
key (a, b));`
2. `cd /usr/local/lib/pig-0.16.0`
3. `PIG_HOME=$(pwd)
PIG_CLASSPATH=/usr/local/lib/phoenix/phoenix-4.9.0-HBase-1.2-SNAPSHOT-pig.jar
./bin/pig` (or alternatively, `register
/usr/local/lib/phoenix/phoenix-4.9.0-HBase-1.2-SNAPSHOT-pig.jar` in the pig
interpreter)
4. Create a two-column CSV file in HDFS (e.g. `a1,2016-10-10 17:05:00`)
5. `A = load 'times' using PigStorage(',') as (a:chararray, b:datetime);`
6. `STORE A into 'hbase://FOOBAR' using
org.apache.phoenix.pig.PhoenixHBaseStorage('localhost:2181:/hbase-1.2','-batchSize
100');`
7. `select * from FOOBAR;`
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/joshelser/phoenix 3240-shaded-pig
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/phoenix/pull/217.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #217
----
commit ee0101d175708d6abe1079b36d07bd4a9cbada16
Author: Josh Elser <[email protected]>
Date: 2016-10-10T22:03:44Z
PHOENIX-3240 Create phoenix-$VERSION-pig shaded jar
Running inside of Pig's environment creates some issues where Pig is already
providing some versions of dependencies (e.g. joda-time). Create a custom
JAR specifically to be used with Pig.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---