[jira] [Created] (TRAFODION-1610) Generate constraint expression for update/merge commands

2015-11-09 Thread Selvaganesan Govindarajan (JIRA)
Selvaganesan Govindarajan created TRAFODION-1610:


 Summary: Generate constraint expression for update/merge commands
 Key: TRAFODION-1610
 URL: https://issues.apache.org/jira/browse/TRAFODION-1610
 Project: Apache Trafodion
  Issue Type: Sub-task
  Components: sql-cmp
Reporter: Selvaganesan Govindarajan






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TRAFODION-1575) Self-referencing update updates the column to a wrong value

2015-11-09 Thread Selvaganesan Govindarajan (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-1575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14997846#comment-14997846
 ] 

Selvaganesan Govindarajan commented on TRAFODION-1575:
--

Currently self-referencing update or the table having check constraint is 
updated, the update command is transformed into delete and insert. This 
transformation has problems that it can produce wrong result. Also, it is 
important that the transformation is avoided to improve the performance of 
update commands in such a case. This process involves two steps:

Ensure that the constraint expresssion is evaluated in all the operators 
(insert, update and merge) and to ensure that the constraint expression is 
generated correctly. This involves changes in both in executor and compiler 
component of Trafodion. Creating a subwork jira to track tehe compiler work

> Self-referencing update updates the column to a wrong value
> ---
>
> Key: TRAFODION-1575
> URL: https://issues.apache.org/jira/browse/TRAFODION-1575
> Project: Apache Trafodion
>  Issue Type: Bug
>  Components: sql-cmp
>Affects Versions: 1.3-incubating
> Environment: Can be reproduced on a workstation
>Reporter: David Wayne Birdsall
>Assignee: Selvaganesan Govindarajan
> Fix For: 2.0-incubating
>
>
> As shown in the following execution output, the update statement tries to 
> update c2 with count(distinct c2) from the same table. While the subquery 
> ‘select c from (select count(distinct c2) from mytable) dt(c)’ returns the 
> correct result 3 when it is run by itself, the update statement using the 
> same subquery updated the column c2 to 2, instead of 3. The updated value 
> always seems to be 1 less in this case.
> Here is the execution output:
> >>create schema mytest;
> --- SQL operation complete.
> >>
> >>create table mytable (c1 char(1), c2 integer);
> --- SQL operation complete.
> >>
> >>insert into mytable values ('A', 100), ('B', 200), ('C', 300);
> --- 3 row(s) inserted.
> >>select * from mytable order by 1;
> C1 C2
> -- ---
> A 100
> B 200
> C 300
> --- 3 row(s) selected.
> >>select c from (select count(distinct c2) from mytable) dt(c);
> C
> 
>3
> --- 1 row(s) selected.
> >>
> >>prepare xx from update mytable set c2 =
> +>(select c from (select count(distinct c2) from mytable) dt(c))
> +>where c2 = 100;
> --- SQL command prepared.
> >>explain options 'f' xx;
> LC RC OP OPERATOR OPT DESCRIPTION CARD
>       -
> 12 . 13 root x 1.00E+001
> 10 11 12 tuple_flow 1.00E+001
> . . 11 trafodion_insert MYTABLE 1.00E+000
> 9 . 10 sort 1.00E+001
> 8 4 9 hybrid_hash_join 1.00E+001
> 6 7 8 nested_join 1.00E+001
> . . 7 trafodion_delete MYTABLE 1.00E+000
> 5 . 6 sort 1.00E+001
> . . 5 trafodion_scan MYTABLE 1.00E+001
> 3 . 4 sort_scalar_aggr 1.00E+000
> 2 . 3 sort_scalar_aggr 1.00E+000
> 1 . 2 hash_groupby 2.00E+000
> . . 1 trafodion_scan MYTABLE 1.00E+002
> --- SQL operation complete.
> >>execute xx;
> --- 1 row(s) updated.
> >>
> >>select * from mytable order by 1;
> C1 C2
> -- ---
> A 2
> B 200
> C 300
> --- 3 row(s) selected.
> >>
> >>drop schema mytest cascade;
> --- SQL operation complete.
> >>
> The value of C2 in row A above should have been updated to 3.
> This problem was found by Wei-Shiun Tsai.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TRAFODION-1530) Replace calls to Mutation.getFamilyMap, they cause an incompatibility

