update spark

This commit is contained in:
2018-08-08 15:51:43 +08:00
parent 7a063c234f
commit a376535545
4 changed files with 48 additions and 0 deletions

View File

@@ -9,6 +9,7 @@ docker service create \
--network swarm-net \ --network swarm-net \
--replicas 1 \ --replicas 1 \
--detach true \ --detach true \
--mount type=bind,source=/etc/localtime,target=/etc/localtime \
newnius/spark:2.2.1-yarn newnius/spark:2.2.1-yarn
``` ```
@@ -43,3 +44,22 @@ val cnt = words.map(word => 1).reduce(_ + _)
## Browse the web UI ## Browse the web UI
In Spark On Yarn mode, the spark jobs will occur in the Yarn web UI. In Spark On Yarn mode, the spark jobs will occur in the Yarn web UI.
## Custom configuration
To persist data or modify the conf files, refer to the following script.
The `/config/hadoop` path is where new conf files to be replaces, you don't have to put all the files.
```bash
docker service create \
--name spark-client \
--hostname spark-client \
--network swarm-net \
--replicas 1 \
--detach true \
--mount type=bind,source=/etc/localtime,target=/etc/localtime \
--mount type=bind,source=/data/hadoop/config,target=/config/hadoop \
newnius/spark:2.2.1-yarn
```

View File

@@ -46,4 +46,8 @@
<name>yarn.scheduler.minimum-allocation-mb</name> <name>yarn.scheduler.minimum-allocation-mb</name>
<value>1024</value> <value>1024</value>
</property> </property>
<property>
<name>yarn.nodemanager.vmem-pmem-ratio</name>
<value>5</value>
</property>
</configuration> </configuration>

View File

@@ -9,6 +9,7 @@ docker service create \
--network swarm-net \ --network swarm-net \
--replicas 1 \ --replicas 1 \
--detach true \ --detach true \
--mount type=bind,source=/etc/localtime,target=/etc/localtime \
newnius/spark:2.3.1-yarn newnius/spark:2.3.1-yarn
``` ```
@@ -43,3 +44,22 @@ val cnt = words.map(word => 1).reduce(_ + _)
## Browse the web UI ## Browse the web UI
In Spark On Yarn mode, the spark jobs will occur in the Yarn web UI. In Spark On Yarn mode, the spark jobs will occur in the Yarn web UI.
## Custom configuration
To persist data or modify the conf files, refer to the following script.
The `/config/hadoop` path is where new conf files to be replaces, you don't have to put all the files.
```bash
docker service create \
--name spark-client \
--hostname spark-client \
--network swarm-net \
--replicas 1 \
--detach true \
--mount type=bind,source=/etc/localtime,target=/etc/localtime \
--mount type=bind,source=/data/hadoop/config,target=/config/hadoop \
newnius/spark:2.3.1-yarn
```

View File

@@ -46,4 +46,8 @@
<name>yarn.scheduler.minimum-allocation-mb</name> <name>yarn.scheduler.minimum-allocation-mb</name>
<value>1024</value> <value>1024</value>
</property> </property>
<property>
<name>yarn.nodemanager.vmem-pmem-ratio</name>
<value>5</value>
</property>
</configuration> </configuration>