Bootstrap

alluxio集群配置部署

       1.解压

  tar zxvf alluxio-1.4.0-cdh5-bin.tar.gz

  2.配置

  cd alluxio-1.4.0/conf

  2.1

  为实现持久化,创建hdfs目录,并配置相关设置

  hdfs dfs -mkdir /alluxio

  2.2

  cp alluxio-site.properties.template alluxio-site.properties

  vi alluxio-site.properties

  alluxio.home=/home/user/alluxio-1.4.0

  alluxio.work.dir=/home/user/alluxio-1.4.0

  alluxio.conf.dir=${alluxio.home}/conf

  alluxio.logs.dir=${alluxio.home}/logs

  alluxio.metrics.conf.file=${alluxio.conf.dir}/metrics.properties

  # Common properties

  alluxio.master.hostname=aistation-86

  alluxio.underfs.address=hdfs://10.88.1.86:8020/alluxio

  # additional

  alluxio.underfs.hdfs.configuration=/etc/hadoop/conf/core-site.xml

  alluxio.master.bind.host=10.88.1.86

  alluxio.master.hostname=aistation-86

  alluxio.master.journal.folder=/home/user/alluxio-1.4.0/journal

  alluxio.master.web.bind.host=10.88.1.86

  alluxio.master.web.hostname=aistation-86

  alluxio.master.web.port=19999

  # Security properties

  # alluxio.security.authorization.permission.enabled=true

  # alluxio.security.authentication.type=SIMPLE

  # Worker properties

  alluxio.worker.bind.host=0.0.0.0

  alluxio.worker.memory.size=4GB

  alluxio.worker.tieredstore.levels=1

  alluxio.worker.tieredstore.level0.alias=MEM

  alluxio.worker.tieredstore.level0.dirs.path=/mnt/ramdisk

  # User properties

  # alluxio.user.file.readtype.default=CACHE_PROMOTE

  # alluxio.user.file.writetype.default=MUST_CACHE

  2.3

  cp alluxio-env.sh.template alluxio-env.sh

  vi alluxio-env.sh

  ALLUXIO_HOME=/home/user/alluxio-1.4.0

  ALLUXIO_LOGS_DIR=/home/user/alluxio-1.4.0/logs

  ALLUXIO_MASTER_HOSTNAME=aistation-86

  ALLUXIO_RAM_FOLDER=/mnt/ramdisk

  ALLUXIO_UNDERFS_ADDRESS=hdfs://10.88.1.86:8020/alluxio

  ALLUXIO_WORKER_MEMORY_SIZE=4GB

  JAVA_HOME=/usr/java/default

  2.4

  sudo ln -s /etc/hadoop/conf/core-site.xml core-site.xml

  sudo ln -s /etc/hadoop/conf/hdfs-site.xml hdfs-site.xml

  2.5

  vi workers

  10.88.1.86 aistation-86

  10.88.1.87 aistation-87

  10.88.1.88 aistation-88

  3. 格式化,并启动服务

  cd ../bin

  alluxio copyDir /home/user/alluxio-1.4.0

  alluxio format

  alluxio-start.sh all NoMount

  4.cd ../libexec

  vi alluxio-config.sh

  export JAVA_HOME=/usr/java/default

  source /etc/profile

  5. cd ../..

  scp -r alluxio-1.4.0 [email protected]:/home/user

  scp -r alluxio-1.4.0 [email protected]:/home/user

  6. 启动所有服务

  bin/alluxio-stop.sh all

  bin/alluxio-start.sh all

  7. 使用

  alluxio --help

  alluxio fs checkConsistency hdfs://10.88.1.86:8020/alluxio

  从本地拷贝文件

  alluxio fs copyFromLocal worker.out /

  持久化

  alluxio fs persist /worker.out

  HDFS查看持久化结果

  hdfs dfs -ls /alluxio

  结束持久化

  alluxio fs free /worker.out

  HDFS查看结束持久化结果

  hdfs dfs -ls /alluxio

  下载文件

  alluxio fs load /worker.out

  alluxio fs -ls

  alluxio fs rm /worker.out

  alluxio fs ls /

  hdfs dfs -ls /alluxio

;