Thank you for your answer.  I put the lib in that directory. I could say
that it's right because if I choose a wrong type of source I get the next
message:

Flink SQL> select * from blacklist;
[ERROR] Could not execute SQL statement. Reason:
org.apache.flink.table.api.ValidationException: Could not find any factory
for identifier 'hbase-1.4' that implements
'org.apache.flink.table.factories.DynamicTableFactory' in the classpath.

Available factory identifiers are:

blackhole
datagen
filesystem
hbase-2.2.  --->>>>> it's available hbase-2.2
kafka
print
python-input-format
upsert-kafka

If I use that source:

Flink SQL> CREATE TABLE blacklist (
>  rowkey INT,
>  imeis ROW<key STRING, blacklisted BOOLEAN>, --IMSI y valor en los test
es siempre TRUE
>  PRIMARY KEY (rowkey) NOT ENFORCED
> ) WITH (
>  'connector' = 'hbase-2.2', <<<<------
>  'table-name' = 'blacklist',
>  'zookeeper.quorum' = 'localhost:2181',
>  'lookup.cache' = 'PARTIAL'
> );
[INFO] Execute statement succeeded.

Flink SQL> select * from blacklist;
[ERROR] Could not execute SQL statement. Reason:
java.lang.ClassNotFoundException:
org.apache.flink.connector.hbase.table.HBaseConnectorOptions. <<<<---


I have tried to add by hand too with the same results.

Flink SQL> show jars;
+-----------------------------------------------------+
|                                                jars |
+-----------------------------------------------------+
| /opt/flink/lib/flink-connector-hbase-2.2-1.17.2.jar |
+-----------------------------------------------------+
root@4b902e96ffd6:/opt/flink/bin# ls
/opt/flink/lib/flink-connector-hbase-2.2-1.17.2.jar
/opt/flink/lib/flink-connector-hbase-2.2-1.17.2.jar

Any idea?

El mié, 13 nov 2024 a las 5:07, Shengkai Fang (<fskm...@gmail.com>)
escribió:

> Hi.
>
> You should put the hbase jar into the ${FLINK-HOMe}/lib directory.
>
> Best,
> Shengkai
>
> Guillermo <konstt2...@gmail.com> 于2024年11月12日周二 19:28写道:
>
>> I'm using Flink 1.20 because I need some features from this version, I
>> have seen that there're not available the HBase connector in this version,
>> I don't know if this is the problem or it could be compatible.
>>
>> El mar, 12 nov 2024 a las 11:56, Guillermo (<konstt2...@gmail.com>)
>> escribió:
>>
>>> I'm trying to connect HBase 1.2 with FlinkSQL, (I have tried with HBase
>>> 2.2 and the flink connector 2.2 with the same result).
>>> Test is done with docker-compose and hbase. Do I have to do something
>>> else? I have checked that table it's okay in HBase.
>>>
>>> root@70e2d4767504:/opt/flink/lib# ls
>>> flink-cep-1.20.0.jar              flink-connector-hbase-1.4-1.17.2.jar
>>>  ......
>>>
>>> Flink SQL> CREATE TABLE tableTest (
>>> rowkey INT,
>>> imeis ROW<key STRING, black BOOLEAN>,
>>> PRIMARY KEY (rowkey) NOT ENFORCED
>>> ) WITH (
>>> 'connector' = 'hbase-1.4',
>>> 'table-name' = 'tableTest',
>>> 'zookeeper.quorum' = 'zookeeper:2181'
>>> );
>>> [INFO] Execute statement succeeded.
>>>
>>> Flink SQL> select * from tableTest limit 10;
>>> [ERROR] Could not execute SQL statement. Reason:
>>> java.lang.ClassNotFoundException:
>>> org.apache.flink.connector.hbase.table.HBaseConnectorOptions
>>>
>>

Reply via email to