You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by Raphael Hsieh <ra...@gmail.com> on 2014/10/09 20:46:15 UTC

Using Nimbus API gives Java heap space error

I discovered a tutorial here:
http://www.andys-sundaypink.com/i/retrieve-storm-cluster-statistic-from-nimbus-java-mode/
describing how to use Apache Thrift in order to retrieve Storm Cluster
statistics from the Nimbus host.
When I tried to run my code in a test, I keep getting an error:
    Java heap space
    java.lang.OutOfMemoryError: Java heap space

Upon doing further research, I came across this thread:
https://groups.google.com/forum/#!topic/storm-user/66PFsYLLTvI

Where Nathan Marz said that this is due to a Thrift issue, where you
shouldn't send a malformed request to Thrift.

Can someone explain to me what might be wrong with my request?
I've pretty much followed the tutorial to the letter, inputting my hosts
and available port.

-- 
Raphael Hsieh

Re: Using Nimbus API gives Java heap space error

Posted by John Reilly <jr...@inconspicuous.org>.
I'm not sure what your issue is except that it seems that you are running
out of heap space....in case it is useful here is the code I use (in
scala).


def getTopologySummary(topoName: String): Option[TopologySummary] = {
    val nimbusClient =
backtype.storm.utils.NimbusClient.getConfiguredClient(backtype.storm.utilsUtils.readStormConfig())

nimbusClient.getClient.getClusterInfo.get_topologies.asScala.filter(_.get_name
== topoName).headOption
}

Cheers,
John


On Thu, Oct 9, 2014 at 11:46 AM, Raphael Hsieh <ra...@gmail.com> wrote:

> I discovered a tutorial here:
> http://www.andys-sundaypink.com/i/retrieve-storm-cluster-statistic-from-nimbus-java-mode/
> describing how to use Apache Thrift in order to retrieve Storm Cluster
> statistics from the Nimbus host.
> When I tried to run my code in a test, I keep getting an error:
>     Java heap space
>     java.lang.OutOfMemoryError: Java heap space
>
> Upon doing further research, I came across this thread:
> https://groups.google.com/forum/#!topic/storm-user/66PFsYLLTvI
>
> Where Nathan Marz said that this is due to a Thrift issue, where you
> shouldn't send a malformed request to Thrift.
>
> Can someone explain to me what might be wrong with my request?
> I've pretty much followed the tutorial to the letter, inputting my hosts
> and available port.
>
> --
> Raphael Hsieh
>
>
>