SaddleはハイパフォーマンスなScala向けデータ操作ライブラリ。
Saddleでは以下の様なデータ形式や性質をもたらす。
- array-backed
- Indexed
- 1次元または2次元データ構造
- ベクトル計算
package com.sgykfjsm.app | |
import org.scalatra._ | |
import scalate.ScalateSupport | |
class MyFirstScalatraServlet extends ScalatraTestStack { | |
get("/") { | |
contentType="text/html" | |
<html> |
# before install | |
# http://docs.fluentd.org/articles/before-install | |
sudo cp -p /etc/security/limits.conf /etc/security/limits.conf.$(date +%Y%m%d%H%M%S) | |
sudo cp -p /etc/sysctl.conf /etc/sysctl.conf.$(date +%Y%m%d%H%M%S) | |
sudo cat <<CONTENTS | sudo tee -a /etc/security/limits.conf > /dev/null | |
# for td-agent | |
root soft nofile 65536 | |
root hard nofile 65536 | |
* soft nofile 65536 |
#!/bin/bash | |
# ssh setting | |
su - vagrant -c ' | |
mkdir -p ${HOME}/.ssh | |
## for more secure | |
## after VMs start, distribute each id_push.pub to other VMs | |
# ssh-keygen -t rsa -q -P "" -f ~/.ssh/id_dsa | |
## sandbox setting |
#!/bin/bash | |
# mesos setting | |
user=`whoami` | |
slaves=(slave1 slave2) | |
mesos_config_dir=/etc/default | |
mesos_config_files=(${mesos_config_dir}/mesos \ | |
${mesos_config_dir}/mesos-master \ | |
${mesos_config_dir}/mesos-slave \ | |
/usr/local/var/mesos/deploy/slave.lst \ |
<?xml version="1.0"?> | |
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> | |
<configuration> | |
<property> | |
<name>fs.defaultFS</name> | |
<value>hdfs://master1:8020/</value> | |
</property> | |
<property> | |
<name>hadoop.tmp.dir</name> |
<?xml version="1.0"?> | |
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> | |
<configuration> | |
<property> | |
<name>dfs.name.dir</name> | |
<value>/var/lib/hadoop-hdfs/cache/hdfs/dfs/name</value> | |
</property> | |
<property> | |
<name>dfs.permissions.superusergroup</name> |
<?xml version="1.0"?> | |
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> | |
<configuration> | |
<property> | |
<name>mapred.job.tracker</name> | |
<value>master1:8021</value> | |
</property> | |
<property> | |
<name>mapred.local.dir</name> |
#!/bin/bash | |
sudo -u mapred -g hadoop \ | |
env JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64 \ | |
HADOOP_HOME=`pwd`/hadoop-2.0.0-mr1-cdh4.2.1 \ | |
HADOOP_CONF_DIR=/etc/hadoop/conf \ | |
JAVA_LIBRARY_PATH=/usr/local/lib/ \ | |
`pwd`/hadoop-2.0.0-mr1-cdh4.2.1/bin/hadoop jobtracker |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "precise" | |
config.vm.box_url = "/Users/sgyk/local/vagrant/box/precise-server-cloudimg-amd64-vagrant-disk1.box" | |
config.cache.auto_detect = true |