[jira] [Commented] (SQOOP-2973) Is sqoop version 1.4.6 is compatible with hbase version 1.2.1?

2016-12-14 Thread Szabolcs Vasas (JIRA)

[ 
https://issues.apache.org/jira/browse/SQOOP-2973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15748757#comment-15748757
 ] 

Szabolcs Vasas commented on SQOOP-2973:
---

Hi [~ericlin].

I have tried to reproduce the problem on my machine but I did not receive this 
exception. I cloned the Sqoop trunk branch built it using ant clean package 
command then downloaded HBase 1.2.4 binaries and set my HBASE_HOME environment 
variable to this directory (export HBASE_HOME=~/libraries/hbase-1.2.4). After 
that the following command was successful:

export MYCONN=jdbc:mysql://mysqlserver/sqoop
export MYUSER=sqoop
export MYPSWD=sqoop

sqoop import --connect $MYCONN --username $MYUSER --password $MYPSWD --table t1 
-m 1 --hbase-table hbase_import --column-family cf --hbase-create-table 
--verbose  --hbase-row-key 'c_int' --verbose

I looked at the log you sent me and it is strange that it seems your HBASE_HOME 
is not set, can you try setting it and executing your command again?


> Is  sqoop version 1.4.6 is compatible with hbase version 1.2.1?
> ---
>
> Key: SQOOP-2973
> URL: https://issues.apache.org/jira/browse/SQOOP-2973
> Project: Sqoop
>  Issue Type: Bug
> Environment: Haddop  version 2.7.2
>Reporter: Rajib Mandal
> Attachments: hbase1.2.4-error.out
>
>
> We are getting below error while importing data from Oracle to Hbase
> error Exception in thread "main" java.lang.NoSuchMethodError: 
> org.apache.hadoop.hbase.HTableDescriptor.addFamily(Lorg/apache/hadoop/hbase/HColumnDescriptor;)V
>  
> The command executed
>  sqoop import --connect jdbc:oracle:thin:@//orcl. --username sysdba 
> --password  --table GENDER2 --columns "EMPLOYEE_ID,FIRST_NAME,GENDER" 
> --hbase-table employee --column-family GENDER2 --hbase-row-key EMPLOYEE_ID 
> --hbase-create-table
> Is there any way to resolve this?



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


Re: Review Request 54746: SQOOP-3083 Fault injection targets no longer work after SQOOP-2983 due to introducing try with resource

2016-12-14 Thread Anna Szonyi

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54746/
---

(Updated Dec. 14, 2016, 3:45 p.m.)


Review request for Sqoop, Boglarka Egyed, Attila Szabo, Szabolcs Vasas, and 
Erzsebet Szilagyi.


Changes
---

re-added newlines


Bugs: SQOOP-3083
https://issues.apache.org/jira/browse/SQOOP-3083


Repository: sqoop-trunk


Description
---

SQOOP-3083 Fault injection targets no longer work after SQOOP-2983 due to 
introducing try with resource


Diffs (updated)
-

  ivy/libraries.properties e2c2516 
  src/test/aop/build/aop.xml 77320aa 

Diff: https://reviews.apache.org/r/54746/diff/


Testing
---

ant compile, ant test, ant jar-fault-inject


Thanks,

Anna Szonyi



Review Request 54746: SQOOP-3083 Fault injection targets no longer work after SQOOP-2983 due to introducing try with resource

2016-12-14 Thread Anna Szonyi

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54746/
---

Review request for Sqoop, Boglarka Egyed, Attila Szabo, Szabolcs Vasas, and 
Erzsebet Szilagyi.


Bugs: SQOOP-3083
https://issues.apache.org/jira/browse/SQOOP-3083


Repository: sqoop-trunk


Description
---

SQOOP-3083 Fault injection targets no longer work after SQOOP-2983 due to 
introducing try with resource


Diffs
-

  ivy/libraries.properties e2c2516 
  src/test/aop/build/aop.xml 77320aa 

Diff: https://reviews.apache.org/r/54746/diff/


Testing
---

ant compile, ant test, ant jar-fault-inject


Thanks,

Anna Szonyi



[jira] [Updated] (SQOOP-3083) Fault injection targets no longer work after SQOOP-2983

2016-12-14 Thread Anna Szonyi (JIRA)

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

Anna Szonyi updated SQOOP-3083:
---
Attachment: SQOOP-3083.patch

