Review Board 1.7.22


SQOOP-677 Destroyer needs to be called from OutputCommitter

Review Request #8091 - Created Nov. 16, 2012 and submitted

Jarek Cecho
SQOOP-677
Reviewers
Sqoop
sqoop-sqoop2
I've implemented calling Destroyer from job's OutputComitter.
Unit tests seems to be passing and I've tested it on real cluster.
connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcExportDestroyer.java
Revision 7f952ac43838c8cc21d7ac117d50531dd7321a51 New Change
[20] 14 lines
[+20]
15
 * See the License for the specific language governing permissions and
15
 * See the License for the specific language governing permissions and
16
 * limitations under the License.
16
 * limitations under the License.
17
 */
17
 */
18
package org.apache.sqoop.connector.jdbc;
18
package org.apache.sqoop.connector.jdbc;
19

    
   
19

   

    
   
20
import org.apache.log4j.Logger;
20
import org.apache.sqoop.common.ImmutableContext;
21
import org.apache.sqoop.common.ImmutableContext;
21
import org.apache.sqoop.job.etl.Destroyer;
22
import org.apache.sqoop.job.etl.Destroyer;
22

    
   
23

   
23
public class GenericJdbcExportDestroyer extends Destroyer {
24
public class GenericJdbcExportDestroyer extends Destroyer {
24

    
   
25

   

    
   
26
  private static final Logger LOG = Logger.getLogger(GenericJdbcExportDestroyer.class);

    
   
27

   
25
  @Override
28
  @Override
26
  public void run(ImmutableContext context) {
29
  public void destroy(boolean success, ImmutableContext context, Object connectionConfig, Object jobConfig) {
27
    // TODO Auto-generated method stub
30
    LOG.info("Running generic JDBC connector destroyer");
28
  }
31
  }
29

    
   

   
30
}
32
}
connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcImportDestroyer.java
Revision a53fa595007c5f3b3bb3bd053a6171658f3cc294 New Change
 
core/src/main/java/org/apache/sqoop/framework/FrameworkManager.java
Revision c9c9cf4deb59994da8ebf7937e5f17521fbd8102 New Change
 
execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopDestroyerExecutor.java
New File
 
execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopFileOutputFormat.java
Revision c465f10113b8c1170336bb41ba2ad7244c58ede4 New Change
 
execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopNullOutputFormat.java
Revision 1242f90c8de4f267509592abf15195085151bab2 New Change
 
spi/src/main/java/org/apache/sqoop/job/etl/Destroyer.java
Revision c8dc7c3d185c1d67f1c1292678c26e62855cc714 New Change
 
  1. connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcExportDestroyer.java: Loading...
  2. connector/connector-generic-jdbc/src/main/java/org/apache/sqoop/connector/jdbc/GenericJdbcImportDestroyer.java: Loading...
  3. core/src/main/java/org/apache/sqoop/framework/FrameworkManager.java: Loading...
  4. execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopDestroyerExecutor.java: Loading...
  5. execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopFileOutputFormat.java: Loading...
  6. execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopNullOutputFormat.java: Loading...
  7. spi/src/main/java/org/apache/sqoop/job/etl/Destroyer.java: Loading...