Fork me on GitHub

Sunday, April 7, 2013

Fix "Cannot initialize native Snappy library. Compression on new tables will be disabled." with DSC Cassandra 1.2.3 under OS X with Java 1.7

When setting up an OS X 10.8.3 development machine that was already updated to the latest Java 1.7 SDK, I got the following error when starting up DataStax Community Edition Cassandra 1.2.3:

 java.lang.reflect.InvocationTargetException  
 Googling the error brought me to:   
 To quickly fix the issue, from $CASSADRA_HOME:  
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)  
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  
  at java.lang.reflect.Method.invoke(Method.java:601)  
  at org.xerial.snappy.SnappyLoader.loadNativeLibrary(SnappyLoader.java:317)  
  at org.xerial.snappy.SnappyLoader.load(SnappyLoader.java:219)  
  at org.xerial.snappy.Snappy.(Snappy.java:44)  
  at org.apache.cassandra.io.compress.SnappyCompressor.create(SnappyCompressor.java:45)  
  at org.apache.cassandra.io.compress.SnappyCompressor.isAvailable(SnappyCompressor.java:55)  
  at org.apache.cassandra.io.compress.SnappyCompressor.(SnappyCompressor.java:37)  
  at org.apache.cassandra.config.CFMetaData.(CFMetaData.java:82)  
  at org.apache.cassandra.config.KSMetaData.systemKeyspace(KSMetaData.java:81)  
  at org.apache.cassandra.config.DatabaseDescriptor.loadYaml(DatabaseDescriptor.java:476)  
  at org.apache.cassandra.config.DatabaseDescriptor.(DatabaseDescriptor.java:123)  
  at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:182)  
  at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:398)  
  at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:441)  
 Caused by: java.lang.UnsatisfiedLinkError: no snappyjava in java.library.path  
  at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860)  
  at java.lang.Runtime.loadLibrary0(Runtime.java:845)  
  at java.lang.System.loadLibrary(System.java:1084)  
  at org.xerial.snappy.SnappyNativeLoader.loadLibrary(SnappyNativeLoader.java:52)  
  ... 17 more  
  WARN 15:36:20,720 Cannot initialize native Snappy library. Compression on new tables will be disabled.  

Googling the error brought me to:
https://github.com/ptaoussanis/carmine/issues/5
...which nicely points out that Snappy 1.0.5 fixes the issue (DSC 1.2.3 ships with snappy-java-1.0.4.1).

To quickly fix the issue, from $CASSANDRA_HOME:

cd lib
rm snappy-java-1.0.4.1.jar
wget https://snappy-java.googlecode.com/files/snappy-java-1.0.5-M4.jar

Tuesday, December 18, 2012

AWS, Centos, Python and locust.io

I've recently started looking at http://locust.io/ for some distributed load testing. http://gatling-tool.org/ was very tempting, but a python-based framework has some inherent benefits in the current test environment.

At any rate, our AWS hosts are mostly Centos 6.3, which come with the baseline Python 2.6.6

Attempting to use locust.io on these hosts with the system Python 2.6 quickly brought about:
"gc refcount related crash when loading web UI under Python 2.6.6"
https://github.com/locustio/locust/issues/49

Thankfully, getting Python 2.7.3 running as an altinstall was pretty simple and fixed this issue - here's the steps it took (you may also need other Developer related packages...):

yum install readline-devel
yum install libevent
yum install libevent-devel
yum install zlib-devel
yum install bzip2-devel
yum install openssl-devel
yum install ncurses-devel

tar xf Python-2.7.3.tar.bz2 
cd Python-2.7.3
./configure --prefix=/usr/local
make
make altinstall

easy_install-2.7 pip
pip-2.7 install -U locustio

Voila, no more gc crash when launching locust!

Tuesday, October 18, 2011

The state of Verizon HTC Thunderbolt Android ROMs - my very biased perspective

If you like HTC's Sense skin for Android, which I do, and you don't want to be months behind current phones, which I don't, you really only have a few options:


  • Run one of the leaked RUUs for the Thunderbolt that includes Gingerbread
    • This will unfortunately still leave you running Sense 2.1, back in the "dark ages" technology timeline speaking
  • Run one of the Sense 3.0 or Sense 3.5 GB-based ROMs ported to the Thunderbolt
    • Thanks to the unique nature of the 4G RIL, TeamBAMF is really the only team to have working GB Sense 3+ ROMs. If you're running a Sense 3+ ROM on your TBolt, even if it's not an official TeamBAMF release, you likely have @adrynalyne and/or @erishasnobatter to thank for it...
