• Alluxio 安装与配置


    一、概述

    Alluxio, formerly Tachyon, enables any application to interact with any data from any storage system at memory speed.
    From http://www.alluxio.org/

    Alluxio,原名为 Tachyon,使任何应用以内存级速度进行文件系统上的数据交换。

    二、安装与配置

    2.1 解压

    tar -xzf alluxio-1.4.0-bin.tar.gz
    cd alluxio-1.4.0

    2.2 配置

    从模板文件中创建 conf/alluxio-env.sh ,也可通过命令配置:

    ./bin/alluxio bootstrapConf localhost

    三、运行

    3.1 单机启动 Alluxio

    3.1.1 格式化

    格式化 Alluxio 为启动 Alluxio 做准备。如下命令会格式化Alluxio的日志和worker存储目录,以便接下来启动master和worker。

    ./bin/alluxio format

    3.1.2 本地启动

    Alluxio 默认配置成在 localhost 启动 master 和 worker 。使用如下命令在 localhost 启动 Alluxio:

    ./bin/alluxio-start.sh local

    3.1.3 验证启动

    http://localhost:19999 --》 查看 Alluxio master 的运行状态
    http://localhost:30000 --》 查看 Alluxio worker 的运行状态

    或者,在运行命令 jps,查看当前 java 进程中 AlluxioMaster、AlluxioWorker 信息。

    3.2 集群运行 Alluxio

    3.2.1 集群内节点的配置

    为使集群的 master 与 worker 方便沟通,需要对 ssh 进行配置。

    首先,在将要运行 master 的节点上通过如下命令生成相应公私钥。

    ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
    cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
    chmod 0600 ~/.ssh/authorized_keys

    其次,将此处生成的 authorized_keys 分发到集群的 workers 中,放在 worker的 ~/.ssh/authorized_keys

    然后,修改好所有节点的 /etc/hosts 文件,为各个节点取别名,方便沟通。

    再者,修改 master 的配置文件 ./conf/alluxio-env.sh ,有三个关键点:

    export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 # java 的安装目录
    export ALLUXIO_HOME=/root/alluxio # alluxio 的安装目录
    export ALLUXIO_MASTER_HOSTNAME=master # 我的 host 文件中有一条记录,“[master节点的ip] master”记录

    随后,修改 master 的配置文件 ./conf/workers :(workers 的别名,需要在 host 文件上配置,才能被解析)

    最后,将 master 节点上的配置分发到各个 worker 节点上。使用如下命令

    ./bin/alluxio copyDir

    ./bin/alluxio copyDir ./conf/workers 即可将该文件分发到各个节点的相同目录下。需要保持一致的文件有:./conf/workers全部配置,./conf/alluxio-env.sh中的部分配置

    更一般的,你甚至可以无需在 worker 节点上安装 alluxio ,而是通过 ./bin/alluxio copyDir . ,将本节点上的 alluxio 目录分发到各个节点上。

    3.2.2 在集群内运行

    上述配置完成后,即可在 master 上通过命令 ./bin/alluxio format./bin/alluxio-start.sh all Mount 在集群内运行 Alluxio。

    同样的,你可以通过 jps 去检查运行状态。

    • master 上:出现 proxy、master
    • worker 上:出现 proxy、worker

    使用./bin/alluxio-start.sh all 停止运行 Alluxio。

    3.2.3 错误

    在集群内运行的时候,可能会出现 worker 启动不了的问题。表现为 master 上的 AlluxioMaster、AlluxioProxy 正在运行,且通过 stop 命令无法关闭。

    解决:我是通过查找到这两个命令运行的父进程 id ,然后将父进程杀掉,再按 3.2.2 的命令。

    3.3 文件系统操作

    相关命令见:http://www.alluxio.org/docs/1.4/cn/Command-Line-Interface.html

  • 相关阅读:
    这个我过滤概述UIPickerView键盘处理
    父子控制器
    源码0501-10-掌握-单粒模式
    源码0501-07-GCD的基本使用
    源码0501-04-了解-线程的状态
    源码-0501-01-处理耗时操作
    源码03-02-10-导航控制器简单使用
    spring在ssh框架中到底起到什么作用
    ssh整合
    spring整合hibernate
  • 原文地址:https://www.cnblogs.com/neillee/p/6410842.html
Copyright © 2020-2023  润新知