title: The error of sstableloader
body: <p>I try to load data to a Cassandra cluster using the sstableloader.
  The sstableloader shows the following error:</p>
  
  <pre><code>Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded
          at java.nio.HeapByteBuffer.&lt;init&gt;(HeapByteBuffer.java:57)
          at java.nio.ByteBuffer.allocate(ByteBuffer.java:335)
          at org.apache.cassandra.io.compress.BufferType$1.allocate(BufferType.java:28)
          at org.apache.cassandra.io.util.RandomAccessReader.allocateBuffer(RandomAccessReader.java:69)
          at org.apache.cassandra.io.util.RandomAccessReader.&lt;init&gt;(RandomAccessReader.java:62)
          at org.apache.cassandra.io.util.RandomAccessReader.open(RandomAccessReader.java:103)
          at org.apache.cassandra.io.util.RandomAccessReader.open(RandomAccessReader.java:92)
          at org.apache.cassandra.io.util.RandomAccessReader.open(RandomAccessReader.java:87)
          at org.apache.cassandra.io.util.BufferedSegmentedFile.getSegment(BufferedSegmentedFile.java:60)
          at org.apache.cassandra.io.util.SegmentedFile$SegmentIterator.next(SegmentedFile.java:271)
          at org.apache.cassandra.io.util.SegmentedFile$SegmentIterator.next(SegmentedFile.java:252)
          at org.apache.cassandra.io.sstable.format.big.BigTableReader.getPosition(BigTableReader.java:184)
          at org.apache.cassandra.io.sstable.format.SSTableReader.getPosition(SSTableReader.java:1558)
          at org.apache.cassandra.io.sstable.format.SSTableReader.getPositionsForRanges(SSTableReader.java:1489)
          at org.apache.cassandra.io.sstable.SSTableLoader$1.accept(SSTableLoader.java:128)
          at java.io.File.list(File.java:1161)
          at org.apache.cassandra.io.sstable.SSTableLoader.openSSTables(SSTableLoader.java:79)
          at org.apache.cassandra.io.sstable.SSTableLoader.stream(SSTableLoader.java:161)
          at org.apache.cassandra.tools.BulkLoader.main(BulkLoader.java:97)
  </code></pre>
  
  <p>If i understand the situation It needs to increase MAX_HEAP_SIZE. How can I do it for sstableloader?</p>
  
  <p>It sounds not very optimistic - "/usr/bin/sstableloader still has a hard coded -Mx256M that can't be easily overridden". <a href="https://issues.apache.org/jira/browse/CASSANDRA-7385" rel="nofollow">https://issues.apache.org/jira/browse/CASSANDRA-7385</a></p>
  
  <p>Thanks.</p>
  
  <p>I edited bin/sstableloader to set MAX_HEAP_SIZE="16GB". After it sstatableloader works.</p>