中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁(yè) > news >正文

江蘇水利工程建設(shè)招投標(biāo)網(wǎng)站最佳bt磁力狗

江蘇水利工程建設(shè)招投標(biāo)網(wǎng)站,最佳bt磁力狗,電子商務(wù)網(wǎng)站建設(shè)和管理的意義,網(wǎng)站建設(shè)企業(yè)屬于什么類(lèi)型的公司容器云提交spark job任務(wù) 容器云提交KindJob類(lèi)型的spark任務(wù),首先需要申請(qǐng)具有Job任務(wù)提交權(quán)限的rbac,然后編寫(xiě)對(duì)應(yīng)的yaml文件,通過(guò)spark內(nèi)置的spark-submit命令,提交用戶(hù)程序(jar包)到集群執(zhí)行。 1、創(chuàng)建任務(wù)job提交權(quán)限r(nóng)bac …

容器云提交spark job任務(wù)

容器云提交Kind=Job類(lèi)型的spark任務(wù),首先需要申請(qǐng)具有Job任務(wù)提交權(quán)限的rbac,然后編寫(xiě)對(duì)應(yīng)的yaml文件,通過(guò)spark內(nèi)置的spark-submit命令,提交用戶(hù)程序(jar包)到集群執(zhí)行。

1、創(chuàng)建任務(wù)job提交權(quán)限r(nóng)bac

創(chuàng)建rbac賬戶(hù),并分配資源權(quán)限,Pod服務(wù)賬戶(hù)創(chuàng)建參考,kubernetes api查詢(xún)命令(kubectl api-resources);

cat > ecc-recommend-rbac.yaml << EOF
---
apiVersion: v1
kind: Namespace
metadata:name: item-dev-recommendlabels:name: item-dev-recommend
---
#基于namespace創(chuàng)建服務(wù)賬戶(hù)spark-cdp
apiVersion: v1
kind: ServiceAccount
metadata:name: spark-cdpnamespace: item-dev-recommend---
#創(chuàng)建角色資源權(quán)限
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:name: spark-cdpnamespace: item-dev-recommend
rules:- apiGroups:- ""resources:- podsverbs:- '*'- apiGroups:- ""resources:- configmapsverbs:- '*'- apiGroups:- ""resources:- services- secretsverbs:- create- get- delete- apiGroups:- extensionsresources:- ingressesverbs:- create- get- delete- apiGroups:- ""resources:- nodesverbs:- get- apiGroups:- ""resources:- resourcequotasverbs:- get- list- watch- apiGroups:- ""resources:- eventsverbs:- create- update- patch- apiGroups:- apiextensions.k8s.ioresources:- customresourcedefinitionsverbs:- create- get- update- delete- apiGroups:- admissionregistration.k8s.ioresources:- mutatingwebhookconfigurations- validatingwebhookconfigurationsverbs:- create- get- update- delete- apiGroups:- sparkoperator.k8s.ioresources:- sparkapplications- scheduledsparkapplications- sparkapplications/status- scheduledsparkapplications/statusverbs:- '*'- apiGroups:- scheduling.volcano.shresources:- podgroups- queues- queues/statusverbs:- get- list- watch- create- delete- update- apiGroups:- batchresources:- cronjobs- jobsverbs:- '*'   ---
#服務(wù)賬戶(hù)spark-cdp綁定角色
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:name: spark-cdpnamespace: item-dev-recommend
roleRef:apiGroup: rbac.authorization.k8s.iokind: Rolename: spark-cdp
subjects:- kind: ServiceAccountname: spark-cdpEOF

2、spark pv,pvc

  • 構(gòu)建pv
    掛載NFS,定義pv訪問(wèn)模式(accessModes)和存儲(chǔ)容量(capacity);
cat >ecc-recommend-pv.yaml <<EOF
apiVersion: v1
kind: PersistentVolume
metadata:name: dev-cdp-pv01namespace: item-dev-recommend
spec:capacity:storage: 10GiaccessModes:#訪問(wèn)三種模式:ReadWriteOnce,ReadOnlyMany,ReadWriteMany- ReadWriteOncenfs:path: /data/nfsserver: 192.168.0.135EOF
  • 構(gòu)建pvc
