Month: November 2009

  • DataTable jQuery Plugin – JavaScript inside a table cell

    If the data source is AJAX and the cell has JavaScript, the node is created and assigned directly via nTd.innerHTML=data so any JavaScript code inside the cell won’t get executed. To correct than you need the custom fnRender for that column. fnRender: function (o) { var oTmp = document.createElement(“div”); oTmp.innerHTML = o.aData[5]; // just to…

  • Hadoop vs. MySQL

    I just play with Hadoop, HBase, Hive, Pig via Cloudera’s guide (thanks to Cloudera for bringing these packages to CentOS) for a couple days. Cloudera is going in the right direction, targeting the enterprises. Hadoop is definitely on the watch list as it matures. But right now, it’s very technical and would not be suitable…

  • Hive troubleshooting

    I am playing with Hadoop and Hive via Cloudera RPMs. The development status is very active, meaning it could be hard to track down the errors or find help with a specific one. Permission of /tmp in HDFS FAILED: Unknown exception : org.apache.hadoop.fs.permission.AccessControlException: Permission denied: user=mathie, access=WRITE, inode=”tmp”:hadoop:supergroup:rwxrwxr-x Solution: You need to turn on full…

  • haproxy vs. LVS (layer 7 vs layer 4 load balancing)

    We just deployed our first haproxy load balancer and still running several LVS-TUN load balancers. Even when advertised as a fast and lightweight, it’s comparing with other layer-7 LB, not with layer-4 LB like LVS. Load Average / CPU Usage haproxy still requires much more resource. On the same really basic server (Pentium 3/4 or…

  • Monitor LSI MegaRAID under CentOS

    Not very user friendly with documentation but I guess at least it runs! $ wget http://www.lsi.com/DistributionSystem/AssetDocument/support/downloads/megaraid/miscellaneous/linux/1.01.39_Linux_Cli.zip $ unzip 1.01.39_Linux_Cli.zip $ rpm -Uvh MegaCli-1.01.39-0.i386.rpm $ /opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -a0 Basic Monitor Script #!/bin/sh CONT=”a0″ STATUS=0 MEGACLI=/opt/MegaRAID/MegaCli/MegaCli64 echo -n “Checking RAID status on ” hostname for a in $CONT do NAME=`$MEGACLI -AdpAllInfo -$a |grep “Product Name” | cut…

  • init.d script for gearmand

    #!/bin/bash # # gearmand Startup script for the Gearman server # # chkconfig: – 85 15 # description: Gearman is a distributed job system. # processname: gearmand # config: /etc/sysconfig/gearmand # pidfile: /var/run/gearmand/gearmand.pid # ### BEGIN INIT INFO # Provides: gearmand # Required-Start: $local_fs $network # Required-Stop: $local_fs $network # Default-Start: # Default-Stop: # Short-Description:…

  • init.d script for stunnel on CentOS

    You might need to modify some settings to suite your installation. I installed from source. whereis stunnel (might need to ln -s /usr/local/bin/stunnel /usr/sbin/stunnel) vi /etc/init.d/stunnel #!/bin/bash # # stunnel This shell script takes care of starting and stopping # stunnel # # chkconfig: 345 80 30 # description: Secure tunnel # processname: stunnel #…