Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I have a thread dump. Now, I want to know how many threads are running, what is their run time, what is its current state.
I don't want to use third party tools. I need a java code which takes dump file as input and shows the o/p.The main purpose is to find how long the threads were waiting.I want to find the threads with longest wait time!!
Use jvisualvm.It comes with your JDK.
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
I am getting "Java Heap Space" error when importing csv data in neo4j database.
I have configured following configuration in neo4j.conf.
dbms.memory.heap.initial_size=4g
dbms.memory.heap.max_size=8g
dbms.memory.pagecache.size=4g
which discribed at
http://neo4j.com/docs/operations-manual/current/performance/#_configuring_heap_size_and_garbage_collection
but that not resolve the issue.
following is my screen
enter image description here
You'll want to take a look at using PERIODIC COMMIT when loading, or by using the import tool.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
The question I asked was marked as too broad. After searching around more I got my basics more clear. So hopefully I will be much more specific now.
Basically I was trying to run the sample examples given on eclipse rather than on terminal. My first doubt has already been answered correctly. Using setMaster("local"). I got the example running n it displayed output quite correctly. Now if I change this to setMaster("yarn-client") now it connects to yarn, also submits the job then runs it but finally I get classnotfoundexception and hence reduce not completed. If I want to use yarn-client do I need to add some extra specification for my class so that I don't get classnotfoundexception. For this entire process I used the inbuilt JavaPiSpark example program in my version of spark. Any help or suggestion is welcome.
You should use JavaSparkContext .setMaster("local") to run on your local machine or replace the "local" with a specific master URL to run on clusters.
Please refer spark programming guide - initializing-spark and master-urls
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
In my application I need to make use of multiple threads to make it work faster but I have been facing a situation where it says that unable to create native threads.
I have read that it is the RAM which decides the number of the threads a program can have which depends on the number of threads*stack size for each thread.
How do we know the stack size for a thread in Java? Can I decide stack size for thread on my own?
The number of native threads you can create depends on the OS. It's rather the OS that stops you from going to such a huge number, not the memory size.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I am busy doing some research and I need to do a comparison between two methods of system monitoring. I have to compare the total memory of overhead and computation required when queries are made to an external software package (i.e one that I did not create but running on the same system) as well the overhead in my software package (written in JAVA) when including all the libraries and making all the queries.
Does anyone have any suggestions on how I can approach this task to achieve these goals? Are there any general profiling solutions available that just "plug" into your system monitor and retrieve the system statistics this way? Or just a pointer in the right direction would be more than helpful right now as I am completely stuck :/
Thanks in advance.
You can use VisualVM (For sure in Windows, but don't know about Linux) (or) You can write a simple program using JMX API.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want a program to get information about RAM
How can i do that?
There's a couple of memory-related methods in the Runtime class, but note that they only give information about the amount of memory available to (or used by) the JVM, not the hardware it runs on.
Generally, Java is the wrong language to do this kind of thing, since it requires access to OS APIs that Java does not provide.
Most of the information you need will be contained in the Runtime class. Have a look at the link. It should be straightforward. If you run into problems with it, I will try to help you out further.