cat >ecc-recommend-pvc.yaml <<EOF
apiVersion: v1
kind: PersistentVolumeClaim
metadata:name: dev-cdp-pvc01namespace: item-dev-recommend
spec:accessModes:#匹配模式- ReadWriteOnceresources:requests:storage: 10GiEOF

3、spark-submit任務(wù)提交

將java/scala程序包開(kāi)發(fā)完成后,通過(guò)spark-submit命令提交jar包到集群執(zhí)行。

cat >ecc-recommend-sparksubmit.yaml <<EOF
---
apiVersion: batch/v1
kind: Job
metadata:name: item-recommend-jobnamespace: item-dev-recommendlabels:k8s-app: item-recommend-job
spec:template:metadata:labels:k8s-app: item-recommend-jobspec:containers:name: item-recommend-job- args:- /opt/spark/bin/spark-submit- --class- com.www.ecc.com.recommend.ItemRecommender- --master- k8s://https:/$(KUBERNETES_SERVICE_HOST):$(KUBERNETES_SERVICE_PORT)- --name- item-recommend-job- --jars- /opt/spark/jars/spark-cassandra-connector_2.11-2.3.4.jar- --conf- spark.kubernetes.authenticate.caCertFile=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt- --conf- spark.kubernetes.authenticate.oauthTokenFile=/var/run/secrets/kubernetes.io/serviceaccount/token- --conf- spark.kubernetes.driver.limit.cores=3- --conf- spark.kubernetes.executor.limit.cores=8- --conf- spark.kubernetes.driver.limit.memory=5g- --conf- spark.kubernetes.executor.limit.memory=32g- --conf- spark.executor.instances=8- --conf- spark.sql.crossJoin.enable=true- --conf- spark.executor.cores=6- --conf- spark.executor.memory=32g- --conf- spark.driver.cores=3- --conf- spark.dirver.memory=5g- --conf- spark.sql.autoBroadcastJoinThreshold=-1- --conf- spark.kubernetes.namespace=item-dev-recommend- --conf- spark.driver.port=45970- --conf- spark.blockManager.port=45980- --conf- spark.kubernetes.container.image=acpimagehub.ecc.cn/spark:3.11- --conf- spark.executor.extraJavaOptions="-Duser.timezone=GMT+08:00"- --conf- spark.driver.extraJavaOptions="-Duser.timezone=GMT+08:00"- --conf- spark.default.parallelism=500- /odsdata/item-recommender-1.0.0-SNAPSHOT.jar- env:- name: SPARK_SHUFFLE_PARTITIONSvalue: "100"- name: CASSANDR_HOSTvalue: "192.168.0.1,192.168.0.2,192.168.0.3"- name: CASSANDRA_PORTvalue: "9042"- name: AUTH_USERNAMEvalue: "user"- name: AUTH_PASSWORDvalue: "123456"image: acpimagehub.ecc.cn/spark:3.11imagePullPolicy: IfNotPresentports:- containerPort: 9000name: 9000tcp2protocol: TCPresources:limits:cpu: "3"memory: 2Girequests:cpu: "3"memory: 2GivolumeMounts:- mountPath: /odsdataname: item-spark-pvcvolumes:- name: item-spark-pvcpersistentVolumeClaim:claimName: dev-cdp-pvc01dnsPolicy: ClusterFirstrestartPolicy: Neverhostname: item-recommend-jobsecurityContext: {}serviceAccountName: spark-cdp
---
apiVersion: v1
kind: Service
metadata:name: item-recommend-jobnamespace: item-dev-recommend
spec:type: NodePortports:- name: sparkjob-tcp4040port: 4040protocol: TCPtargetPort: 4040#spark driver port- name: sparkjob-tcp-45970port: 45970protocol: TCPtargetPort: 45970#spark ui- name: sparkjob-tcp-48080port: 48080protocol: TCPtargetPort: 48080#spark executor port- name: sparkjob-tcp-45980port: 45980protocol: TCPtargetPort: 45980selector:k8s-app: item-recommend-jobEOF

4、打包插件小記

