sqoop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SQOOP-2356) Sqoop2: Derby upgrade should automatically rename jobs that have conflicting names
Date Fri, 15 May 2015 08:49:59 GMT

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

Hudson commented on SQOOP-2356:
-------------------------------

SUCCESS: Integrated in Sqoop2-hadoop200 #846 (See [https://builds.apache.org/job/Sqoop2-hadoop200/846/])
SQOOP-2356: Sqoop2: Derby upgrade should automatically rename jobs that have conflicting names
(cshapi: https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=9ee44d4f0a5a4601cd2fd81885b44ba08e6debfd)
* repository/repository-common/src/main/java/org/apache/sqoop/repository/common/CommonRepoUtils.java
* repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/upgrade/UniqueJobRename.java
* repository/repository-common/src/main/java/org/apache/sqoop/repository/common/CommonRepositoryHandler.java
* repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbySchemaUpgradeQuery.java
* test/src/test/java/org/apache/sqoop/integration/repository/derby/upgrade/Derby1_99_3UpgradeTest.java
* repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepositoryHandler.java
* test/src/test/resources/repository/derby/derby-repository-1.99.3.tar.gz


> Sqoop2: Derby upgrade should automatically rename jobs that have conflicting names
> ----------------------------------------------------------------------------------
>
>                 Key: SQOOP-2356
>                 URL: https://issues.apache.org/jira/browse/SQOOP-2356
>             Project: Sqoop
>          Issue Type: Bug
>            Reporter: Abraham Elmahrek
>            Assignee: Abraham Elmahrek
>             Fix For: 1.99.7
>
>         Attachments: SQOOP-2356.patch, SQOOP-2356.patch, SQOOP-2356.patch, SQOOP-2356.patch,
SQOOP-2356.patch
>
>
> The following should work:
> {code}
> CREATE SEQUENCE job_renamer AS BIGINT START WITH 0;
> UPDATE SQOOP.SQ_JOB set SQB_NAME = SQB_NAME || '_' || CAST(NEXT VALUE FOR job_renamer
AS CHAR(100)) where SQB_ID IN (
> SELECT j1.SQB_ID FROM SQOOP.SQ_JOB AS j1 INNER JOIN ( SELECT SQB_NAME FROM SQOOP.SQ_JOB
GROUP BY (SQB_NAME) HAVING COUNT > 1 ) AS j2 ON j1.SQB_NAME = j2.SQB_NAME
> );
> drop SEQUENCE job_renamer RESTRICT;
> {code}



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

Mime
View raw message