cephfs-java
libcephfs_jni
libcephfs2
$ ln -s /usr/lib64/libcephfs_jni.so.1.0.0 /usr/lib64/libcephfs_jni.so
$ ln -s /usr/lib64/libcephfs.so.2.0.0 /usr/lib64/libcephfs.so
$ java_path=`which java | xargs readlink | sed 's#/bin/java/##g'`
$ ln -s /usr/share/java/libcephfs.jar $java_path/jre/lib/ext/libcephfs.jar
$ curl -o $java_path/jre/lib/ext/hadoop-cephfs.jar -d https://download.ceph.com/tarballs/hadoop-cephfs.jar
$ cp conf/alluxio-site.properties.template conf/alluxio-site.properties
$ cp conf/core-site.xml.template conf/core-site.xml
cephfs
向conf/alluxio-site.properties
文件添加以下代码:
alluxio.underfs.cephfs.conf.file=<ceph-conf-file>
alluxio.underfs.cephfs.mds.namespace=<ceph-fs-name>
alluxio.underfs.cephfs.mount.point=<ceph-fs-dir>
alluxio.underfs.cephfs.auth.id=<client-id>
alluxio.underfs.cephfs.auth.keyring=<client-keyring-file>
cephfs-hadoop
向conf/alluxio-site.properties
文件添加以下代码:
alluxio.underfs.hdfs.configuration=${ALLUXIO_HOME}/conf/core-site.xml
向conf/core-site.xml
文件添加以下代码:
<configuration>
<property>
<name>fs.default.name</name>
<value>ceph://mon1,mon2,mon3/</value>
</property>
<property>
<name>fs.defaultFS</name>
<value>ceph://mon1,mon2,mon3/</value>
</property>
<property>
<name>ceph.data.pools</name>
<value>${data-pools}</value>
</property>
<property>
<name>ceph.auth.id</name>
<value>${client-id}</value>
</property>
<property>
<name>ceph.conf.options</name>
<value>client_mount_gid=${gid},client_mount_uid=${uid},client_mds_namespace=${ceph-fs-name}</value>
</property>
<property>
<name>ceph.root.dir</name>
<value>${ceph-fs-dir}</value>
</property>
<property>
<name>ceph.mon.address</name>
<value>mon1,mon2,mon3</value>
</property>
<property>
<name>fs.AbstractFileSystem.ceph.impl</name>
<value>org.apache.hadoop.fs.ceph.CephFs</value>
</property>
<property>
<name>fs.ceph.impl</name>
<value>org.apache.hadoop.fs.ceph.CephFileSystem</value>
</property>
<property>
<name>ceph.auth.keyring</name>
<value>${client-keyring-file}</value>
</property>
</configuration>
./bin/alluxio format
./bin/alluxio-start.sh local