From 0a88de5e091e3397e5d732690d05b246e630150e Mon Sep 17 00:00:00 2001 From: chrislu Date: Sun, 5 Dec 2021 18:20:33 -0800 Subject: [PATCH] java client 2.81 --- Hadoop-Benchmark.md | 3 +-- Hadoop-Compatible-File-System.md | 24 ++++++++++++------------ Run-Presto-on-SeaweedFS.md | 10 +++++----- run-HBase-on-SeaweedFS.md | 4 ++-- run-Spark-on-SeaweedFS.md | 14 +++++++------- 5 files changed, 27 insertions(+), 28 deletions(-) diff --git a/Hadoop-Benchmark.md b/Hadoop-Benchmark.md index b80a61a..044a910 100644 --- a/Hadoop-Benchmark.md +++ b/Hadoop-Benchmark.md @@ -26,7 +26,7 @@ Then get the seaweedfs hadoop client jar. ``` cd share/hadoop/common/lib/ -wget https://oss.sonatype.org/service/local/repositories/releases/content/com/github/chrislusf/seaweedfs-hadoop2-client/1.7.0/seaweedfs-hadoop2-client-1.7.0.jar +wget https://oss.sonatype.org/service/local/repositories/releases/content/com/github/chrislusf/seaweedfs-hadoop2-client/2.81/seaweedfs-hadoop2-client-2.81.jar ``` # TestDFSIO Benchmark @@ -142,4 +142,3 @@ As for `join`, every DataFrame join with itself on one column. Following is the | Stddev | 0.934 | 1.381 | | Min | 24.006 | 22.275 | | Max | 30.991 | 30.279 | - diff --git a/Hadoop-Compatible-File-System.md b/Hadoop-Compatible-File-System.md index d99b172..500240e 100644 --- a/Hadoop-Compatible-File-System.md +++ b/Hadoop-Compatible-File-System.md @@ -10,12 +10,12 @@ $ mvn install # build for hadoop2 $cd $GOPATH/src/github.com/chrislusf/seaweedfs/other/java/hdfs2 $ mvn package -$ ls -al target/seaweedfs-hadoop2-client-1.7.0.jar +$ ls -al target/seaweedfs-hadoop2-client-2.81.jar # build for hadoop3 $cd $GOPATH/src/github.com/chrislusf/seaweedfs/other/java/hdfs3 $ mvn package -$ ls -al target/seaweedfs-hadoop3-client-1.7.0.jar +$ ls -al target/seaweedfs-hadoop3-client-2.81.jar ``` Maven @@ -23,7 +23,7 @@ Maven com.github.chrislusf seaweedfs-hadoop3-client - 1.7.0 + 2.81 or @@ -31,23 +31,23 @@ or com.github.chrislusf seaweedfs-hadoop2-client - 1.7.0 + 2.81 ``` Or you can download the latest version from MavenCentral * https://mvnrepository.com/artifact/com.github.chrislusf/seaweedfs-hadoop2-client - * [seaweedfs-hadoop2-client-1.7.0.jar](https://oss.sonatype.org/service/local/repositories/releases/content/com/github/chrislusf/seaweedfs-hadoop2-client/1.7.0/seaweedfs-hadoop2-client-1.7.0.jar) + * [seaweedfs-hadoop2-client-2.81.jar](https://oss.sonatype.org/service/local/repositories/releases/content/com/github/chrislusf/seaweedfs-hadoop2-client/2.81/seaweedfs-hadoop2-client-2.81.jar) * https://mvnrepository.com/artifact/com.github.chrislusf/seaweedfs-hadoop3-client - * [seaweedfs-hadoop3-client-1.7.0.jar](https://oss.sonatype.org/service/local/repositories/releases/content/com/github/chrislusf/seaweedfs-hadoop3-client/1.7.0/seaweedfs-hadoop3-client-1.7.0.jar) + * [seaweedfs-hadoop3-client-2.81.jar](https://oss.sonatype.org/service/local/repositories/releases/content/com/github/chrislusf/seaweedfs-hadoop3-client/2.81/seaweedfs-hadoop3-client-2.81.jar) # Test SeaweedFS on Hadoop Suppose you are getting a new Hadoop installation. Here are the minimum steps to get SeaweedFS to run. -You would need to start a weed filer first, build the seaweedfs-hadoop2-client-1.7.0.jar -or seaweedfs-hadoop3-client-1.7.0.jar, and do the following: +You would need to start a weed filer first, build the seaweedfs-hadoop2-client-2.81.jar +or seaweedfs-hadoop3-client-2.81.jar, and do the following: ``` # optionally adjust hadoop memory allocation @@ -60,12 +60,12 @@ $ echo "" > etc/hadoop/mapred-site.xml # on hadoop2 $ bin/hdfs dfs -Dfs.defaultFS=seaweedfs://localhost:8888 \ -Dfs.seaweedfs.impl=seaweed.hdfs.SeaweedFileSystem \ - -libjars ./seaweedfs-hadoop2-client-1.7.0.jar \ + -libjars ./seaweedfs-hadoop2-client-2.81.jar \ -ls / # or on hadoop3 $ bin/hdfs dfs -Dfs.defaultFS=seaweedfs://localhost:8888 \ -Dfs.seaweedfs.impl=seaweed.hdfs.SeaweedFileSystem \ - -libjars ./seaweedfs-hadoop3-client-1.7.0.jar \ + -libjars ./seaweedfs-hadoop3-client-2.81.jar \ -ls / ``` @@ -112,9 +112,9 @@ $ bin/hadoop classpath # Copy SeaweedFS HDFS client jar to one of the folders $ cd ${HADOOP_HOME} # for hadoop2 -$ cp ./seaweedfs-hadoop2-client-1.7.0.jar share/hadoop/common/lib/ +$ cp ./seaweedfs-hadoop2-client-2.81.jar share/hadoop/common/lib/ # or for hadoop3 -$ cp ./seaweedfs-hadoop3-client-1.7.0.jar share/hadoop/common/lib/ +$ cp ./seaweedfs-hadoop3-client-2.81.jar share/hadoop/common/lib/ ``` Now you can do this: diff --git a/Run-Presto-on-SeaweedFS.md b/Run-Presto-on-SeaweedFS.md index 43c4b17..aafe209 100644 --- a/Run-Presto-on-SeaweedFS.md +++ b/Run-Presto-on-SeaweedFS.md @@ -5,10 +5,10 @@ The installation steps are divided into 2 steps: * https://cwiki.apache.org/confluence/display/Hive/AdminManual+Metastore+Administration ### Configure Hive Metastore to support SeaweedFS -1. Copy the seaweedfs-hadoop2-client-1.7.0.jar to hive lib directory,for example: +1. Copy the seaweedfs-hadoop2-client-2.81.jar to hive lib directory,for example: ``` -cp seaweedfs-hadoop2-client-1.7.0.jar /opt/hadoop/share/hadoop/common/lib/ -cp seaweedfs-hadoop2-client-1.7.0.jar /opt/hive-metastore/lib/ +cp seaweedfs-hadoop2-client-2.81.jar /opt/hadoop/share/hadoop/common/lib/ +cp seaweedfs-hadoop2-client-2.81.jar /opt/hive-metastore/lib/ ``` 2. Modify core-site.xml modify core-site.xml to support SeaweedFS, 30888 is the filer port @@ -50,9 +50,9 @@ metastore.thrift.port is the access port exposed by the Hive Metadata service it Follow instructions for installation of Presto: * https://prestosql.io/docs/current/installation/deployment.html ### Configure Presto to support SeaweedFS -1. Copy the seaweedfs-hadoop2-client-1.7.0.jar to Presto directory,for example: +1. Copy the seaweedfs-hadoop2-client-2.81.jar to Presto directory,for example: ``` -cp seaweedfs-hadoop2-client-1.7.0.jar /opt/presto-server-347/plugin/hive-hadoop2/ +cp seaweedfs-hadoop2-client-2.81.jar /opt/presto-server-347/plugin/hive-hadoop2/ ``` 2. Modify core-site.xml diff --git a/run-HBase-on-SeaweedFS.md b/run-HBase-on-SeaweedFS.md index f9c179e..e3ed03c 100644 --- a/run-HBase-on-SeaweedFS.md +++ b/run-HBase-on-SeaweedFS.md @@ -1,7 +1,7 @@ # Installation for HBase Two steps to run HBase on SeaweedFS -1. Copy the seaweedfs-hadoop2-client-1.7.0.jar to `${HBASE_HOME}/lib` +1. Copy the seaweedfs-hadoop2-client-2.81.jar to `${HBASE_HOME}/lib` 1. And add the following 2 properties in `${HBASE_HOME}/conf/hbase-site.xml` ``` @@ -27,4 +27,4 @@ Two steps to run HBase on SeaweedFS Visit HBase Web UI at `http://:16010` to confirm that HBase is running on SeaweedFS -![](HBaseOnSeaweedFS.png) \ No newline at end of file +![](HBaseOnSeaweedFS.png) diff --git a/run-Spark-on-SeaweedFS.md b/run-Spark-on-SeaweedFS.md index d51441f..68cd04a 100644 --- a/run-Spark-on-SeaweedFS.md +++ b/run-Spark-on-SeaweedFS.md @@ -11,12 +11,12 @@ To make these files visible to Spark, set HADOOP_CONF_DIR in $SPARK_HOME/conf/sp ## installation not inheriting from Hadoop cluster configuration -Copy the seaweedfs-hadoop2-client-1.7.0.jar to all executor machines. +Copy the seaweedfs-hadoop2-client-2.81.jar to all executor machines. Add the following to spark/conf/spark-defaults.conf on every node running Spark ``` -spark.driver.extraClassPath=/path/to/seaweedfs-hadoop2-client-1.7.0.jar -spark.executor.extraClassPath=/path/to/seaweedfs-hadoop2-client-1.7.0.jar +spark.driver.extraClassPath=/path/to/seaweedfs-hadoop2-client-2.81.jar +spark.executor.extraClassPath=/path/to/seaweedfs-hadoop2-client-2.81.jar ``` And modify the configuration at runtime: @@ -37,8 +37,8 @@ And modify the configuration at runtime: 1. change the spark-defaults.conf ``` -spark.driver.extraClassPath=/Users/chris/go/src/github.com/chrislusf/seaweedfs/other/java/hdfs2/target/seaweedfs-hadoop2-client-1.7.0.jar -spark.executor.extraClassPath=/Users/chris/go/src/github.com/chrislusf/seaweedfs/other/java/hdfs2/target/seaweedfs-hadoop2-client-1.7.0.jar +spark.driver.extraClassPath=/Users/chris/go/src/github.com/chrislusf/seaweedfs/other/java/hdfs2/target/seaweedfs-hadoop2-client-2.81.jar +spark.executor.extraClassPath=/Users/chris/go/src/github.com/chrislusf/seaweedfs/other/java/hdfs2/target/seaweedfs-hadoop2-client-2.81.jar spark.hadoop.fs.seaweedfs.impl=seaweed.hdfs.SeaweedFileSystem ``` @@ -81,8 +81,8 @@ spark.history.fs.cleaner.enabled=true spark.history.fs.logDirectory=seaweedfs://localhost:8888/spark2-history/ spark.eventLog.dir=seaweedfs://localhost:8888/spark2-history/ -spark.driver.extraClassPath=/Users/chris/go/src/github.com/chrislusf/seaweedfs/other/java/hdfs2/target/seaweedfs-hadoop2-client-1.7.0.jar -spark.executor.extraClassPath=/Users/chris/go/src/github.com/chrislusf/seaweedfs/other/java/hdfs2/target/seaweedfs-hadoop2-client-1.7.0.jar +spark.driver.extraClassPath=/Users/chris/go/src/github.com/chrislusf/seaweedfs/other/java/hdfs2/target/seaweedfs-hadoop2-client-2.81.jar +spark.executor.extraClassPath=/Users/chris/go/src/github.com/chrislusf/seaweedfs/other/java/hdfs2/target/seaweedfs-hadoop2-client-2.81.jar spark.hadoop.fs.seaweedfs.impl=seaweed.hdfs.SeaweedFileSystem spark.hadoop.fs.defaultFS=seaweedfs://localhost:8888 ```