You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by Nimrod Oren <ni...@veracity-group.com> on 2017/02/16 08:56:43 UTC

Still having issues

Hi,

Even after adding phoenix-spark and phoenix-client I keep missing other methods. Now it's HBase methods:

java.lang.NoSuchMethodError: org.apache.hadoop.hbase.HTableDescriptor.setValue(Ljava/lang/String;Ljava/lang/String;)Lorg/apache/hadoop/hbase/HTableDescriptor

Isn't there a way for a beginner like me to find all the needed dependencies in a single place?

NImrod

Re: Still having issues

Posted by Andrew Purtell <ap...@apache.org>.
If you are using CDH, Phoenix has to be patched to work with Cloudera's
HBase derivative. You might try https://github.com/
chiastic-security/phoenix-for-cloudera/tree/4.9-HBase-1.2-cdh5.9
<https://github.com/chiastic-security/phoenix-for-cloudera/tree/4.9-HBase-1.2-cdh5.9?files=1>

Check out this tree and build. The procedure for building is the same (
https://phoenix.apache.org/building.html) This will pick up Cloudera's
artifacts and produce a binary compatible result.

On Thu, Feb 16, 2017 at 7:53 AM, Josh Mahonin <jm...@gmail.com> wrote:

> It still seems that Spark is unable to find all of the Phoenix/HBase
> classes that are necessary.
>
> As a reference, I've got a Docker image that might help:
>
> https://github.com/jmahonin/docker-phoenix/tree/phoenix_spark
>
> The versions of Phoenix and Spark it uses are a bit out of date, but it
> shows the necessary classes and settings to make Spark happy.
>
> Good luck!
>
> Josh
>
> On Thu, Feb 16, 2017 at 4:10 AM, Dequn Zhang <d....@gmail.com>
> wrote:
>
>> Please check whether your table is created by Phoenix( means this table
>> is not a *Mapping* ) , you can follow the sample on phoenix official
>> site, only need *change the version to the latest*, use *phoenix-client*
>> instead, and promise *Schema Corresponding*. Create a new table to test,
>> use simple data, *be independent to your business*.
>>
>> We don’t know your background and code, so that’s all I can help you.
>>
>>
>> On 16 February 2017 at 16:57:26, Nimrod Oren (
>> nimrod.oren@veracity-group.com) wrote:
>>
>> org.apache.hadoop.hbase.HTableDescriptor.setValue
>>
>>
>


-- 
Best regards,

   - Andy

If you are given a choice, you believe you have acted freely. - Raymond
Teller (via Peter Watts)

Re: Still having issues

Posted by Josh Mahonin <jm...@gmail.com>.
It still seems that Spark is unable to find all of the Phoenix/HBase
classes that are necessary.

As a reference, I've got a Docker image that might help:

https://github.com/jmahonin/docker-phoenix/tree/phoenix_spark

The versions of Phoenix and Spark it uses are a bit out of date, but it
shows the necessary classes and settings to make Spark happy.

Good luck!

Josh

On Thu, Feb 16, 2017 at 4:10 AM, Dequn Zhang <d....@gmail.com>
wrote:

> Please check whether your table is created by Phoenix( means this table is
> not a *Mapping* ) , you can follow the sample on phoenix official site,
> only need *change the version to the latest*, use *phoenix-client*
> instead, and promise *Schema Corresponding*. Create a new table to test,
> use simple data, *be independent to your business*.
>
> We don’t know your background and code, so that’s all I can help you.
>
>
> On 16 February 2017 at 16:57:26, Nimrod Oren (nimrod.oren@veracity-group.
> com) wrote:
>
> org.apache.hadoop.hbase.HTableDescriptor.setValue
>
>

Re:

Posted by Dequn Zhang <d....@gmail.com>.
Sorry for my tone, I didn’t mean that.

I use Phoenix4.9 on HBase1.2, and according to your err info, I looked up
HTableDescriptor definition and found this method

    public HTableDescriptor setValue(String key, String value) {
        if(value == null) {
            this.remove(key);
        } else {
            this.setValue(Bytes.toBytes(key), Bytes.toBytes(value));
        }

        return this;
    }


It looks like a little weird you get this error, if you can, check your
HTableDescriptor definition, add the above code to it and have a try, if
this can’t work either, maybe you can upgrade your HBase version.



On 16 February 2017 at 17:50:00, Nimrod Oren (nimrod.oren@veracity-group.com)
wrote:

I didn't mean to sound rude.

I created another table using phoenix-sqlline according to the
documentation:

CREATE TABLE IF NOT EXISTS TEST_SAVE_NEW (
IMEI VARCHAR NOT NULL PRIMARY KEY,
END_LATITUDE VARCHAR);

Still getting the same issue.

Re:

Posted by Andrew Purtell <an...@gmail.com>.
Phoenix has to be patched to work with Cloudera's HBase derivative. You might try https://github.com/chiastic-security/phoenix-for-cloudera/tree/4.9-HBase-1.2-cdh5.9

Check out this tree and build. The procedure for building is the same (https://phoenix.apache.org/building.html) This will pick up Cloudera's artifacts and produce a binary compatible result. 


> On Feb 16, 2017, at 8:07 AM, Marcin Januszkiewicz <ka...@gmail.com> wrote:
> 
> Are you maybe using a HBase distribution from a vendor? I had similar errors when trying to use Phoenix 4.9 on the Cloudera build of HBase.
> 
>> On 2017-02-16 10:46 (+0100), "Nimrod Oren"<ni...@veracity-group.com> wrote: 
>> I didn't mean to sound rude.
>> 
>> I created another table using phoenix-sqlline according to the documentation:
>> 
>> CREATE TABLE IF NOT EXISTS TEST_SAVE_NEW (
>>      IMEI VARCHAR NOT NULL PRIMARY KEY,
>>      END_LATITUDE VARCHAR);
>> 
>> Still getting the same issue.
>> 

Re:

Posted by Marcin Januszkiewicz <ka...@gmail.com>.
Are you maybe using a HBase distribution from a vendor? I had similar errors when trying to use Phoenix 4.9 on the Cloudera build of HBase.

On 2017-02-16 10:46 (+0100), "Nimrod Oren"<ni...@veracity-group.com> wrote: 
> I didn't mean to sound rude.
> 
> I created another table using phoenix-sqlline according to the documentation:
> 
> CREATE TABLE IF NOT EXISTS TEST_SAVE_NEW (
>       IMEI VARCHAR NOT NULL PRIMARY KEY,
>       END_LATITUDE VARCHAR);
> 
> Still getting the same issue.
> 

Posted by Nimrod Oren <ni...@veracity-group.com>.
I didn't mean to sound rude.

I created another table using phoenix-sqlline according to the documentation:

CREATE TABLE IF NOT EXISTS TEST_SAVE_NEW (
      IMEI VARCHAR NOT NULL PRIMARY KEY,
      END_LATITUDE VARCHAR);

Still getting the same issue.

Re: Still having issues

Posted by Dequn Zhang <d....@gmail.com>.
Please check whether your table is created by Phoenix( means this table is
not a *Mapping* ) , you can follow the sample on phoenix official site,
only need *change the version to the latest*, use *phoenix-client* instead,
and promise *Schema Corresponding*. Create a new table to test, use simple
data, *be independent to your business*.

We don’t know your background and code, so that’s all I can help you.


On 16 February 2017 at 16:57:26, Nimrod Oren (nimrod.oren@veracity-group.com)
wrote:

org.apache.hadoop.hbase.HTableDescriptor.setValue