<build><resources><resource><directory>src/main/resources</directory><includes><include>*.properties</include></includes><filtering>false</filtering></resource></resources><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-surefire-plugin</artifactId><configuration><skipTests>true</skipTests></configuration></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>3.6.1</version><configuration><source>${java.version}</source><target>${java.version}</target><encoding>${project.build.sourceEncoding}</encoding></configuration><executions><execution><phase>compile</phase><goals><goal>compile</goal></goals></execution></executions></plugin><plugin><groupId>net.alchim31.maven</groupId><artifactId>scala-maven-plugin</artifactId><version>3.2.2</version><executions><execution><id>scala-compile-first</id><phase>process-resources</phase><goals><goal>add-source</goal><goal>compile</goal><goal>testCompile</goal></goals></execution></executions></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-shade-plugin</artifactId><version>3.2.1</version><executions><execution><phase>package</phase><goals><goal>shade</goal></goals></execution></executions></plugin></plugins></build>
http://www.risenshineclean.com/news/51577.html

相關(guān)文章:

  • 公司網(wǎng)站建設(shè)開(kāi)題報(bào)告西安百度推廣電話(huà)
  • 廣東建設(shè)網(wǎng)工程信息網(wǎng)站無(wú)錫網(wǎng)站建設(shè)seo
  • wordpress如何開(kāi)發(fā)搜索寧波seo自然優(yōu)化技術(shù)
  • 免費(fèi)做海報(bào)的網(wǎng)站效果好的東莞品牌網(wǎng)站建設(shè)
  • 昆山營(yíng)銷(xiāo)型網(wǎng)站建設(shè)方法模板建站優(yōu)點(diǎn)
  • 產(chǎn)品包裝設(shè)計(jì)網(wǎng)站找誰(shuí)做google瀏覽器下載
  • 壽光專(zhuān)業(yè)做網(wǎng)站的公司天津百度分公司
  • 網(wǎng)站建設(shè)論文的摘要免費(fèi)b站推廣網(wǎng)站入口
  • 校園網(wǎng)站頁(yè)面設(shè)計(jì)杭州排名優(yōu)化公司
  • 關(guān)于網(wǎng)站開(kāi)發(fā)的文獻(xiàn)縱橫seo
  • 企業(yè)網(wǎng)站建設(shè)的實(shí)踐意義外鏈怎么做
  • 如何靠裁圖找到網(wǎng)站中國(guó)最好的營(yíng)銷(xiāo)策劃公司
  • 網(wǎng)站項(xiàng)目建設(shè)申請(qǐng)匯報(bào)大綱網(wǎng)絡(luò)營(yíng)銷(xiāo)推廣方案整合
  • 四網(wǎng)合一網(wǎng)站建設(shè)seo排名點(diǎn)擊軟件推薦
  • 個(gè)人新聞?lì)惥W(wǎng)站模板世界足球排名前100名
  • 體驗(yàn)好的網(wǎng)站陜西省人民政府
  • 互聯(lián)網(wǎng)行業(yè)環(huán)境分析seo博客
  • 網(wǎng)站備案要幕布照新手做銷(xiāo)售怎么開(kāi)發(fā)客戶(hù)
  • 建網(wǎng)站公司seo技巧seo排名優(yōu)化
  • 網(wǎng)站建設(shè)賺錢(qián)嗎網(wǎng)站怎么快速排名
  • 昆明做網(wǎng)站建設(shè)價(jià)位50個(gè)市場(chǎng)營(yíng)銷(xiāo)經(jīng)典案例
  • 中信建設(shè)有限責(zé)任公司洪波頁(yè)優(yōu)化軟件
  • 番禺做網(wǎng)站平臺(tái)湖南競(jìng)價(jià)優(yōu)化專(zhuān)業(yè)公司
  • 做房產(chǎn)經(jīng)紀(jì)的那些網(wǎng)站可以進(jìn)客東莞網(wǎng)絡(luò)營(yíng)銷(xiāo)推廣軟件
  • 網(wǎng)站建設(shè)與管理代碼app開(kāi)發(fā)價(jià)格表
  • h5游戲搭建優(yōu)化技術(shù)
  • 品牌網(wǎng)站模板百度指數(shù)如何分析
  • 站長(zhǎng)網(wǎng)站優(yōu)化公司手機(jī)網(wǎng)站建設(shè)價(jià)格
  • wordpress仿站難嗎廣東互聯(lián)網(wǎng)網(wǎng)絡(luò)營(yíng)銷(xiāo)推廣
  • 網(wǎng)站建設(shè)宗旨是什么口碑營(yíng)銷(xiāo)公司