[jira] [Commented] (SQOOP-3082) Sqoop import fails after TCP connection reset if split by datetime column

2018-05-18 Thread Hudson (JIRA)

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

Hudson commented on SQOOP-3082:
---

SUCCESS: Integrated in Jenkins build Sqoop-hadoop200 #1167 (See 
[https://builds.apache.org/job/Sqoop-hadoop200/1167/])
SQOOP-3082: Sqoop import fails after TCP connection reset if split by (vasas: 
[https://git-wip-us.apache.org/repos/asf?p=sqoop.git=commit=ad7d046ef1d68b46aacdf6e124056f5901e95e5c])
* (edit) src/java/org/apache/sqoop/mapreduce/db/SQLServerDBRecordReader.java


> Sqoop import fails after TCP connection reset if split by datetime column
> -
>
> Key: SQOOP-3082
> URL: https://issues.apache.org/jira/browse/SQOOP-3082
> Project: Sqoop
>  Issue Type: Bug
>Affects Versions: 1.4.6
>Reporter: Sergey Svynarchuk
>Priority: Major
> Fix For: 1.5.0
>
> Attachments: SQOOP-3082-1.patch, SQOOP-3082.patch
>
>
> If sqoop-to-mssqlserver connection reset, the whole command fails with 
> "Connection reset with com.microsoft.sqlserver.jdbc.SQLServerException: 
> Incorrect syntax near '00'" . On reestablishing connection, Sqoop tries to 
> resume import from the last record that was successfully read by :
> {code}
> 2016-12-10 15:18:54,523 INFO [main] 
> org.apache.sqoop.mapreduce.db.DBRecordReader: Executing query: select * from 
> test.dbo.test1 WITH (nolock) where Date >= '2015-01-10' and Date <= 
> '2016-11-24' and ( Date > 2015-09-18 00:00:00.0 ) AND ( Date < '2015-09-23 
> 11:48:00.0' ) 
> {code}
> Not quoted 2015-09-18 00:00:00.0 in SQL.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SQOOP-3082) Sqoop import fails after TCP connection reset if split by datetime column

2018-05-18 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on SQOOP-3082:


Commit ad7d046ef1d68b46aacdf6e124056f5901e95e5c in sqoop's branch 
refs/heads/trunk from [~vasas]
[ https://git-wip-us.apache.org/repos/asf?p=sqoop.git;h=ad7d046 ]

SQOOP-3082: Sqoop import fails after TCP connection reset if split by datetime 
column

(Sergey Svynarchuk via Szabolcs Vasas)


> Sqoop import fails after TCP connection reset if split by datetime column
> -
>
> Key: SQOOP-3082
> URL: https://issues.apache.org/jira/browse/SQOOP-3082
> Project: Sqoop
>  Issue Type: Bug
>Affects Versions: 1.4.6
>Reporter: Sergey Svynarchuk
>Priority: Major
> Attachments: SQOOP-3082-1.patch, SQOOP-3082.patch
>
>
> If sqoop-to-mssqlserver connection reset, the whole command fails with 
> "Connection reset with com.microsoft.sqlserver.jdbc.SQLServerException: 
> Incorrect syntax near '00'" . On reestablishing connection, Sqoop tries to 
> resume import from the last record that was successfully read by :
> {code}
> 2016-12-10 15:18:54,523 INFO [main] 
> org.apache.sqoop.mapreduce.db.DBRecordReader: Executing query: select * from 
> test.dbo.test1 WITH (nolock) where Date >= '2015-01-10' and Date <= 
> '2016-11-24' and ( Date > 2015-09-18 00:00:00.0 ) AND ( Date < '2015-09-23 
> 11:48:00.0' ) 
> {code}
> Not quoted 2015-09-18 00:00:00.0 in SQL.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SQOOP-3082) Sqoop import fails after TCP connection reset if split by datetime column

2018-05-17 Thread Fero Szabo (JIRA)

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

Fero Szabo commented on SQOOP-3082:
---

Hi [~vaifer],

This came up recently again, so I had a look at your patch. I had to rebase it 
to the current version, please find this version attached.
I've tested it manually with an Integer and a Date column in the split-by 
option.

The former to ensure that it doesn't alter current behavior, the latter to 
check if the fix actually works. [^SQOOP-3082-1.patch]

*I can confirm that the current behavior of Sqoop is not altered and the patch 
fixes the issue.*

I also checked the relevant parts of the documentation of SQL Server (1, 2) and 
found that the data type precedence will ensure the correct behavior of Sqoop. 
For example, if the lastRecordValue field contains a number, it will be 
"encoded" as a String because of the apostrophes in the resulting statement, 
however, since the column's type is still INT, the INT will take precedence and 
the criteria will be evaluated correctly.
{quote}When an operator combines two expressions of different data types, the 
rules for data type precedence specify that the data type with the lower 
precedence is converted to the data type with the higher precedence. If the 
conversion is not a supported implicit conversion, an error is returned. When 
both operand expressions have the same data type, the result of the operation 
has that data type.
{quote}
(1) SQL Server 2000: 
[https://www.microsoft.com/en-us/download/details.aspx?id=51958], 
(2) current documentation: 
[https://docs.microsoft.com/en-us/sql/t-sql/data-types/data-type-precedence-transact-sql?view=sql-server-2017)
]

I believe we should get this committed now, since it adds a real value for 
sqoop users, even without tests.[
|https://docs.microsoft.com/en-us/sql/t-sql/data-types/data-type-precedence-transact-sql?view=sql-server-2017)]Since
 testing a connection reset is not a trivial issue, I've opened SQOOP-3325, to 
track the implementation of the tests.






 

> Sqoop import fails after TCP connection reset if split by datetime column
> -
>
> Key: SQOOP-3082
> URL: https://issues.apache.org/jira/browse/SQOOP-3082
> Project: Sqoop
>  Issue Type: Bug
>Affects Versions: 1.4.6
>Reporter: Sergey Svynarchuk
>Priority: Major
> Attachments: SQOOP-3082-1.patch, SQOOP-3082.patch
>
>
> If sqoop-to-mssqlserver connection reset, the whole command fails with 
> "Connection reset with com.microsoft.sqlserver.jdbc.SQLServerException: 
> Incorrect syntax near '00'" . On reestablishing connection, Sqoop tries to 
> resume import from the last record that was successfully read by :
> {code}
> 2016-12-10 15:18:54,523 INFO [main] 
> org.apache.sqoop.mapreduce.db.DBRecordReader: Executing query: select * from 
> test.dbo.test1 WITH (nolock) where Date >= '2015-01-10' and Date <= 
> '2016-11-24' and ( Date > 2015-09-18 00:00:00.0 ) AND ( Date < '2015-09-23 
> 11:48:00.0' ) 
> {code}
> Not quoted 2015-09-18 00:00:00.0 in SQL.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SQOOP-3082) Sqoop import fails after TCP connection reset if split by datetime column

2016-12-20 Thread Attila Szabo (JIRA)

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

Attila Szabo commented on SQOOP-3082:
-

Hi [~ssvinarchuk],

Many thanks for this patch! 

It's so good to see your recent activity around Sqoop, I hope you'll also like 
the community and working together with us!

To ensure your first patch will be successful, I'd like to guide you through 
your very first Sqoop patch, thus I'd like to attach a few questions + 
suggestions to your changes

As a first step: could you please create a review ticket for your patch on the 
reviews.apache.org review board? (if you need any guidance there please feel 
free to raise your questions to me)

Thanks,
[~maugli]


> Sqoop import fails after TCP connection reset if split by datetime column
> -
>
> Key: SQOOP-3082
> URL: https://issues.apache.org/jira/browse/SQOOP-3082
> Project: Sqoop
>  Issue Type: Bug
>Affects Versions: 1.4.6
>Reporter: Sergey Svinarchuk
> Attachments: SQOOP-3082.patch
>
>
> If sqoop-to-mssqlserver connection reset, the whole command fails with 
> "Connection reset with com.microsoft.sqlserver.jdbc.SQLServerException: 
> Incorrect syntax near '00'" . On reestablishing connection, Sqoop tries to 
> resume import from the last record that was successfully read by :
> {code}
> 2016-12-10 15:18:54,523 INFO [main] 
> org.apache.sqoop.mapreduce.db.DBRecordReader: Executing query: select * from 
> test.dbo.test1 WITH (nolock) where Date >= '2015-01-10' and Date <= 
> '2016-11-24' and ( Date > 2015-09-18 00:00:00.0 ) AND ( Date < '2015-09-23 
> 11:48:00.0' ) 
> {code}
> Not quoted 2015-09-18 00:00:00.0 in SQL.



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