2015-11-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-1530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14997969#comment-14997969
 ] 

ASF GitHub Bot commented on TRAFODION-1530:
---

GitHub user mashengchen opened a pull request:

https://github.com/apache/incubator-trafodion/pull/166

[TRAFODION-1530]deprecated put.getFamilyMap



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/mashengchen/incubator-trafodion master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-trafodion/pull/166.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 #166


commit dd2ea96f4743d39d1cab76e3efb8022f25dfac64
Author: aven 
Date:   2015-11-10T04:55:08Z

deprecated put.getFamilyMap




> Replace calls to Mutation.getFamilyMap, they cause an incompatibility
> -
>
> Key: TRAFODION-1530
> URL: https://issues.apache.org/jira/browse/TRAFODION-1530
> Project: Apache Trafodion
>  Issue Type: Bug
>  Components: dtm
>Affects Versions: 1.1 (pre-incubation)
> Environment: Certain HBase versions, for example 
> hbase-0.98.6-cdh5.3.0.
>Reporter: Hans Zeller
>
> Some of the Trafodion code calls the getFamilyMap() method on classes derived 
> from Mutation, such as Put.
> This method is missing in some HBase 0.98.x version. It seems to be there in 
> 0.98.1 and gone in 0.98.6, at least in the CDH versions.
> See HBASE-10339. The method also seems to be gone in HBase 1 and 2, so we can 
> hopefully replace it with the new method getFamilyCellMap().
> This will be required to be able to run Trafodion with Apache HBase.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (TRAFODION-1609) Change swstatus to give a simple "up" or "down" answer, instead of the current, confusing display

2015-11-09 Thread Hans Zeller (JIRA)
Hans Zeller created TRAFODION-1609:
--

 Summary: Change swstatus to give a simple "up" or "down" answer, 
instead of the current, confusing display
 Key: TRAFODION-1609
 URL: https://issues.apache.org/jira/browse/TRAFODION-1609
 Project: Apache Trafodion
  Issue Type: Improvement
  Components: sql-general
Reporter: Hans Zeller
Priority: Minor


The "swstatus" script used in cases where we did install_local_hadoop counts 
the MySQL processes and then simply invokes jps.

It would be better if the script would check specifically for HMaster, 
NameNode, DataNode and maybe others, like NodeManager and ResourceManager. If 
any are missing, it should print out which ones are missing, otherwise it 
should just say something like "processes are up".

It should also return an exit code of 0 if everything is up and 1 if some 
processes are missing.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (TRAFODION-1608) Cleanup of additional lib folders during build of Windows drivers

2015-11-09 Thread Anuradha Hegde (JIRA)
Anuradha Hegde created TRAFODION-1608:
-

 Summary: Cleanup of additional lib folders during build of Windows 
drivers
 Key: TRAFODION-1608
 URL: https://issues.apache.org/jira/browse/TRAFODION-1608
 Project: Apache Trafodion
  Issue Type: Bug
  Components: client-odbc-windows
Reporter: Anuradha Hegde


When you execute build_os.bat file
The additional lib folder that get created outside of the C:\Build folder (at 
the same level as the incubator-trafodion and at c:\) can be removed

It would be  nice to remove the driver version number from the  driver name





--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (TRAFODION-1606) Unable to create a table like a metadata table

