为什么80%的码农都做不了架构师?>>>
本地运行Tachyon
单机运行 Tachyon 在一台机器上.
这部分的先决条件数已经安装Java(JDK 6 或者以上版本)
下载Tachyon 0.7.1二进制发行版本:
$ wget https://github.com/amplab/tachyon/releases/download/v0.7.1/tachyon-0.7.1-bin.tar.gz
$ tar xvfz tachyon-0.7.1-bin.tar.gz
$ cd tachyon-0.7.1
在执行Tachyon运行脚本之前, 不可缺少的环境变量必须在conf/tachyon-env.sh中指定,这应该包括模板文件的创建:
$ cp conf/tachyon-env.sh.template conf/tachyon-env.sh
独立模式的运行, 确保: * TACHYON_UNDERFS_ADDRESS
在 conf/tachyon-env.sh
的本地文件系统中设置临时目录(e.g., export TACHYON_UNDERFS_ADDRESS=/tmp
). * 远程登录服务是打开的从而SSH本地主机会成功。
然后,你需要格式化Tachyon文件系统启动它。注意:自从Tachyon需要设置 RAMfs以来,基于LInux的用户启动本地系统需要用户输入他们的root 密码
$ ./bin/tachyon format
$ ./bin/tachyon-start.sh local
为了验证Tachyon正在运行,你可以访问 http://localhost:19999, 或者查看日志中 logs 文件夹中。你也可以运行一个示例程序:
$ ./bin/tachyon runTest Basic CACHE_THROUGH
对于第一个示例程序,你应该能够看到类似如下:
/Basic_File_CACHE_THROUGH has been removed
2014-02-02 09:32:02,760 INFO (TachyonFS.java:connect) - Trying to connect master @ localhost/127.0.0.1:19998
2014-02-02 09:32:02,791 INFO (MasterClient.java:getUserId) - User registered at the master localhost/127.0.0.1:19998 got UserId 10
2014-02-02 09:32:02,792 INFO (TachyonFS.java:connect) - Trying to get local worker host : hy-ubuntu
2014-02-02 09:32:02,800 INFO (TachyonFS.java:connect) - Connecting local worker @ hy-ubuntu/127.0.1.1:29998
2014-02-02 09:32:02,819 INFO (CommonUtils.java:printTimeTakenMs) - createFile with fileId 18 took 60 ms.
2014-02-02 09:32:03,194 INFO (TachyonFS.java:createAndGetUserTempFolder) - Folder /mnt/ramdisk/tachyonworker/users/10 was created!
2014-02-02 09:32:03,198 INFO (BlockOutStream.java:<init>) - /mnt/ramdisk/tachyonworker/users/10/19327352832 was created!
Passed the test!
运行一个全面检查:
$ ./bin/tachyon runTests
你可以在任何时候停止Tachyon通过运行:
$ ./bin/tachyon-stop.sh