Review Board 1.7.22


SQOOP-852 Sqoop2: Mapreduce submission engine is not closing opened JobClient object

Review Request #9107 - Created Jan. 25, 2013 and submitted

Jarek Cecho
SQOOP-852
Reviewers
Sqoop
sqoop-sqoop2
I've added explicit close() call to shutdown hook.
Unit tests seems to be passing and I've tested it on real cluster (no issues found).
submission/mapreduce/src/main/java/org/apache/sqoop/submission/mapreduce/MapreduceSubmissionEngine.java
Revision 1a144d09b3368f9ca1ad11c0be52614c0dcf928d New Change
[20] 112 lines
[+20] [+] public boolean accept(File dir, String name) {
113
   * {@inheritDoc}
113
   * {@inheritDoc}
114
   */
114
   */
115
  @Override
115
  @Override
116
  public void destroy() {
116
  public void destroy() {
117
    LOG.info("Destroying Mapreduce Submission Engine");
117
    LOG.info("Destroying Mapreduce Submission Engine");

    
   
118

   

    
   
119
    // Closing job client

    
   
120
    try {

    
   
121
      jobClient.close();

    
   
122
    } catch (IOException e) {

    
   
123
      throw new SqoopException(MapreduceSubmissionError.MAPREDUCE_0005, e);

    
   
124
    }
118
  }
125
  }
119

    
   
126

   
120
  /**
127
  /**
121
   * {@inheritDoc}
128
   * {@inheritDoc}
122
   */
129
   */
[+20] [20] 266 lines
submission/mapreduce/src/main/java/org/apache/sqoop/submission/mapreduce/MapreduceSubmissionError.java
Revision 9296717b1e2d7479ff542c9fb500660b23fc3e61 New Change
 
  1. submission/mapreduce/src/main/java/org/apache/sqoop/submission/mapreduce/MapreduceSubmissionEngine.java: Loading...
  2. submission/mapreduce/src/main/java/org/apache/sqoop/submission/mapreduce/MapreduceSubmissionError.java: Loading...