Now, for the goods:
  1. Grab and flash a GB radio (I prefer the actual latest from the last leak/almost-but-pulled-official release: MR3 GB radio from 2.11.605.3, 1.48.00.906w_1, 0.01.78.0906w_2) from this TeamBAMF.net thread: http://teambamf.net/showthread.php/242-Radios! you can also find separated CDMA and LTE radios at this RootzWiki thread: http://rootzwiki.com/showthread.php?2937-RADIO-HTC-Thunderbolt-Radios-PG05IMG.zip-(Updated-24-Sep-2011)
  2. Try one of these three great and stable ROMs:
    1. BAMF Forever (Currently 1.0.8) - Sense 3.0, been around the longest of the 3
    2. BAMF SoaB (Currently v1.02) - Sense 3.5, ported from a Bliss RUU, been around fairly long, lots of activity
    3. Touch my BAMF (Currently 1.0.4) - Sense 3.0, Ported from the Touch 4G Slide, claim to fame is that it is the only (that I know of) GB Sense ROM with working landscape mode!
    4. Update: TeamBAMF just doesn't stop - Touch my BAMF Remix (currently 1.0.4) was just released, I guess I know what I'm doing this evening:
If you've had a good experience with a different Thunderbolt GB ROM, please leave a comment. I haven't yet been adventurous enough to try @LayherDaddy's CyanogenMod not-quite-official releases (e.g. http://rootzwiki.com/showthread.php?392-ROM-Not-fully-Official-CM7-for-Thunderbolt.-7.1.1-Updated-10-2-1-25AM-EST )

Happy ROM-ing!

Monday, June 20, 2011

Billerica state rep. hopes to bring bike plan back - Update: Looks like it won't happen =(

Billerica state rep. hopes to bring bike plan back - Billerica, MA - Billerica Minuteman: "State Rep. Marc Lombardo, R-Billerica, is hoping to take a plan for a town-wide bike path connecting to Bedford’s off the shelf.

Lombardo, who served as a liaison to the town’s Bike Path Committee when he was on the Board of Selectmen, said he was riding the path in Bedford when the idea came to bring Billerica’s plan back to life.

“It’s been tried before a decade ago,” said Lombardo. “A committee worked on it. They made some progress and at some point it fell off the table.”"

State Rep. Marc Lombardo: PLEASE make this happen - You'll win over a lot of Billerica bikers!


Update - 10/18/2011 - Noooo!:
http://billericatownienews.com/gagliardi-and-lombardo-clash-over-bike-path-plan-p3065-107.htm
The second session of Billerica Town Meeting descended into series contentious debates over spending after members voted down a proposal made by state Rep. Marc Lombardo to appropriate $125,000 to begin the design and construction of a bike path.


Update 2 - 10/19/2011 - Maybe?:
http://www.wickedlocal.com/billerica/news/x597438160/New-committee-to-secure-land-for-Billerica-bike-path

Following the defeat at Town Meeting of an article to secure design funding for the Yankee Doodle Bike Path, selectmen approved the formation of a new Bike Path Committee.

Proposed by Selectman Dave Gagliardi, at the board’s meeting on Monday, Oct. 17, the new committee would consist of five members-one selectman and four residents. State Rep. Marc Lombardo, who put forth the article for the funding, would be invited to join as an ex-oficio member. Lombardo was the selectman liaison to the original committee, which has been dissolved. Lombardo could not be reached for comment.


The committee would be tasked with securing the land for the path, and would report to selectmen on April 30, 2012. Members would serve a three-year term. Gagliardi said the small size was due to the fact that many other committees were vacant, and he wanted this one to move forward as soon as possible.

Thursday, February 4, 2010

Juniper (and competition) FTW!

Light Reading - Optical Networking - Juniper Upgrades the Core - Telecom News Analysis:
"Juniper Networks Inc. (Nasdaq: JNPR) came out today saying it's upgrading its T series to 250 Gbit/s per slot.

That appears to be a pre-emptive strike against Cisco Systems Inc. (Nasdaq: CSCO), which is said to be readying an announcement involving per-slot capacity of 120 Gbit/s. Cisco's plan could involve an upgrade to the CRS-1, rather than a wholly new box. (See Rumor: Cisco Prepping CRS-1 Successor.)"

It's great to see that the carrier-class (not to mention edge) router wars are still alive and well!