out-of-memory

64 bit system, 8gb of ram, a bit more than 800MB of CSV and reading with python gives memory error

主宰稳场 提交于 2019-12-24 13:28:44
问题 f = open("data.csv") f.seek(0) f_reader = csv.reader(f) raw_data = np.array(list(islice(f_reader,0,10000000)),dtype = int) The above is the code I am using to read a csv file. The csv file is only about 800 MB and I am using a 64 bit system with 8GB of Ram. The file contains 100 million lines. However,not to mention to read the entire file, even reading the first 10 million lines gives me a 'MemoryError:" <- this is really the entire error message. Could someone tell me why please? Also as a

Are there any good examples to references where setBuildParseTree = false?

雨燕双飞 提交于 2019-12-24 13:27:38
问题 I'm using an antlr for a simple CSV parser. I'd like to use it on a 29gig file, but it runs out of memory on the ANTLRInputStream call: CharStream cs = new ANTLRInputStream(new BufferedInputStream(input,8192)); CSVLexer lexer = new CSVLexer(cs); CommonTokenStream tokens = new CommonTokenStream(lexer); CSVParser parser = new CSVParser(tokens); ParseTree tree = parser.file(); ParseTreeWalker walker = new ParseTreeWalker(); walker.walk(myListener, tree); I tried to change it to be an unbuffered

Java Heap Space error from command line

拈花ヽ惹草 提交于 2019-12-24 12:34:18
问题 I have tried to create a small utility which reads excel and sends email. I am using ApachePOI library for that. When I executed the code from eclipse, initially I got java.lang.OutOfMemoryError: GC overhead limit exceeded error. Then I added -Xms1024m in the VM Arguments of eclipse and program worked fine in eclipse. Then I exported the set of java programs and libraries into RunnableJar and bundled the dependent libraries. Now from command line when i execute the command java -Xms1024m -jar

Java: OutOfMemoryError when trying to open a 174KB sound file with clip.open()

倾然丶 夕夏残阳落幕 提交于 2019-12-24 12:01:36
问题 I'm simply trying to play a sound clip using the javax.sound.sampled library, using the most basic example I found in the documentation. I've seen a few dozen examples coded exactly this way and they all seem to work, the file is only 174KB so it's not like I'm trying to play an entire concert: public static void main(String[] args) throws UnsupportedAudioFileException, IOException, LineUnavailableException { // TODO Auto-generated method stub Clip clip; AudioInputStream sound = AudioSystem

Out of memory issue for Hadoop copyFromLocal

笑着哭i 提交于 2019-12-24 11:45:00
问题 I'm trying to copy a directory that contains 1,048,578 files into hdfs file system but, got below error: Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2367) at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:130) at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:114) at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:415) at java.lang.StringBuffer

java.lang.OutOfMemoryError : Java heap space

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 09:57:12
问题 I was playing with some examples of Collections from Oracle website public class Timing { public static void method(){ List numbers = new ArrayList(); for (double i = 1; i <= Double.MAX_VALUE; i++) numbers.add(new Double(i)); Collections.shuffle(numbers); List winningcombination = numbers.subList(0, 10); Collections.sort(winningcombination); } public static void main(String[] args) { long start = System.currentTimeMillis(); method(); long end = System.currentTimeMillis(); System.out.println(

OutOfMemory Error in Custom ListView Adapter [Mono Android]

痴心易碎 提交于 2019-12-24 08:49:27
问题 Hello Stack Overflow Android Users, Please help with the following question: Problem I'm writing an a feature for an app that lists species of fish. I'm using a custom ListView Adapter class (let's call this FishSpeciesListAdapter) for the adapter. I have 27 fish species recorded as a default for the program as for now (you will eventually be able to add some yourself as well). The problem is that when I link the adapter to the actual listview xml object and scroll down the list, after a

Out of memory: Heap Size Error after adding 10KB ImageButtons

試著忘記壹切 提交于 2019-12-24 08:49:20
问题 I am working in Eclipse on an android app which starts with a splash screen (suspecting Memory Leak here after some research done). The splash screen goes into the main menu consisting of just 7 buttons which lead to some Java Applet. The whole app was working perfectly until I changed the 7 dummy (ImageButton) png images to the finalized 7 png images. These png images have an average of 10KB and don't think they are the cause of the problem (since they're this small), even though this

Eclipse's .ini settings don't seem to be helping me change the max heap size

只谈情不闲聊 提交于 2019-12-24 06:45:44
问题 Here is my eclipse.ini file: -startup plugins/org.eclipse.equinox.launcher_1.0.200.v20090520.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519 -product org.eclipse.epp.package.java.product --launcher.XXMaxPermSize 256M -showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m -vmargs -Dosgi.requiredJavaVersion=1.5 -Xms40m -Xmx256m Default stuff. However, I have an app that appears to be crashing with 64 mb of heap size. I'm printing out the

Spark Job error GC overhead limit exceeded [duplicate]

假如想象 提交于 2019-12-24 06:11:33
问题 This question already has answers here : Error java.lang.OutOfMemoryError: GC overhead limit exceeded (19 answers) Closed 3 years ago . I am running a spark job and I am setting the following configurations in the spark-defaults.sh. I have the following changes in the name node. I have 1 data node. And I am working on data of 2GB. spark.master spark://master:7077 spark.executor.memory 5g spark.eventLog.enabled true spark.eventLog.dir hdfs://namenode:8021/directory spark.serializer org.apache