You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by Steve Terrell <st...@oculus360.us> on 2014/07/25 17:20:51 UTC

Re: Location protocol error in Pig using Phoenix 3.0

You might be using a feature of PhoenixHBaseStorage that I am not familiar
with.  When I use store to Phoenix, my "into" value is simply this:

… into 'hbase://MY_TABLE_NAME' …

If one can specify specific column families and column names, I'd like to
learn more about that myself.  I saw no mention of it at
http://phoenix.apache.org/pig_integration.html except for the loading.


On Fri, Jul 25, 2014 at 9:19 AM, Randy Martin <Ra...@ds-iq.com>
wrote:

>  I am getting the following error when issuing a Store command in Pig:
>
>
>
> Caused by: java.io.IOException: Location must use the hbase protocol,
> hbase://tableName[/columnList]. Supplied
> location=file:/tmp/temp-172455017/tmp1219147161
>
>
>
> The code is very simple, loading from a file and storing to a Phoenix
> table.
>
>
>
>
>
> REGISTER phoenix-3.0.0-incubating-client.jar
>
>
>
> set hbase.zookeeper.quorum ='$zk';
>
> Staging = LOAD '$filename' USING PigStorage('|') as (Column1:int);
>
>
>
> TempStaging = LIMIT Staging 1;
>
>
>
> LoadProducts = FOREACH TempStaging GENERATE (int)Column1 AS Column1:int,
> CurrentTime() AS UpdateTime:datetime;
>
>
>
> --DUMP Loading;
>
> STORE LoadProducts
>
>     INTO 'hbase://SCHEMA.TABLE/COLUMN1,CF.COLUMN2'
>
>     using org.apache.phoenix.pig.PhoenixHBaseStorage('$zk','-batchSize
> 5000');
>
>
>
>
>
> Search points to SetStoreLocation, where it is evaluating the URI on the
> INTO clause.  The error implies that I gave SetStoreLocation the Load
> location not the Store location.
>
>
>
> Any help would be appreciated.
>
> Randy
>
>
>
>
>

Re: Location protocol error in Pig using Phoenix 3.0

Posted by Ravi Kiran <ma...@gmail.com>.
Hi Steve,
   Specifying column names explicitly during LOAD and STORE is present from
v 3.1.0 and not in the phoenix-3.0.0-incubating
<http://mirrors.gigenet.com/apache/incubator/phoenix/phoenix-3.0.0-incubating/>
. You can try building the artifacts following the steps mentioned at
http://phoenix.apache.org/building.html

Regards
Ravi


On Fri, Jul 25, 2014 at 8:20 AM, Steve Terrell <st...@oculus360.us>
wrote:

> You might be using a feature of PhoenixHBaseStorage that I am not familiar
> with.  When I use store to Phoenix, my "into" value is simply this:
>
> … into 'hbase://MY_TABLE_NAME' …
>
> If one can specify specific column families and column names, I'd like to
> learn more about that myself.  I saw no mention of it at
> http://phoenix.apache.org/pig_integration.html except for the loading.
>
>
> On Fri, Jul 25, 2014 at 9:19 AM, Randy Martin <Ra...@ds-iq.com>
> wrote:
>
>>  I am getting the following error when issuing a Store command in Pig:
>>
>>
>>
>> Caused by: java.io.IOException: Location must use the hbase protocol,
>> hbase://tableName[/columnList]. Supplied
>> location=file:/tmp/temp-172455017/tmp1219147161
>>
>>
>>
>> The code is very simple, loading from a file and storing to a Phoenix
>> table.
>>
>>
>>
>>
>>
>> REGISTER phoenix-3.0.0-incubating-client.jar
>>
>>
>>
>> set hbase.zookeeper.quorum ='$zk';
>>
>> Staging = LOAD '$filename' USING PigStorage('|') as (Column1:int);
>>
>>
>>
>> TempStaging = LIMIT Staging 1;
>>
>>
>>
>> LoadProducts = FOREACH TempStaging GENERATE (int)Column1 AS Column1:int,
>> CurrentTime() AS UpdateTime:datetime;
>>
>>
>>
>> --DUMP Loading;
>>
>> STORE LoadProducts
>>
>>     INTO 'hbase://SCHEMA.TABLE/COLUMN1,CF.COLUMN2'
>>
>>     using org.apache.phoenix.pig.PhoenixHBaseStorage('$zk','-batchSize
>> 5000');
>>
>>
>>
>>
>>
>> Search points to SetStoreLocation, where it is evaluating the URI on the
>> INTO clause.  The error implies that I gave SetStoreLocation the Load
>> location not the Store location.
>>
>>
>>
>> Any help would be appreciated.
>>
>> Randy
>>
>>
>>
>>
>>
>
>