You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by ka...@apache.org on 2015/09/02 00:03:57 UTC
[1/3] storm git commit: STORM-994 Close download clients and channels
to avoid resource leaks
Repository: storm
Updated Branches:
refs/heads/master 1cfbedfba -> c559f421a
STORM-994 Close download clients and channels to avoid resource leaks
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/f2e3ea0e
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/f2e3ea0e
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/f2e3ea0e
Branch: refs/heads/master
Commit: f2e3ea0eb411547802cc87a95a9b4a8f56cd9d10
Parents: 528958c
Author: fmazoyer <fr...@altran.com>
Authored: Tue Aug 25 14:57:59 2015 +0200
Committer: fmazoyer <fr...@altran.com>
Committed: Tue Aug 25 14:57:59 2015 +0200
----------------------------------------------------------------------
.../src/jvm/backtype/storm/utils/Utils.java | 27 ++++++++++++++------
1 file changed, 19 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/f2e3ea0e/storm-core/src/jvm/backtype/storm/utils/Utils.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/utils/Utils.java b/storm-core/src/jvm/backtype/storm/utils/Utils.java
index 7d9d73c..4cc6d11 100644
--- a/storm-core/src/jvm/backtype/storm/utils/Utils.java
+++ b/storm-core/src/jvm/backtype/storm/utils/Utils.java
@@ -359,23 +359,34 @@ public class Utils {
public static void downloadFromMaster(Map conf, String file, String localFile) throws AuthorizationException, IOException, TException {
NimbusClient client = NimbusClient.getConfiguredClient(conf);
- download(client, file, localFile);
+ try {
+ download(client, file, localFile);
+ } finally {
+ client.close();
+ }
}
public static void downloadFromHost(Map conf, String file, String localFile, String host, int port) throws IOException, TException, AuthorizationException {
NimbusClient client = new NimbusClient (conf, host, port, null);
- download(client, file, localFile);
+ try {
+ download(client, file, localFile);
+ } finally {
+ client.close();
+ }
}
private static void download(NimbusClient client, String file, String localFile) throws IOException, TException, AuthorizationException {
- String id = client.getClient().beginFileDownload(file);
WritableByteChannel out = Channels.newChannel(new FileOutputStream(localFile));
- while(true) {
- ByteBuffer chunk = client.getClient().downloadChunk(id);
- int written = out.write(chunk);
- if(written==0) break;
+ try {
+ String id = client.getClient().beginFileDownload(file);
+ while(true) {
+ ByteBuffer chunk = client.getClient().downloadChunk(id);
+ int written = out.write(chunk);
+ if(written==0) break;
+ }
+ } finally {
+ out.close();
}
- out.close();
}
public static IFn loadClojureFn(String namespace, String name) {
[3/3] storm git commit: add STORM-994 to CHANGELOG.md
Posted by ka...@apache.org.
add STORM-994 to CHANGELOG.md
* also add Frantz Mazoyer to contributor list
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/c559f421
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/c559f421
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/c559f421
Branch: refs/heads/master
Commit: c559f421a57d4494d6b46e848c84b8b844281b7f
Parents: 394cbcf
Author: Jungtaek Lim <ka...@gmail.com>
Authored: Wed Sep 2 06:50:41 2015 +0900
Committer: Jungtaek Lim <ka...@gmail.com>
Committed: Wed Sep 2 06:50:41 2015 +0900
----------------------------------------------------------------------
CHANGELOG.md | 1 +
README.markdown | 1 +
2 files changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/c559f421/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0508ad7..4456564 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -47,6 +47,7 @@
* STORM-949: On the topology summary UI page, last shown error should have the time and date
## 0.10.0-beta2
+ * STORM-994: Connection leak between nimbus and supervisors
* STORM-1001: Undefined STORM_EXT_CLASSPATH adds '::' to classpath of workers
* STORM-977: Incorrect signal (-9) when as-user is true
* STORM-843: [storm-redis] Add Javadoc to storm-redis
http://git-wip-us.apache.org/repos/asf/storm/blob/c559f421/README.markdown
----------------------------------------------------------------------
diff --git a/README.markdown b/README.markdown
index 3af0cff..6521f4a 100644
--- a/README.markdown
+++ b/README.markdown
@@ -221,6 +221,7 @@ under the License.
* Alex Panov ([@alexpanov](https://github.com/alexpanov))
* Sanket Reddy ([@redsanket](https://github.com/redsanket))
* Drew Robb ([@drewrobb](https://github.com/drewrobb))
+* Frantz Mazoyer ([@fmazoyer](https://github.com/fmazoyer))
## Acknowledgements
[2/3] storm git commit: Merge branch 'STORM-994' of
https://github.com/fmazoyer/storm into STORM-994
Posted by ka...@apache.org.
Merge branch 'STORM-994' of https://github.com/fmazoyer/storm into STORM-994
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/394cbcf7
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/394cbcf7
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/394cbcf7
Branch: refs/heads/master
Commit: 394cbcf7be5be90f33561ca59c4932d4f4db3bf6
Parents: 1cfbedf f2e3ea0
Author: Jungtaek Lim <ka...@gmail.com>
Authored: Wed Sep 2 06:49:12 2015 +0900
Committer: Jungtaek Lim <ka...@gmail.com>
Committed: Wed Sep 2 06:49:12 2015 +0900
----------------------------------------------------------------------
.../src/jvm/backtype/storm/utils/Utils.java | 27 ++++++++++++++------
1 file changed, 19 insertions(+), 8 deletions(-)
----------------------------------------------------------------------