forked from makman07/curve
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init-hadoop.sh
88 lines (70 loc) · 1.78 KB
/
init-hadoop.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/usr/bin/env bash
g_hadoop_prefix="/home/${USER}/.local/hadoop"
g_hadoop_etc="${g_hadoop_prefix}/etc/hadoop/core-site.xml"
# hadoop
mkdir -p "${g_hadoop_prefix}"
sudo mkdir -p "/data/logs/curvefs"
sudo chown ${USER} -R "/data/logs/curvefs"
wget https://curveadm.nos-eastchina1.126.net/T/hadoop-3.3.6.tar.gz -O /tmp/hadoop-3.3.6.tar.gz
tar -zxvf /tmp/hadoop-3.3.6.tar.gz --strip-components=1 -C "${g_hadoop_prefix}"
cat << EOF >> ~/.bashrc
export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64"
export PATH=${g_hadoop_prefix}/bin:\$PATH
export PATH=\$JAVA_HOME/bin:\$PATH
EOF
cat << EOF > "${g_hadoop_etc}"
<configuration>
<property>
<name>fs.curvefs.impl</name>
<value>io.opencurve.curve.fs.hadoop.CurveFileSystem</value>
</property>
<property>
<name>fs.AbstractFileSystem.curvefs.impl</name>
<value>io.opencurve.curve.fs.hadoop.CurveFs</value>
</property>
<property>
<name>curvefs.name</name>
<value>myfs</value>
</property>
<property>
<name>curvefs.diskCache.diskCacheType</name>
<value>0</value>
</property>
<property>
<name>curvefs.s3.ak</name>
<value>xxxx</value>
</property>
<property>
<name>curvefs.s3.sk</name>
<value>xxxx</value>
</property>
<property>
<name>curvefs.s3.endpoint</name>
<value>127.0.0.1:9000</value>
</property>
<property>
<name>curvefs.s3.bucket_name</name>
<value>xxxx</value>
</property>
<property>
<name>curvefs.mdsOpt.rpcRetryOpt.addrs</name>
<value>10.0.0.1:6700,10.0.0.2:6700,10.0.0.3:6700</value>
</property>
<property>
<name>curvefs.client.common.logDir</name>
<value>/tmp</value>
</property>
<property>
<name>curvefs.fs.accessLogging</name>
<value>true</value>
</property>
<property>
<name>curvefs.vfs.entryCache.lruSize</name>
<value>2000000</value>
</property>
<property>
<name>curvefs.vfs.attrCache.lruSize</name>
<value>2000000</value>
</property>
</configuration>
EOF