[JBoss JIRA] (TEIID-3621) HBase translator - UPDATE statement requires primary key
by Juraj Duráni (JIRA)
Juraj Duráni created TEIID-3621:
-----------------------------------
Summary: HBase translator - UPDATE statement requires primary key
Key: TEIID-3621
URL: https://issues.jboss.org/browse/TEIID-3621
Project: Teiid
Issue Type: Bug
Affects Versions: 8.7.1.6_2
Environment: Hbase: 1.1.1
Phoenix: 4.5.0-HBase-1.1
Reporter: Juraj Duráni
Assignee: Steven Hawkins
The HBase translator requires table to have a primary key defined. Is the PK really needed? If the table has no PK defined, then all columns are PK. E.g. query *UPDATE hbase.SmallA SET StringNum = '555' WHERE hbase.SmallA.StringNum IS NULL* is translated as *UPSERT INTO smalla (stringnum, intkey) SELECT '555', smalla.intkey FROM smalla WHERE smalla.stringnum IS NULL* (intkey is PK). Teiid can simply add all columns (except those defined in 'SET').
Yes, I know that HBase requires the PK to be defined, but what happen if a user decide to change PK in VDB [1]? It could be a problem whether PK is in VDB defined or not.
I suggest to add a hbase-translator-specific execution property which define PK in the source table and remove AssertionError [2].
[1]
*HBase table:* create table mytable(id integer primary key, nickname varchar(1))
*Teiid table:* create table mytable(id integer, username varchar(1) primary key)
Both, id and username, are valid PK (artificial/natural).
[2]
https://github.com/teiid/teiid/blob/master/connectors/translator-hbase/sr...
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 7 months
[JBoss JIRA] (TEIID-3620) HBase translator - date, time, timestamp values are not translated correctly
by Juraj Duráni (JIRA)
Juraj Duráni created TEIID-3620:
-----------------------------------
Summary: HBase translator - date, time, timestamp values are not translated correctly
Key: TEIID-3620
URL: https://issues.jboss.org/browse/TEIID-3620
Project: Teiid
Issue Type: Bug
Affects Versions: 8.7.1.6_2
Environment: Hbase: 1.1.1
Phoenix: 4.5.0-HBase-1.1
Reporter: Juraj Duráni
Assignee: Steven Hawkins
Attachments: insert.log, select.log, update.log
Using date/time/timestamp value in SQL query causes an exception [1] - {ts '...'}/{d '...'}/{t '...'} is not supported by Phoenix Driver.The issue is present in all types of statements (select, insert, update).
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 7 months
[JBoss JIRA] (TEIID-3617) Provide an option to Limit per user based connections
by Xian Liu (JIRA)
[ https://issues.jboss.org/browse/TEIID-3617?page=com.atlassian.jira.plugin... ]
Xian Liu edited comment on TEIID-3617 at 8/11/15 3:19 AM:
----------------------------------------------------------
Each user connections number may not be the same
user A : 10 connections allowed
user B : 15 connections allowed
user C : 25 connections allowed
was (Author: lxjsj):
Add each user connections number may not be the same
user A : 10 connections allowed
user B : 15 connections allowed
user C : 25 connections allowed
> Provide an option to Limit per user based connections
> -----------------------------------------------------
>
> Key: TEIID-3617
> URL: https://issues.jboss.org/browse/TEIID-3617
> Project: Teiid
> Issue Type: Feature Request
> Components: Server
> Reporter: Xian Liu
> Assignee: Steven Hawkins
> Fix For: 8.12
>
>
> we deploy teiid for users to get data, but some users will create many connections to teiid and they are not necessary, I need to find a good way to limit each user account can only get like 50 connections or so
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 7 months
[JBoss JIRA] (TEIID-3617) Provide an option to Limit per user based connections
by Xian Liu (JIRA)
[ https://issues.jboss.org/browse/TEIID-3617?page=com.atlassian.jira.plugin... ]
Xian Liu commented on TEIID-3617:
---------------------------------
Add each user connections number may not be the same
user A : 10 connections allowed
user B : 15 connections allowed
user C : 25 connections allowed
> Provide an option to Limit per user based connections
> -----------------------------------------------------
>
> Key: TEIID-3617
> URL: https://issues.jboss.org/browse/TEIID-3617
> Project: Teiid
> Issue Type: Feature Request
> Components: Server
> Reporter: Xian Liu
> Assignee: Steven Hawkins
> Fix For: 8.12
>
>
> we deploy teiid for users to get data, but some users will create many connections to teiid and they are not necessary, I need to find a good way to limit each user account can only get like 50 connections or so
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 7 months
[JBoss JIRA] (TEIID-3619) HBase translator - INSERT and UPDATE statements have no effect
by Juraj Duráni (JIRA)
Juraj Duráni created TEIID-3619:
-----------------------------------
Summary: HBase translator - INSERT and UPDATE statements have no effect
Key: TEIID-3619
URL: https://issues.jboss.org/browse/TEIID-3619
Project: Teiid
Issue Type: Bug
Affects Versions: 8.7.1.6_2
Environment: Hbase: 1.1.1
Phoenix: 4.5.0-HBase-1.1
Reporter: Juraj Duráni
Assignee: Steven Hawkins
Teiid's INSERT and UPDATE statement have no effect [1]. Both statements are translated as UPSERT which needs Connection.commit() to take effect [2].
[1]
*select intkey, stringkey from hbase.smalla where intkey = 5*
|intkey|stringkey|
|5|5|
*update hbase.smalla set stringkey = '1000' where intkey = 5*
no exception here
*select intkey, stringkey from hbase.smalla where intkey = 5*
|intkey|stringkey|
|5|5|
[2]
http://phoenix.apache.org/faq.html#I_want_to_get_started_Is_there_a_Phoen... section "2. Using java"
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 7 months
[JBoss JIRA] (TEIID-3616) HBase translator - NPE if date value is 'null'
by Juraj Duráni (JIRA)
[ https://issues.jboss.org/browse/TEIID-3616?page=com.atlassian.jira.plugin... ]
Juraj Duráni commented on TEIID-3616:
-------------------------------------
[~rareddy] : Yes, I am using Phoenix driver (version in the Environment section) - http://apache.miloslavbrada.cz/phoenix/phoenix-4.5.0-HBase-1.1/bin/
[~kylin] : I have added a "nameinsource" option to every column ([1]) but still getting same NPE. I think that this is a PhoenixDriver's bug [2]. Returned value is not checked, even "wasNull" property is not being set. I was able to reproduce the bug using _ResultSet.getDate(int, Calendar)_ method [3]. My suggestion is to add a temporal workaround (use _ResultSet.getDate(int)_ instead of _ResultSet.getDate(int, Calendar)_), note to a documentation and wait for fix. It is maybe better if a user get a date which can be shifted instead of NPE.
Just FYI. I will record a new bug for insert and update statements.
[1]
CREATE FOREIGN TABLE SmallA (IntKey integer PRIMARY KEY OPTIONS (nameinsource 'intkey'),
StringKey string OPTIONS (nameinsource 'stringkey'),
IntNum integer OPTIONS (nameinsource 'intnum'),
StringNum string OPTIONS (nameinsource 'stringnum'),
FloatNum float OPTIONS (nameinsource 'floatnum'),
LongNum long OPTIONS (nameinsource 'longnum'),
DoubleNum double OPTIONS (nameinsource 'doublenum'),
ByteNum byte OPTIONS (nameinsource 'bytenum'),
DateValue date OPTIONS (nameinsource 'datevalue'),
TimeValue time OPTIONS (nameinsource 'timevalue'),
TimestampValue timestamp OPTIONS (nameinsource 'timestampvalue'),
BooleanValue boolean OPTIONS (nameinsource 'booleanvalue'),
CharValue char OPTIONS (nameinsource 'charvalue'),
ShortValue short OPTIONS (nameinsource 'shortvalue'),
BigIntegerValue biginteger OPTIONS (nameinsource 'bigintegervalue'),
BigDecimalValue bigdecimal OPTIONS (nameinsource 'bigdecimalvalue'),
ObjectValue object OPTIONS (nameinsource 'objectvalue')) OPTIONS (CARDINALITY 50, UPDATABLE 'TRUE', nameinsource 'smalla');
[2] http://grepcode.com/file/repo1.maven.org/maven2/org.apache.phoenix/phoeni...
[3]
Exception in thread "main" java.lang.NullPointerException
at java.util.Calendar.setTime(Calendar.java:1770)
at org.apache.phoenix.jdbc.PhoenixResultSet.getDate(PhoenixResultSet.java:388)
at sandbox.MainClass.phoenix(MainClass.java:80)
at sandbox.MainClass.main(MainClass.java:56)
> HBase translator - NPE if date value is 'null'
> ----------------------------------------------
>
> Key: TEIID-3616
> URL: https://issues.jboss.org/browse/TEIID-3616
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.7.1.6_2
> Environment: Hbase: 1.1.1
> Phoenix: 4.5.0-HBase-1.1
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
> Attachments: log
>
>
> If the source table in HBase contains a 'NULL' date value, Teiid throws an NPE. I did not encounter any NPE using org.apache.phoenix.jdbc.PhoenixDriver [1]. Other data types seem to be OK too.
> I have tried integer, char, varchar, float, double, tinyint, smallint, bigint, decimal, varbinary, boolean, time, date, timestamp.
> [1]
> Connection con = new org.apache.phoenix.jdbc.PhoenixDriver().connect("jdbc:phoenix:localhost", new Properties())
> ResultSet rs = con.createStatement().executeQuery("select datevalue from smalla");
> while(rs.next()){
> System.out.println(rs.getDate(1));
> }
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 7 months