2015-11-09 Thread Anoop Sharma (JIRA)

 [ 
https://issues.apache.org/jira/browse/TRAFODION-1606?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Anoop Sharma reassigned TRAFODION-1606:
---

Assignee: Anoop Sharma

> Unable to create a table like a metadata table
> --
>
> Key: TRAFODION-1606
> URL: https://issues.apache.org/jira/browse/TRAFODION-1606
> Project: Apache Trafodion
>  Issue Type: Bug
>  Components: sql-cmu
>Reporter: Roberta Marton
>Assignee: Anoop Sharma
>
> The following error occurs when trying to create a table like a metadata 
> table:
> >create table cols like "_MD_".keys;
> ..
> *** ERROR[8448] Unable to access Hbase interface. Call to 
> ExpHbaseInterface::create() returned error HBASE_CREATE_ERROR(701). Cause:
> java.lang.IllegalArgumentException: Family name can not be empty
> com.google.common.base.Preconditions.checkArgument(Preconditions.java:92)
> org.apache.hadoop.hbase.HColumnDescriptor.isLegalFamilyName(HColumnDescriptor.java:473)
> org.apache.hadoop.hbase.HColumnDescriptor.(HColumnDescriptor.java:426)
> org.apache.hadoop.hbase.HColumnDescriptor.(HColumnDescriptor.java:384)
> org.apache.hadoop.hbase.HColumnDescriptor.(HColumnDescriptor.java:352)
> org.apache.hadoop.hbase.HColumnDescriptor.(HColumnDescriptor.java:303)
> org.apache.hadoop.hbase.HColumnDescriptor.(HColumnDescriptor.java:292)
> org.trafodion.sql.HBaseClient.createk(HBaseClient.java:505)
> .
> *** ERROR[8839] Transaction was aborted.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (TRAFODION-1578) Proposal for SPJ management

2015-11-09 Thread Selvaganesan Govindarajan (JIRA)

[ 
https://issues.apache.org/jira/browse/TRAFODION-1578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14996729#comment-14996729
 ] 

Selvaganesan Govindarajan commented on TRAFODION-1578:
--

Is this proposal to reuse pre-started JVMs by different master processes to 
execute UDRs/UDFs  instead of currently running mxudr per master process or to 
start new JVMs to deploy SPJs on different nodes on the cluster? I tried to 
decipher this from the discussions but in vain. Could you please clarify it?

> Proposal for SPJ management
> ---
>
> Key: TRAFODION-1578
> URL: https://issues.apache.org/jira/browse/TRAFODION-1578
> Project: Apache Trafodion
>  Issue Type: Improvement
>  Components: connectivity-dcs
>Reporter: Kevin Xu
>
> JAR upload process:
> 1. Initialize JAR upload procedure by default
> 2. JAR upload by Trafci(add library LIB_NAME JAR_LOCAL_PATH). Upload and 
> create library will be done here. And also, you can only upload the JARs by 
> UPLOAD command on Trafci that it will not create a lib.
>Tips: Before put the JAR into HDFS check MD5 first, if the file exists, 
> only add a record in metadata table in case users upload the same JAR many 
> times on platform.
> 3. On server-side, the JAR will store in HDFS. At the same time JAR 
> metadata(path in HDFS, MD5 of the file, and others) stores in store procedure 
> metadata table.
> 4. create procedure is the same as now.
> JAR perform process:
> 1. Send a CALL by Trafci/JDBC/ODBC/ADO.NET.
> 2. DCSMaster assign a DCSServer for the CALL.
> 3. DCSServer start a JVM for the user. User can modify JVM options, program 
> properties and JAVA classpath. At the same time, a monitor class will be 
> starting in the JVM witch will register a node on Zookeeper for this JVM as 
> well as metadata info( process id, server info and so on) and the node will 
> be removed while JVM exiting. It allows customer to specify JVM idle time in 
> case of some realtime senarior like Kafka consumer. 
> 4. Useful commands on Trafci: list all JVMs in user; kill one of them that no 
> long in use; Restart JVMs with latest JARs and so on.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work started] (TRAFODION-1606) Unable to create a table like a metadata table

