Review Board 1.7.22


SQOOP-765 Sqoop2: JDBC repository is incorrectly checking if job exists in update handler

Review Request #8555 - Created Dec. 12, 2012 and submitted

Jarek Cecho
SQOOP-765
Reviewers
Sqoop
sqoop-sqoop2
I've fixed incorrect method call.

 
core/src/main/java/org/apache/sqoop/repository/JdbcRepository.java
Revision 6dc8baa New Change
[20] 272 lines
[+20] [+] public void updateJob(final MJob job) {
273
      @Override
273
      @Override
274
      public Object doIt(Connection conn) {
274
      public Object doIt(Connection conn) {
275
       if(!job.hasPersistenceId()) {
275
       if(!job.hasPersistenceId()) {
276
          throw new SqoopException(RepositoryError.JDBCREPO_0019);
276
          throw new SqoopException(RepositoryError.JDBCREPO_0019);
277
        }
277
        }
278
        if(!handler.existsConnection(job.getPersistenceId(), conn)) {
278
        if(!handler.existsJob(job.getPersistenceId(), conn)) {
279
          throw new SqoopException(RepositoryError.JDBCREPO_0020,
279
          throw new SqoopException(RepositoryError.JDBCREPO_0020,
280
            "Invalid id: " + job.getPersistenceId());
280
            "Invalid id: " + job.getPersistenceId());
281
        }
281
        }
282

    
   
282

   
283
        handler.updateJob(job, conn);
283
        handler.updateJob(job, conn);
[+20] [20] 140 lines
  1. core/src/main/java/org/apache/sqoop/repository/JdbcRepository.java: Loading...