Skip to content

Commit

Permalink
closing connections
Browse files Browse the repository at this point in the history
  • Loading branch information
jortiz16 committed May 26, 2015
1 parent 7da559d commit aa3b88a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
11 changes: 11 additions & 0 deletions src/edu/washington/escience/myria/operator/DbDelete.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,17 @@ protected void init(final ImmutableMap<String, Object> execEnvVars) throws DbExc
accessMethod.dropTableIfExistsCascade(relationKey);
}

@Override
public void cleanup() {
try {
if (accessMethod != null) {
accessMethod.close();
}
} catch (DbException e) {
throw new RuntimeException(e);
}
}

@Override
protected void consumeTuples(final TupleBatch tuples) throws DbException {
}
Expand Down
1 change: 1 addition & 0 deletions src/edu/washington/escience/myria/util/JsonAPIUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ public static HttpURLConnection deleteDataset(final String masterHostname, final
conn.setRequestProperty("Content-Type", type);
conn.connect();
conn.getResponseCode();
conn.disconnect();
return conn;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class DbDeleteTest extends SystemTestBase {
Schema relationSchema;

/**
* Test if the relation has been deleted from the Catalog.
* Tests if the relation has been deleted from the Catalog successfully.
*
* @throws Exception
*/
Expand All @@ -69,7 +69,8 @@ public void testDeleteRelationInCatalog() throws Exception {
}

/**
* Test if the relation has been deleted from the underlying database.
* Tests if the relation has been deleted successfully from the underlying databases on all the workers even if a
* worker does not contain the dataset to begin with.
*
* @throws Exception
*/
Expand Down

0 comments on commit aa3b88a

Please sign in to comment.