> Fault injection targets no longer work after SQOOP-2983
> ---
>
> Key: SQOOP-3083
> URL: https://issues.apache.org/jira/browse/SQOOP-3083
> Project: Sqoop
>  Issue Type: Bug
>Reporter: Anna Szonyi
>Assignee: Anna Szonyi
> Attachments: SQOOP-3083.patch
>
>
> Fault injection target fails due to:
> compile-fault-inject:
>  [echo] Start weaving aspects in place
>  [iajc] OraOopTestCase.java:157 [error] Syntax error on token "(", { 
> expected
>  [iajc] try (Statement stmt = conn.createStatement()) {
>  [iajc] 
>  [iajc] OraOopTestCase.java:157 [error] Syntax error on token ")", ; 
> expected
>  [iajc] try (Statement stmt = conn.createStatement()) {
>  [iajc] 
>  [iajc] OraOopTestCase.java:161 [error] Syntax error, insert "}" to 
> complete Block
>  [iajc] }
>  [iajc] 
>  [iajc] OraOopTestCase.java:161 [error] Syntax error, insert "Finally" to 
> complete TryStatement
>  [iajc] }
>  [iajc] 
>  [iajc] OraOopTypesTest.java:56 [error] Syntax error on token "(", { 
> expected
>  [iajc] try (Statement stmt = conn.createStatement()) {
>  [iajc] 
>  [iajc] OraOopTypesTest.java:56 [error] Syntax error on token ")", ; 
> expected
>  [iajc] try (Statement stmt = conn.createStatement()) {
>  [iajc] 
>  [iajc] OraOopTypesTest.java:78 [error] Syntax error on token "(", { 
> expected
>  [iajc] try (Statement stmt = conn.createStatement()) {
>  [iajc] 
>  [iajc] OraOopTypesTest.java:78 [error] Duplicate local variable stmt
>  [iajc] try (Statement stmt = conn.createStatement()) {
>  [iajc]
>  [iajc] OraOopTypesTest.java:78 [error] Syntax error on token ")", ; 
> expected
>  [iajc] try (Statement stmt = conn.createStatement()) {
>  [iajc] 
>  [iajc] OraOopTypesTest.java:157 [error] Syntax error, insert "}" to 
> complete Block
>  [iajc] }
>  [iajc] 
>  [iajc] OraOopTypesTest.java:157 [error] Syntax error, insert "Finally" 
> to complete TryStatement
>  [iajc] }
>  [iajc] 
>  [iajc] OraOopTypesTest.java:157 [error] Syntax error, insert "}" to 
> complete Block
>  [iajc] }
>  [iajc] 
>  [iajc] OraOopTypesTest.java:157 [error] Syntax error, insert "Finally" 
> to complete BlockStatements
>  [iajc] }
>  [iajc] 
>  [iajc] OracleData.java:240 [error] Syntax error on token "(", { expected
>  [iajc] try (Statement stmt = conn.createStatement()) {
>  [iajc] 
>  [iajc] OracleData.java:240 [error] Syntax error on token ")", ; expected
>  [iajc] try (Statement stmt = conn.createStatement()) {
>  [iajc] 
>  [iajc] OracleData.java:243 [error] Syntax error, insert "}" to complete 
> Block
>  [iajc] }
>  [iajc] 
>  [iajc] OracleData.java:243 [error] Syntax error, insert "Finally" to 
> complete BlockStatements
>  [iajc] }
>  [iajc] 
>  [iajc] 
>  [iajc] 17 errors



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


[jira] [Assigned] (SQOOP-3083) Fault injection targets no longer work after SQOOP-2983

2016-12-14 Thread Anna Szonyi (JIRA)

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

Anna Szonyi reassigned SQOOP-3083:
--

Assignee: Anna Szonyi

> Fault injection targets no longer work after SQOOP-2983
> ---
>
> Key: SQOOP-3083
> URL: https://issues.apache.org/jira/browse/SQOOP-3083
> Project: Sqoop
>  Issue Type: Bug
>Reporter: Anna Szonyi
>Assignee: Anna Szonyi
>
> Fault injection target fails due to:
> compile-fault-inject:
>  [echo] Start weaving aspects in place
>  [iajc] OraOopTestCase.java:157 [error] Syntax error on token "(", { 
> expected
>  [iajc] try (Statement stmt = conn.createStatement()) {
>  [iajc] 
>  [iajc] OraOopTestCase.java:157 [error] Syntax error on token ")", ; 
> expected
>  [iajc] try (Statement stmt = conn.createStatement()) {
>  [iajc] 
>  [iajc] OraOopTestCase.java:161 [error] Syntax error, insert "}" to 
> complete Block
>  [iajc] }
>  [iajc] 
>  [iajc] OraOopTestCase.java:161 [error] Syntax error, insert "Finally" to 
> complete TryStatement
>  [iajc] }
>  [iajc] 
>  [iajc] OraOopTypesTest.java:56 [error] Syntax error on token "(", { 
> expected
>  [iajc] try (Statement stmt = conn.createStatement()) {
>  [iajc] 
>  [iajc] OraOopTypesTest.java:56 [error] Syntax error on token ")", ; 
> expected
>  [iajc] try (Statement stmt = conn.createStatement()) {
>  [iajc] 
>  [iajc] OraOopTypesTest.java:78 [error] Syntax error on token "(", { 
> expected
>  [iajc] try (Statement stmt = conn.createStatement()) {
>  [iajc] 
>  [iajc] OraOopTypesTest.java:78 [error] Duplicate local variable stmt
>  [iajc] try (Statement stmt = conn.createStatement()) {
>  [iajc]
>  [iajc] OraOopTypesTest.java:78 [error] Syntax error on token ")", ; 
> expected
>  [iajc] try (Statement stmt = conn.createStatement()) {
>  [iajc] 
>  [iajc] OraOopTypesTest.java:157 [error] Syntax error, insert "}" to 
> complete Block
>  [iajc] }
>  [iajc] 
>  [iajc] OraOopTypesTest.java:157 [error] Syntax error, insert "Finally" 
> to complete TryStatement
>  [iajc] }
>  [iajc] 
>  [iajc] OraOopTypesTest.java:157 [error] Syntax error, insert "}" to 
> complete Block
>  [iajc] }
>  [iajc] 
>  [iajc] OraOopTypesTest.java:157 [error] Syntax error, insert "Finally" 
> to complete BlockStatements
>  [iajc] }
>  [iajc] 
>  [iajc] OracleData.java:240 [error] Syntax error on token "(", { expected
>  [iajc] try (Statement stmt = conn.createStatement()) {
>  [iajc] 
>  [iajc] OracleData.java:240 [error] Syntax error on token ")", ; expected
>  [iajc] try (Statement stmt = conn.createStatement()) {
>  [iajc] 
>  [iajc] OracleData.java:243 [error] Syntax error, insert "}" to complete 
> Block
>  [iajc] }
>  [iajc] 
>  [iajc] OracleData.java:243 [error] Syntax error, insert "Finally" to 
> complete BlockStatements
>  [iajc] }
>  [iajc] 
>  [iajc] 
>  [iajc] 17 errors



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


Re: Review Request 54745: SQOOP-3084 bug fix in aop.xml, org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties path needs to be changed after SQOOP-3051

2016-12-14 Thread Erzsebet Szilagyi

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54745/#review159150
---


Ship it!




Thank you for catching this error and providing a fix so quickly!

- Erzsebet Szilagyi


On Dec. 14, 2016, 3 p.m., Anna Szonyi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54745/
> ---
> 
> (Updated Dec. 14, 2016, 3 p.m.)
> 
> 
> Review request for Sqoop, Boglarka Egyed, Attila Szabo, Szabolcs Vasas, and 
> Erzsebet Szilagyi.
> 
> 
> Bugs: SQOOP-3084
> https://issues.apache.org/jira/browse/SQOOP-3084
> 
> 
> Repository: sqoop-trunk
> 
> 
> Description
> ---
> 
> SQOOP-3084 Due to ivy changes in 3051 the path of 
> org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties path needs to be 
> changed, as there is no longer a hadoop${hadoopversion}test, just test
> There is another jira to fix the issue with the fault injection targets no 
> longer working after SQOOP-2983
> 
> 
> Diffs
> -
> 
>   src/test/aop/build/aop.xml 77320aa 
> 
> Diff: https://reviews.apache.org/r/54745/diff/
> 
> 
> Testing
> ---
> 
> ant compile, ant test, ant jar-fault-inject
> 
> 
> Thanks,
> 
> Anna Szonyi
> 
>



[jira] [Updated] (SQOOP-3084) org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties path needs to be changed after SQOOP-3051

2016-12-14 Thread Anna Szonyi (JIRA)

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

Anna Szonyi updated SQOOP-3084:
---
Description: Due to ivy changes in 3051 the path of 
org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties path needs to be 
changed, as there is no longer a hadoop$\{hadoopversion\}test, just test  (was: 
Due to ivy changes in 3051 the path of 
org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties path needs to be 
changed, as there is no longer a hadoop $\{hadoopversion\}test, just test)

> org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties path needs to be 
> changed after SQOOP-3051
> ---
>
> Key: SQOOP-3084
> URL: https://issues.apache.org/jira/browse/SQOOP-3084
> Project: Sqoop
>  Issue Type: Bug
>Reporter: Anna Szonyi
>Assignee: Anna Szonyi
> Attachments: SQOOP-3084.patch
>
>
> Due to ivy changes in 3051 the path of 
> org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties path needs to be 
> changed, as there is no longer a hadoop$\{hadoopversion\}test, just test



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


[jira] [Updated] (SQOOP-3084) org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties path needs to be changed after SQOOP-3051

2016-12-14 Thread Anna Szonyi (JIRA)

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

Anna Szonyi updated SQOOP-3084:
---
Description: Due to ivy changes in 3051 the path of 
org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties path needs to be 
changed, as there is no longer a hadoop $\{hadoopversion\}test, just test  
(was: Due to ivy changes in 3051 the path of 
org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties path needs to be 
changed, as there is no longer a hadoop\$\{hadoopversion\}test, just test)

> org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties path needs to be 
> changed after SQOOP-3051
> ---
>
> Key: SQOOP-3084
> URL: https://issues.apache.org/jira/browse/SQOOP-3084
> Project: Sqoop
>  Issue Type: Bug
>Reporter: Anna Szonyi
>Assignee: Anna Szonyi
> Attachments: SQOOP-3084.patch
>
>
> Due to ivy changes in 3051 the path of 
> org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties path needs to be 
> changed, as there is no longer a hadoop $\{hadoopversion\}test, just test



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


[jira] [Updated] (SQOOP-3084) org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties path needs to be changed after SQOOP-3051

2016-12-14 Thread Anna Szonyi (JIRA)

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

Anna Szonyi updated SQOOP-3084:
---
Attachment: SQOOP-3084.patch

> org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties path needs to be 
> changed after SQOOP-3051
> ---
>
> Key: SQOOP-3084
> URL: https://issues.apache.org/jira/browse/SQOOP-3084
> Project: Sqoop
>  Issue Type: Bug
>Reporter: Anna Szonyi
>Assignee: Anna Szonyi
> Attachments: SQOOP-3084.patch
>
>




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


[jira] [Assigned] (SQOOP-3084) org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties path needs to be changed after SQOOP-3051

2016-12-14 Thread Anna Szonyi (JIRA)

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

Anna Szonyi reassigned SQOOP-3084:
--

Assignee: Anna Szonyi

> org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties path needs to be 
> changed after SQOOP-3051
> ---
>
> Key: SQOOP-3084
> URL: https://issues.apache.org/jira/browse/SQOOP-3084
> Project: Sqoop
>  Issue Type: Bug
>Reporter: Anna Szonyi
>Assignee: Anna Szonyi
> Attachments: SQOOP-3084.patch
>
>




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


[jira] [Created] (SQOOP-3084) org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties path needs to be changed after SQOOP-3051

2016-12-14 Thread Anna Szonyi (JIRA)
Anna Szonyi created SQOOP-3084:
--

 Summary: org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties 
path needs to be changed after SQOOP-3051
 Key: SQOOP-3084
 URL: https://issues.apache.org/jira/browse/SQOOP-3084
 Project: Sqoop
  Issue Type: Bug
Reporter: Anna Szonyi






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


[jira] [Created] (SQOOP-3083) Fault injection targets no longer work after SQOOP-2983

2016-12-14 Thread Anna Szonyi (JIRA)
Anna Szonyi created SQOOP-3083:
--

 Summary: Fault injection targets no longer work after SQOOP-2983
 Key: SQOOP-3083
 URL: https://issues.apache.org/jira/browse/SQOOP-3083
 Project: Sqoop
  Issue Type: Bug
Reporter: Anna Szonyi


Fault injection target fails due to:

compile-fault-inject:
 [echo] Start weaving aspects in place
 [iajc] OraOopTestCase.java:157 [error] Syntax error on token "(", { 
expected
 [iajc] try (Statement stmt = conn.createStatement()) {
 [iajc] 
 [iajc] OraOopTestCase.java:157 [error] Syntax error on token ")", ; 
expected
 [iajc] try (Statement stmt = conn.createStatement()) {
 [iajc] 
 [iajc] OraOopTestCase.java:161 [error] Syntax error, insert "}" to 
complete Block
 [iajc] }
 [iajc] 
 [iajc] OraOopTestCase.java:161 [error] Syntax error, insert "Finally" to 
complete TryStatement
 [iajc] }
 [iajc] 
 [iajc] OraOopTypesTest.java:56 [error] Syntax error on token "(", { 
expected
 [iajc] try (Statement stmt = conn.createStatement()) {
 [iajc] 
 [iajc] OraOopTypesTest.java:56 [error] Syntax error on token ")", ; 
expected
 [iajc] try (Statement stmt = conn.createStatement()) {
 [iajc] 
 [iajc] OraOopTypesTest.java:78 [error] Syntax error on token "(", { 
expected
 [iajc] try (Statement stmt = conn.createStatement()) {
 [iajc] 
 [iajc] OraOopTypesTest.java:78 [error] Duplicate local variable stmt
 [iajc] try (Statement stmt = conn.createStatement()) {
 [iajc]
 [iajc] OraOopTypesTest.java:78 [error] Syntax error on token ")", ; 
expected
 [iajc] try (Statement stmt = conn.createStatement()) {
 [iajc] 
 [iajc] OraOopTypesTest.java:157 [error] Syntax error, insert "}" to 
complete Block
 [iajc] }
 [iajc] 
 [iajc] OraOopTypesTest.java:157 [error] Syntax error, insert "Finally" to 
complete TryStatement
 [iajc] }
 [iajc] 
 [iajc] OraOopTypesTest.java:157 [error] Syntax error, insert "}" to 
complete Block
 [iajc] }
 [iajc] 
 [iajc] OraOopTypesTest.java:157 [error] Syntax error, insert "Finally" to 
complete BlockStatements
 [iajc] }
 [iajc] 
 [iajc] OracleData.java:240 [error] Syntax error on token "(", { expected
 [iajc] try (Statement stmt = conn.createStatement()) {
 [iajc] 
 [iajc] OracleData.java:240 [error] Syntax error on token ")", ; expected
 [iajc] try (Statement stmt = conn.createStatement()) {
 [iajc] 
 [iajc] OracleData.java:243 [error] Syntax error, insert "}" to complete 
Block
 [iajc] }
 [iajc] 
 [iajc] OracleData.java:243 [error] Syntax error, insert "Finally" to 
complete BlockStatements
 [iajc] }
 [iajc] 
 [iajc] 
 [iajc] 17 errors




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


[jira] [Updated] (SQOOP-3081) use OracleEscapeUtils.escapeIdentifier OracleUpsertOutputFormat + add compatibility with SQOOP-3066

2016-12-14 Thread Anna Szonyi (JIRA)

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

Anna Szonyi updated SQOOP-3081:
---
Attachment: SQOOP-3081-2.patch

> use OracleEscapeUtils.escapeIdentifier OracleUpsertOutputFormat + add 
> compatibility with SQOOP-3066
> ---
>
> Key: SQOOP-3081
> URL: https://issues.apache.org/jira/browse/SQOOP-3081
> Project: Sqoop
>  Issue Type: Bug
>Reporter: Anna Szonyi
>Assignee: Anna Szonyi
> Attachments: SQOOP-3081-2.patch, SQOOP-3081-3.patch, SQOOP-3081.patch
>
>
> Introduce OracleEscapeUtils.escapeIdentifiers In OracleUpsertOutputFormat to 
> make it consistent with the rest of the code and compatible with SQOOP-3066.



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


[jira] [Updated] (SQOOP-3081) use OracleEscapeUtils.escapeIdentifier OracleUpsertOutputFormat + add compatibility with SQOOP-3066

2016-12-14 Thread Anna Szonyi (JIRA)

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

Anna Szonyi updated SQOOP-3081:
---
Attachment: SQOOP-3081-3.patch

> use OracleEscapeUtils.escapeIdentifier OracleUpsertOutputFormat + add 
> compatibility with SQOOP-3066
> ---
>
> Key: SQOOP-3081
> URL: https://issues.apache.org/jira/browse/SQOOP-3081
> Project: Sqoop
>  Issue Type: Bug
>Reporter: Anna Szonyi
>Assignee: Anna Szonyi
> Attachments: SQOOP-3081-2.patch, SQOOP-3081-3.patch, SQOOP-3081.patch
>
>
> Introduce OracleEscapeUtils.escapeIdentifiers In OracleUpsertOutputFormat to 
> make it consistent with the rest of the code and compatible with SQOOP-3066.



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


[jira] [Updated] (SQOOP-3081) use OracleEscapeUtils.escapeIdentifier OracleUpsertOutputFormat

2016-12-14 Thread Anna Szonyi (JIRA)

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

Anna Szonyi updated SQOOP-3081:
---
Description: 
Introduce OracleEscapeUtils.escapeIdentifiers In OracleUpsertOutputFormat to 
make it consistent with the rest of the code and compatible with SQOOP-3066.


  was:
Introduce OracleEscapeUtils.escapeIdentifiers In OracleUpsertOutputFormat to 
make it consistent with the rest of the code and add escaping to the rest of 
the column variables.



> use OracleEscapeUtils.escapeIdentifier OracleUpsertOutputFormat
> ---
>
> Key: SQOOP-3081
> URL: https://issues.apache.org/jira/browse/SQOOP-3081
> Project: Sqoop
>  Issue Type: Bug
>Reporter: Anna Szonyi
>Assignee: Anna Szonyi
> Attachments: SQOOP-3081.patch
>
>
> Introduce OracleEscapeUtils.escapeIdentifiers In OracleUpsertOutputFormat to 
> make it consistent with the rest of the code and compatible with SQOOP-3066.



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


[jira] [Updated] (SQOOP-3081) use OracleEscapeUtils.escapeIdentifier OracleUpsertOutputFormat + add compatibility with SQOOP-3066

2016-12-14 Thread Anna Szonyi (JIRA)

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

Anna Szonyi updated SQOOP-3081:
---
Summary: use OracleEscapeUtils.escapeIdentifier OracleUpsertOutputFormat + 
add compatibility with SQOOP-3066  (was: use OracleEscapeUtils.escapeIdentifier 
OracleUpsertOutputFormat)

> use OracleEscapeUtils.escapeIdentifier OracleUpsertOutputFormat + add 
> compatibility with SQOOP-3066
> ---
>
> Key: SQOOP-3081
> URL: https://issues.apache.org/jira/browse/SQOOP-3081
> Project: Sqoop
>  Issue Type: Bug
>Reporter: Anna Szonyi
>Assignee: Anna Szonyi
> Attachments: SQOOP-3081.patch
>
>
> Introduce OracleEscapeUtils.escapeIdentifiers In OracleUpsertOutputFormat to 
> make it consistent with the rest of the code and compatible with SQOOP-3066.



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


Re: Review Request 54699: SQOOP-3081 use OracleEscapeUtils.escapeIdentifier in OracleUpsertOutputFormat

2016-12-14 Thread Anna Szonyi

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54699/
---

(Updated Dec. 14, 2016, 11:50 a.m.)


Review request for Sqoop, Attila Szabo and Szabolcs Vasas.


Changes
---

use config for consistency


Bugs: SQOOP-3081
https://issues.apache.org/jira/browse/SQOOP-3081


Repository: sqoop-trunk


Description
---

SQOOP-3081 Introduce OracleEscapeUtils.escapeIdentifiers In 
OracleUpsertOutputFormat to make it consistent with the rest of the code and 
add escaping to the rest of the column variables.


Diffs (updated)
-

  src/java/org/apache/sqoop/mapreduce/OracleUpsertOutputFormat.java 88754e7 
  src/test/com/cloudera/sqoop/manager/OracleExportTest.java 382eb92 

Diff: https://reviews.apache.org/r/54699/diff/


Testing
---

ran ant clean test, ant clean test -Dsqoop.thirdparty.lib.dir=$3rdpartylib 
-Dthirdparty=true 
-Dsqoop.test.oracle.connectstring=$connstr-Dmapred.child.java.opts="-Djava.security.egd=file:/dev/../dev/urandom"
 -Dtest.timeout=100 -Dtestcase=*racle*Test with special attention to 
OracleExportTest#testUpsertTextExport


Thanks,

Anna Szonyi



[jira] [Assigned] (SQOOP-3039) Sqoop unable to export Time data "13:14:12.1234" into Time colum in RMDBS

2016-12-14 Thread Eric Lin (JIRA)

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

Eric Lin reassigned SQOOP-3039:
---

Assignee: Eric Lin

> Sqoop unable to export Time data "13:14:12.1234" into Time colum in RMDBS
> -
>
> Key: SQOOP-3039
> URL: https://issues.apache.org/jira/browse/SQOOP-3039
> Project: Sqoop
>  Issue Type: Bug
>  Components: tools
>Affects Versions: 1.4.6
>Reporter: Eric Lin
>Assignee: Eric Lin
>Priority: Minor
> Attachments: SQOOP-3039.2.patch, SQOOP-3039.patch
>
>
> To re-produce:
> Set up MySQL database with following schema:
> {code}
> CREATE TABLE `test` (
>   `a` time(2) DEFAULT NULL
> ) ENGINE=InnoDB DEFAULT CHARSET=latin1
> {code}
> Store the following data in HDFS:
> {code}
> 16:56:53.0999
> 16:56:54.1
> 16:56:53.
> 16:56:54.1230
> {code}
> run Sqoop export command to copy data from HDFS into MySQL:
> {code}
> qoop export --connect jdbc:mysql:///test --username root 
> --password password --table test  -m 1 --driver com.mysql.jdbc.Driver  
> --export-dir /tmp/test
> {code}
> Command will fail with the following error:
> {code}
> java.lang.RuntimeException: Can't parse input data: '16:56:53.0999'
> at t5.__loadFromFields(t5.java:223)
> at t5.parse(t5.java:166)
> at 
> org.apache.sqoop.mapreduce.TextExportMapper.map(TextExportMapper.java:89)
> at 
> org.apache.sqoop.mapreduce.TextExportMapper.map(TextExportMapper.java:39)
> at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:145)
> at 
> org.apache.sqoop.mapreduce.AutoProgressMapper.run(AutoProgressMapper.java:64)
> at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:784)
> at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
> at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:163)
> at java.security.AccessController.doPrivileged(Native Method)
> at javax.security.auth.Subject.doAs(Subject.java:422)
> at 
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1628)
> at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)
> Caused by: java.lang.NumberFormatException: For input string: "53.0999"
> at 
> java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
> at java.lang.Integer.parseInt(Integer.java:580)
> at java.lang.Integer.parseInt(Integer.java:615)
> at java.sql.Time.valueOf(Time.java:108)
> at t5.__loadFromFields(t5.java:215)
> ... 12 more
> {code}
> Looks like Sqoop uses java.sql.Time.valueOf function to convert 
> "16:56:53.0999" to Time object, however, this function only accepts Time in 
> "hh:mm:ss" format:
> https://docs.oracle.com/javase/7/docs/api/java/sql/Time.html#valueOf(java.lang.String)



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


[jira] [Assigned] (SQOOP-3061) Sqoop --options-file failed with error "Malformed option in options file" even though the query is correct

2016-12-14 Thread Eric Lin (JIRA)

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

Eric Lin reassigned SQOOP-3061:
---

Assignee: Eric Lin

> Sqoop --options-file failed with error "Malformed option in options file" 
> even though the query is correct
> --
>
> Key: SQOOP-3061
> URL: https://issues.apache.org/jira/browse/SQOOP-3061
> Project: Sqoop
>  Issue Type: Bug
>Affects Versions: 1.4.6
>Reporter: Eric Lin
>Assignee: Eric Lin
>Priority: Minor
>  Labels: patch
> Attachments: SQOOP-3061.2.patch, SQOOP-3061.3.patch, SQOOP-3061.patch
>
>
> if you have the following in the options file:
> --query
> SELECT * FROM test WHERE a = 'b'
> and then run 
> {code}
> sqoop --options-file 
> {code}
> it will fail with the following error:
> {code}
> 16/11/22 16:08:59 ERROR sqoop.Sqoop: Error while expanding arguments
> java.lang.Exception: Malformed option in options 
> file(/tmp/sqoop_runner_from_stdin_1112_12354__sqoop_options_file): SELECT * 
> FROM test WHERE a = 'b'
> at 
> org.apache.sqoop.util.OptionsFileUtil.removeQuoteCharactersIfNecessary(OptionsFileUtil.java:170)
> at 
> org.apache.sqoop.util.OptionsFileUtil.removeQuotesEncolosingOption(OptionsFileUtil.java:136)
> at 
> org.apache.sqoop.util.OptionsFileUtil.expandArguments(OptionsFileUtil.java:90)
> at 
> com.cloudera.sqoop.util.OptionsFileUtil.expandArguments(OptionsFileUtil.java:33)
> at org.apache.sqoop.Sqoop.runTool(Sqoop.java:199)
> at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)
> at org.apache.sqoop.Sqoop.main(Sqoop.java:236)
> Malformed option in options 
> file(/tmp/sqoop_runner_from_stdin_1112_12354__sqoop_options_file): SELECT * 
> FROM test WHERE a = 'b'
> {code}
> This is caused by function 
> org.apache.sqoop.util.OptionsFileUtil.removeQuoteCharactersIfNecessary only 
> checks for starting and ending quotes and will fail if the query does not 
> start with a quote but ends with a quote, like the example query above.
> {code}
>   private static String removeQuoteCharactersIfNecessary(String fileName,
>   String option, char quote) throws Exception {
> boolean startingQuote = (option.charAt(0) == quote);
> boolean endingQuote = (option.charAt(option.length() - 1) == quote);
> if (startingQuote && endingQuote) {
>   if (option.length() == 1) {
> throw new Exception("Malformed option in options file("
> + fileName + "): " + option);
>   }
>   return option.substring(1, option.length() - 1);
> }
> if (startingQuote || endingQuote) {
>throw new Exception("Malformed option in options file("
>+ fileName + "): " + option);
> }
> return option;
>   }
> {code}



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


Re: Review Request 54699: SQOOP-3081 use OracleEscapeUtils.escapeIdentifier in OracleUpsertOutputFormat

2016-12-14 Thread Szabolcs Vasas

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54699/#review159134
---




src/java/org/apache/sqoop/mapreduce/OracleUpsertOutputFormat.java (line 76)


Can we use a org.apache.hadoop.conf.Configuration instance for accessing 
this property instead of the system property?


- Szabolcs Vasas


On Dec. 14, 2016, 10:14 a.m., Anna Szonyi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54699/
> ---
> 
> (Updated Dec. 14, 2016, 10:14 a.m.)
> 
> 
> Review request for Sqoop, Attila Szabo and Szabolcs Vasas.
> 
> 
> Bugs: SQOOP-3081
> https://issues.apache.org/jira/browse/SQOOP-3081
> 
> 
> Repository: sqoop-trunk
> 
> 
> Description
> ---
> 
> SQOOP-3081 Introduce OracleEscapeUtils.escapeIdentifiers In 
> OracleUpsertOutputFormat to make it consistent with the rest of the code and 
> add escaping to the rest of the column variables.
> 
> 
> Diffs
> -
> 
>   src/java/org/apache/sqoop/SqoopOptions.java 53cc03a 
>   src/java/org/apache/sqoop/manager/oracle/OracleUtils.java aa56e70 
>   src/java/org/apache/sqoop/mapreduce/OracleUpsertOutputFormat.java 88754e7 
>   src/test/com/cloudera/sqoop/manager/OracleExportTest.java 382eb92 
> 
> Diff: https://reviews.apache.org/r/54699/diff/
> 
> 
> Testing
> ---
> 
> ran ant clean test, ant clean test -Dsqoop.thirdparty.lib.dir=$3rdpartylib 
> -Dthirdparty=true 
> -Dsqoop.test.oracle.connectstring=$connstr-Dmapred.child.java.opts="-Djava.security.egd=file:/dev/../dev/urandom"
>  -Dtest.timeout=100 -Dtestcase=*racle*Test with special attention to 
> OracleExportTest#testUpsertTextExport
> 
> 
> Thanks,
> 
> Anna Szonyi
> 
>



[jira] [Assigned] (SQOOP-3042) Sqoop does not clear compile directory under /tmp/sqoop-/compile automatically

2016-12-14 Thread Eric Lin (JIRA)

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

Eric Lin reassigned SQOOP-3042:
---

Assignee: Eric Lin

> Sqoop does not clear compile directory under /tmp/sqoop-/compile 
> automatically
> 
>
> Key: SQOOP-3042
> URL: https://issues.apache.org/jira/browse/SQOOP-3042
> Project: Sqoop
>  Issue Type: Bug
>Affects Versions: 1.4.6
>Reporter: Eric Lin
>Assignee: Eric Lin
>Priority: Critical
>  Labels: patch
> Attachments: SQOOP-3042.1.patch, SQOOP-3042.2.patch
>
>
> After running sqoop, all the temp files generated by ClassWriter are left 
> behind on disk, so anyone can check those JAVA files to see the schema of 
> those tables that Sqoop has been interacting with. By default, the directory 
> is under /tmp/sqoop-/compile.
> In class org.apache.sqoop.SqoopOptions, function getNonceJarDir(), I can see 
> that we did add "deleteOnExit" on the temp dir:
> {code}
> for (int attempts = 0; attempts < MAX_DIR_CREATE_ATTEMPTS; attempts++) {
>   hashDir = new File(baseDir, RandomHash.generateMD5String());
>   while (hashDir.exists()) {
> hashDir = new File(baseDir, RandomHash.generateMD5String());
>   }
>   if (hashDir.mkdirs()) {
> // We created the directory. Use it.
> // If this directory is not actually filled with files, delete it
> // when the JVM quits.
> hashDir.deleteOnExit();
> break;
>   }
> }
> {code}
> However, I believe it failed to delete due to directory is not empty.



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


Re: Review Request 54699: SQOOP-3081 use OracleEscapeUtils.escapeIdentifier in OracleUpsertOutputFormat

2016-12-14 Thread Anna Szonyi

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54699/#review159129
---




src/java/org/apache/sqoop/SqoopOptions.java (line 2735)


If this is an acceptable solution, we could change the code so that all of 
the escaping/decisions about escaping are handled by the escapeIdentifier 
method.


- Anna Szonyi


On Dec. 14, 2016, 10:14 a.m., Anna Szonyi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54699/
> ---
> 
> (Updated Dec. 14, 2016, 10:14 a.m.)
> 
> 
> Review request for Sqoop, Attila Szabo and Szabolcs Vasas.
> 
> 
> Bugs: SQOOP-3081
> https://issues.apache.org/jira/browse/SQOOP-3081
> 
> 
> Repository: sqoop-trunk
> 
> 
> Description
> ---
> 
> SQOOP-3081 Introduce OracleEscapeUtils.escapeIdentifiers In 
> OracleUpsertOutputFormat to make it consistent with the rest of the code and 
> add escaping to the rest of the column variables.
> 
> 
> Diffs
> -
> 
>   src/java/org/apache/sqoop/SqoopOptions.java 53cc03a 
>   src/java/org/apache/sqoop/manager/oracle/OracleUtils.java aa56e70 
>   src/java/org/apache/sqoop/mapreduce/OracleUpsertOutputFormat.java 88754e7 
>   src/test/com/cloudera/sqoop/manager/OracleExportTest.java 382eb92 
> 
> Diff: https://reviews.apache.org/r/54699/diff/
> 
> 
> Testing
> ---
> 
> ran ant clean test, ant clean test -Dsqoop.thirdparty.lib.dir=$3rdpartylib 
> -Dthirdparty=true 
> -Dsqoop.test.oracle.connectstring=$connstr-Dmapred.child.java.opts="-Djava.security.egd=file:/dev/../dev/urandom"
>  -Dtest.timeout=100 -Dtestcase=*racle*Test with special attention to 
> OracleExportTest#testUpsertTextExport
> 
> 
> Thanks,
> 
> Anna Szonyi
> 
>



Re: Review Request 54699: SQOOP-3081 use OracleEscapeUtils.escapeIdentifier in OracleUpsertOutputFormat

2016-12-14 Thread Anna Szonyi

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54699/
---

(Updated Dec. 14, 2016, 10:14 a.m.)


Review request for Sqoop, Attila Szabo and Szabolcs Vasas.


Changes
---

changed to public static instead of System prop


Bugs: SQOOP-3081
https://issues.apache.org/jira/browse/SQOOP-3081


Repository: sqoop-trunk


Description
---

SQOOP-3081 Introduce OracleEscapeUtils.escapeIdentifiers In 
OracleUpsertOutputFormat to make it consistent with the rest of the code and 
add escaping to the rest of the column variables.


Diffs (updated)
-

  src/java/org/apache/sqoop/SqoopOptions.java 53cc03a 
  src/java/org/apache/sqoop/manager/oracle/OracleUtils.java aa56e70 
  src/java/org/apache/sqoop/mapreduce/OracleUpsertOutputFormat.java 88754e7 
  src/test/com/cloudera/sqoop/manager/OracleExportTest.java 382eb92 

Diff: https://reviews.apache.org/r/54699/diff/


Testing
---

ran ant clean test, ant clean test -Dsqoop.thirdparty.lib.dir=$3rdpartylib 
-Dthirdparty=true 
-Dsqoop.test.oracle.connectstring=$connstr-Dmapred.child.java.opts="-Djava.security.egd=file:/dev/../dev/urandom"
 -Dtest.timeout=100 -Dtestcase=*racle*Test with special attention to 
OracleExportTest#testUpsertTextExport


Thanks,

Anna Szonyi



Re: Review Request 54699: SQOOP-3081 use OracleEscapeUtils.escapeIdentifier in OracleUpsertOutputFormat

2016-12-14 Thread Anna Szonyi

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54699/
---

(Updated Dec. 14, 2016, 9:52 a.m.)


Review request for Sqoop, Attila Szabo and Szabolcs Vasas.


Changes
---

made it compliant with 3066 + fixed per reviews


Bugs: SQOOP-3081
https://issues.apache.org/jira/browse/SQOOP-3081


Repository: sqoop-trunk


Description
---

SQOOP-3081 Introduce OracleEscapeUtils.escapeIdentifiers In 
OracleUpsertOutputFormat to make it consistent with the rest of the code and 
add escaping to the rest of the column variables.


Diffs (updated)
-

  src/java/org/apache/sqoop/SqoopOptions.java 53cc03a 
  src/java/org/apache/sqoop/manager/oracle/OracleUtils.java aa56e70 
  src/java/org/apache/sqoop/mapreduce/OracleUpsertOutputFormat.java 88754e7 
  src/test/com/cloudera/sqoop/manager/OracleExportTest.java 382eb92 

Diff: https://reviews.apache.org/r/54699/diff/


Testing
---

ran ant clean test, ant clean test -Dsqoop.thirdparty.lib.dir=$3rdpartylib 
-Dthirdparty=true 
-Dsqoop.test.oracle.connectstring=$connstr-Dmapred.child.java.opts="-Djava.security.egd=file:/dev/../dev/urandom"
 -Dtest.timeout=100 -Dtestcase=*racle*Test with special attention to 
OracleExportTest#testUpsertTextExport


Thanks,

Anna Szonyi