2015-11-09 Thread Anoop Sharma (JIRA)

 [ 
https://issues.apache.org/jira/browse/TRAFODION-1606?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Work on TRAFODION-1606 started by Anoop Sharma.
---
> Unable to create a table like a metadata table
> --
>
> Key: TRAFODION-1606
> URL: https://issues.apache.org/jira/browse/TRAFODION-1606
> Project: Apache Trafodion
>  Issue Type: Bug
>  Components: sql-cmu
>Reporter: Roberta Marton
>Assignee: Anoop Sharma
>
> The following error occurs when trying to create a table like a metadata 
> table:
> >create table cols like "_MD_".keys;
> ..
> *** ERROR[8448] Unable to access Hbase interface. Call to 
> ExpHbaseInterface::create() returned error HBASE_CREATE_ERROR(701). Cause:
> java.lang.IllegalArgumentException: Family name can not be empty
> com.google.common.base.Preconditions.checkArgument(Preconditions.java:92)
> org.apache.hadoop.hbase.HColumnDescriptor.isLegalFamilyName(HColumnDescriptor.java:473)
> org.apache.hadoop.hbase.HColumnDescriptor.(HColumnDescriptor.java:426)
> org.apache.hadoop.hbase.HColumnDescriptor.(HColumnDescriptor.java:384)
> org.apache.hadoop.hbase.HColumnDescriptor.(HColumnDescriptor.java:352)
> org.apache.hadoop.hbase.HColumnDescriptor.(HColumnDescriptor.java:303)
> org.apache.hadoop.hbase.HColumnDescriptor.(HColumnDescriptor.java:292)
> org.trafodion.sql.HBaseClient.createk(HBaseClient.java:505)
> .
> *** ERROR[8839] Transaction was aborted.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (TRAFODION-1610) Generate constraint expression for update/merge commands

2015-11-09 Thread Hans Zeller (JIRA)

 [ 
https://issues.apache.org/jira/browse/TRAFODION-1610?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hans Zeller reassigned TRAFODION-1610:
--

Assignee: Hans Zeller

> Generate constraint expression for update/merge commands
> 
>
> Key: TRAFODION-1610
> URL: https://issues.apache.org/jira/browse/TRAFODION-1610
> Project: Apache Trafodion
>  Issue Type: Sub-task
>  Components: sql-cmp
>Reporter: Selvaganesan Govindarajan
>Assignee: Hans Zeller
> Fix For: 2.0-incubating
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Work started] (TRAFODION-1575) Self-referencing update updates the column to a wrong value

2015-11-09 Thread Selvaganesan Govindarajan (JIRA)

 [ 
https://issues.apache.org/jira/browse/TRAFODION-1575?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Work on TRAFODION-1575 started by Selvaganesan Govindarajan.

> Self-referencing update updates the column to a wrong value
> ---
>
> Key: TRAFODION-1575
> URL: https://issues.apache.org/jira/browse/TRAFODION-1575
> Project: Apache Trafodion
>  Issue Type: Bug
>  Components: sql-cmp
>Affects Versions: 1.3-incubating
> Environment: Can be reproduced on a workstation
>Reporter: David Wayne Birdsall
>Assignee: Selvaganesan Govindarajan
> Fix For: 2.0-incubating
>
>
> As shown in the following execution output, the update statement tries to 
> update c2 with count(distinct c2) from the same table. While the subquery 
> ‘select c from (select count(distinct c2) from mytable) dt(c)’ returns the 
> correct result 3 when it is run by itself, the update statement using the 
> same subquery updated the column c2 to 2, instead of 3. The updated value 
> always seems to be 1 less in this case.
> Here is the execution output:
> >>create schema mytest;
> --- SQL operation complete.
> >>
> >>create table mytable (c1 char(1), c2 integer);
> --- SQL operation complete.
> >>
> >>insert into mytable values ('A', 100), ('B', 200), ('C', 300);
> --- 3 row(s) inserted.
> >>select * from mytable order by 1;
> C1 C2
> -- ---
> A 100
> B 200
> C 300
> --- 3 row(s) selected.
> >>select c from (select count(distinct c2) from mytable) dt(c);
> C
> 
>3
> --- 1 row(s) selected.
> >>
> >>prepare xx from update mytable set c2 =
> +>(select c from (select count(distinct c2) from mytable) dt(c))
> +>where c2 = 100;
> --- SQL command prepared.
> >>explain options 'f' xx;
> LC RC OP OPERATOR OPT DESCRIPTION CARD
>       -
> 12 . 13 root x 1.00E+001
> 10 11 12 tuple_flow 1.00E+001
> . . 11 trafodion_insert MYTABLE 1.00E+000
> 9 . 10 sort 1.00E+001
> 8 4 9 hybrid_hash_join 1.00E+001
> 6 7 8 nested_join 1.00E+001
> . . 7 trafodion_delete MYTABLE 1.00E+000
> 5 . 6 sort 1.00E+001
> . . 5 trafodion_scan MYTABLE 1.00E+001
> 3 . 4 sort_scalar_aggr 1.00E+000
> 2 . 3 sort_scalar_aggr 1.00E+000
> 1 . 2 hash_groupby 2.00E+000
> . . 1 trafodion_scan MYTABLE 1.00E+002
> --- SQL operation complete.
> >>execute xx;
> --- 1 row(s) updated.
> >>
> >>select * from mytable order by 1;
> C1 C2
> -- ---
> A 2
> B 200
> C 300
> --- 3 row(s) selected.
> >>
> >>drop schema mytest cascade;
> --- SQL operation complete.
> >>
> The value of C2 in row A above should have been updated to 3.
> This problem was found by Wei-Shiun Tsai.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)