【Java Kubernates】Java调用kubernates提交Yaml到SparkOperator

背景

目前查询框架使用的是trino,但是trino也有其局限性,需要准备一个备用的查询框架。考虑使用spark,spark operator也已经部署到k8s,现在需要定向提交spark sql到k8s的sparkoperator上,使用k8s资源执行sql。

对比

查询了java调用k8s的框架,有两个:fabric8io/kubernetes-client和kubernetes-client/java,fabric8io/kubernetes-client:始于2015年,用户很多,社区活跃。Fabric8项目的愿景是成为运行在Kubernetes之上的云原生微服务的PaaS平台。Fabric8 Kubernetes客户端在Fabric8生态系统中发挥了关键作用,因为它是Kubernetes REST API的抽象

kubernetes-client/java:官方的Kubernetes Java客户端是由Brendan Burns(他也是Kubernetes的创始人)和其他几个用于其他语言(如PERL、Javascript、Python等)的客户端于2017年底启动的。所有客户端似乎都是从一个通用的OpenAPI生成器脚本生成的:kubernetes-client/gen和Java客户端也是以相同的方式生成的。因此,它的用法与使用该脚本生成的其他客户端相似。

具体可以参考下面这篇文章

https://itnext.io/difference-between-fabric8-and-official-kubernetes-java-client-3e0a994fd4aficon-default.png?t=N7T8https://itnext.io/difference-between-fabric8-and-official-kubernetes-java-client-3e0a994fd4af

最终我选择了fabric8io,因为我们需要使用k8s的自定义资源sparkApplication,对于自定义资源,kubernetes-client/java需要创建各个k8s对象的pojo,比较麻烦。而fabric8io/kubernetes-client支持两种方式,一种和前者一样,创建pojo,还有一种方式使用GenericKubernetesResource动态创建并使用自定义资源,为了简便,选择使用fabric8io。

Spark Operator镜像及部署

spark operator的部署不再介绍,参考我前面的博客文章。

这里提一下,我在重新使用spark operator的时候,发现原来官方的google的spark operator镜像已经不能拉取了,貌似是google发现它的两个镜像存在漏洞,所以关闭了开源镜像。重新寻找了类似的镜像,发现了有openlake的spark镜像。拉取spark和spark operator镜像

https://hub.docker.com/u/openlake

程序调用架构

一:主程序(Main App)

编写主程序,即调用spark的主要代码。将下面的程序打包成jar,比如我的zyspark-0.0.1-SNAPSHOT.jar

import java.io.File;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.s3a.S3AFileSystem;
import org.apache.spark.SparkConf;
import org.apache.spark.SparkContext;
import org.apache.spark.api.java.JavaRDD;
import org.apache.spark.sql.SparkSession;
import org.apache.spark.sql.Dataset;
import org.apache.spark.sql.Row;public class SparkDemo {public static void main(String[] args) throws Exception{sparkQueryForFhc();	}public static void sparkQueryForFhc() throws Exception{System.out.println("=========================1");String warehouseLocation = new File("spark-warehouse").getAbsolutePath();System.out.println("===========================2");String metastoreUri = "thrift://10.40.8.200:5000";SparkConf sparkConf = new SparkConf();sparkConf.set("fs.s3a.impl", "org.apache.hadoop.fs.s3a.S3AFileSystem");sparkConf.set("fs.s3a.access.key", "apPeWWr5KpXkzEW2jNKW");sparkConf.set("spark.hadoop.fs.s3a.path.style.access", "true");sparkConf.set("spark.hadoop.fs.s3a.connection.ssl.enabled", "true");sparkConf.set("fs.s3a.secret.key", "cRt3inWAhDYtuzsDnKGLGg9EJSbJ083ekuW7PejM");sparkConf.set("fs.s3a.endpoint", "wuxdimiov001.seagate.com:9000"); // 替换为实际的 S3 存储的地址sparkConf.set("spark.hadoop.fs.s3a.impl", "org.apache.hadoop.fs.s3a.S3AFileSystem");sparkConf.set("spark.sql.metastore.uris", metastoreUri);sparkConf.set("spark.sql.warehouse.dir", warehouseLocation);sparkConf.set("spark.sql.catalogImplementation", "hive");sparkConf.set("hive.metastore.uris", metastoreUri);//Class.forName("org.apache.hadoop.fs.s3a.S3AFileSystem");long zhenyang2 =  System.currentTimeMillis();SparkSession sparkSession = SparkSession.builder().appName("Fhc Spark Query").config(sparkConf).enableHiveSupport().getOrCreate();System.out.println("sparkSession create cost:"+(System.currentTimeMillis()-zhenyang2));System.out.println("==============================3");// 获取 SparkConf 对象String exesql = sparkSession.sparkContext().getConf().get("spark.query.sql");System.out.println("==============================3.1:"+exesql);System.out.println("Hive Metastore URI: " + sparkConf.get("spark.sql.metastore.uris"));System.out.println("Hive Warehouse Directory: " + sparkConf.get("spark.sql.warehouse.dir"));System.out.println("SHOW DATABASES==============================3.1:"+exesql);sparkSession.sql("SHOW DATABASES").show();long zhenyang3 =  System.currentTimeMillis();Dataset<Row> sqlDF = sparkSession.sql(exesql);System.out.println("sparkSession sql:"+(System.currentTimeMillis()-zhenyang3));System.out.println("======================4");System.out.println("===========sqlDF count===========:"+sqlDF.count());sqlDF.show();long zhenyang5 =  System.currentTimeMillis();List<Row> jaList= sqlDF.javaRDD().collect();System.out.println("rdd collect cost:"+(System.currentTimeMillis()-zhenyang5));System.out.println("jaList list:"+jaList.size());List<TaskListModel> list = new ArrayList<TaskListModel>();long zhenyang4 =  System.currentTimeMillis();jaList.stream().forEachOrdered(result -> {System.out.println("serial_num is :"+result.getString(1));});System.out.println("SparkDemo foreach cost:"+(System.currentTimeMillis()-zhenyang4));System.out.println("=========================5");sparkSession.close();}}

二:调用k8s程序(Spark App)

  • 首先保证spark operator驱动程序已经发布在k8s集群
  • 创建一个springboot程序,开放restful接口,接收传入的参数,比如spark的driver和executor参数,cpu,内存,instance个数等,及传入的需要运行的sql。
  • 组织yaml内容,使用fabric8io将yaml提交到k8s执行

maven导入fabric8io包

    <dependency><groupId>io.fabric8</groupId><artifactId>kubernetes-client</artifactId><version>6.1.1</version> <!-- 替换为实际版本 --></dependency>

代码

注:因为sparkapplication是在k8s的自定义资源,应使用CustomResourceDefinitionContext来加载sparkapplication程序,提交到k8s的核心代码在submitSparkApplicationFabi2方法。

import java.io.File;
import java.io.FileReader;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;import io.fabric8.kubernetes.api.model.GenericKubernetesResource;
import io.fabric8.kubernetes.client.*;
import io.fabric8.kubernetes.client.dsl.base.CustomResourceDefinitionContext;
import io.fabric8.kubernetes.client.utils.Serialization;
import io.kubernetes.client.openapi.ApiClient;
import io.kubernetes.client.openapi.Configuration;
import io.kubernetes.client.openapi.apis.CustomObjectsApi;
import io.kubernetes.client.util.ClientBuilder;
import io.kubernetes.client.util.KubeConfig;
import io.kubernetes.client.util.Yaml;@RestController
public class SparkSqlController {@GetMapping(value = "/test")public String test() {System.out.println("test()");return "Spring Boot SparkSqlController:Hello World";}@PostMapping(value = "/submitSparkSql",consumes="application/json;charset=utf-8")public String executeSparkSql(@RequestBody Object message1) throws Exception {String errorInf = "";@SuppressWarnings("unchecked")Map<String,Object> message = (Map<String,Object>)message1;System.out.println(message);String taskName = String.valueOf(message.get("taskName"));String sparkImage = String.valueOf(message.get("sparkImage"));String mainClass = String.valueOf(message.get("mainClass"));String sparkJarFile = String.valueOf(message.get("sparkJarFile"));String driverCpu = String.valueOf(message.get("driverCpu"));String driverMemory = String.valueOf(message.get("driverMemory"));String executorCpu = String.valueOf(message.get("executorCpu"));String instance = String.valueOf(message.get("instance"));String executorMemory = String.valueOf(message.get("executorMemory"));String dynamicSQLQuery = String.valueOf(message.get("dynamicSQLQuery"));// 构建 SparkApplication YAML 配置String sparkApplicationYAML = buildSparkApplicationYAML(taskName, sparkImage, sparkJarFile, mainClass, instance, driverCpu, driverMemory, executorCpu, executorMemory, dynamicSQLQuery);System.out.println(sparkApplicationYAML);// 提交 SparkApplication 到 KubernetessubmitSparkApplicationFabi2(sparkApplicationYAML);return null;}//组织yaml,根据动态传入的参数生成yaml	private static String buildSparkApplicationYAML(String taskName, String sparkImage, String sparkJarFile, String mainClass, String instance,String driverCpu, String driverMemory, String executorCpu, String executorMemory, String dynamicSQLQuery) {return String.format("apiVersion: \"sparkoperator.k8s.io/v1beta2\"\n" +"kind: SparkApplication\n" +"metadata:\n" +"  name: %s\n" +"  namespace: spark-app\n" +"spec:\n" +"  type: Scala\n" +"  mode: cluster\n" +"  image: \"%s\"\n" +"  imagePullPolicy: Always\n" +"  imagePullSecrets: [\"harbor\"]\n" +"  mainClass: \"%s\"\n" +"  mainApplicationFile: \"%s\"\n" +"  sparkVersion: \"3.3.1\"\n" +"  restartPolicy:\n" +"    type: Never\n" +"  volumes:\n" +"    - name: nfs-spark-volume\n" +"      persistentVolumeClaim:\n" +"        claimName: sparkcode\n" +"  driver:\n" +"    cores: %s\n" +"    coreLimit: \"1200m\"\n" +"    memory: \"%s\"\n" +"    labels:\n" +"      version: 3.3.1\n" +"    serviceAccount: spark-svc-account\n" +"    volumeMounts:\n" +"      - name: nfs-spark-volume\n" +"        mountPath: \"/app/sparkcode\"\n" +"    env:\n" +"      - name: AWS_REGION\n" +"        valueFrom:\n" +"          secretKeyRef:\n" +"            name: minio-secret\n" +"            key: AWS_REGION\n" +"      - name: AWS_ACCESS_KEY_ID\n" +"        valueFrom:\n" +"          secretKeyRef:\n" +"            name: minio-secret\n" +"            key: AWS_ACCESS_KEY_ID\n" +"      - name: AWS_SECRET_ACCESS_KEY\n" +"        valueFrom:\n" +"          secretKeyRef:\n" +"            name: minio-secret\n" +"            key: AWS_SECRET_ACCESS_KEY\n" +"      - name: MINIO_ENDPOINT\n" +"        valueFrom:\n" +"          secretKeyRef:\n" +"            name: minio-secret\n" +"            key: MINIO_ENDPOINT\n" +"      - name: MINIO_HOST\n" +"        valueFrom:\n" +"          secretKeyRef:\n" +"            name: minio-secret\n" +"            key: MINIO_HOST\n" +"      - name: BUCKET_NAME\n" +"        valueFrom:\n" +"          secretKeyRef:\n" +"            name: minio-secret\n" +"            key: BUCKET_NAME\n" +"  executor:\n" +"    cores: %s\n" +"    instances: %s\n" +"    memory: \"%s\"\n" +"    labels:\n" +"      version: 3.3.1\n" +"    volumeMounts:\n" +"      - name: nfs-spark-volume\n" +"        mountPath: \"/app/sparkcode\"\n" +"    env:\n" +"      - name: AWS_REGION\n" +"        valueFrom:\n" +"          secretKeyRef:\n" +"            name: minio-secret\n" +"            key: AWS_REGION\n" +"      - name: AWS_ACCESS_KEY_ID\n" +"        valueFrom:\n" +"          secretKeyRef:\n" +"            name: minio-secret\n" +"            key: AWS_ACCESS_KEY_ID\n" +"      - name: AWS_SECRET_ACCESS_KEY\n" +"        valueFrom:\n" +"          secretKeyRef:\n" +"            name: minio-secret\n" +"            key: AWS_SECRET_ACCESS_KEY\n" +"      - name: MINIO_ENDPOINT\n" +"        valueFrom:\n" +"          secretKeyRef:\n" +"            name: minio-secret\n" +"            key: MINIO_ENDPOINT\n" +"      - name: MINIO_HOST\n" +"        valueFrom:\n" +"          secretKeyRef:\n" +"            name: minio-secret\n" +"            key: MINIO_HOST\n" +"      - name: BUCKET_NAME\n" +"        valueFrom:\n" +"          secretKeyRef:\n" +"            name: minio-secret\n" +"            key: BUCKET_NAME\n" +"  sparkConf:\n" +"    spark.query.sql: \"%s\"",taskName,sparkImage,mainClass,sparkJarFile,driverCpu,driverMemory,executorCpu,instance,executorMemory,dynamicSQLQuery);}private static void submitSparkApplicationFabi2(String sparkApplicationYAML) throws Exception{try (KubernetesClient client = new KubernetesClientBuilder().build()) {//默认读取~/.kube/config的配置CustomResourceDefinitionContext animalCrdContext = new CustomResourceDefinitionContext.Builder().withName("sparkapplications.sparkoperator.k8s.io").withGroup("sparkoperator.k8s.io").withKind("SparkApplication").withScope("Namespaced").withVersion("v1beta2").withPlural("sparkapplications").build();GenericKubernetesResource cr3 = Serialization.unmarshal(sparkApplicationYAML, GenericKubernetesResource.class);client.genericKubernetesResources(animalCrdContext).inNamespace("spark-app").resource(cr3).create();System.out.println("over");} catch (Exception e) {e.printStackTrace();}}}

实际的生成的yaml

apiVersion: "sparkoperator.k8s.io/v1beta2"
kind: SparkApplication
metadata:name: zy-sparknamespace: spark-app
spec:type: Scalamode: clusterimage: "10.38.199.203:1443/fhc/zy-spark:v0.1"  //以openlake/spark镜像为基准的本地镜像imagePullPolicy: AlwaysimagePullSecrets: ["harbor"]mainClass: com.seagate.client.zyspark.SparkDemo //主程序入口mainApplicationFile: "local:///app/sparkcode/zyspark-0.0.1-SNAPSHOT.jar"  //主程序sparkVersion: "3.3.1"restartPolicy:type: Nevervolumes:- name: nfs-spark-volumepersistentVolumeClaim:claimName: sparkcodedriver:cores: 1coreLimit: "1200m"memory: "2G"labels:version: 3.3.1serviceAccount: spark-svc-accountvolumeMounts:- name: nfs-spark-volumemountPath: "/app/sparkcode"env:    //以下为minio的访问参数- name: AWS_REGIONvalueFrom:secretKeyRef:name: minio-secretkey: AWS_REGION- name: AWS_ACCESS_KEY_IDvalueFrom:secretKeyRef:name: minio-secretkey: AWS_ACCESS_KEY_ID- name: AWS_SECRET_ACCESS_KEYvalueFrom:secretKeyRef:name: minio-secretkey: AWS_SECRET_ACCESS_KEY- name: MINIO_ENDPOINTvalueFrom:secretKeyRef:name: minio-secretkey: MINIO_ENDPOINT- name: MINIO_HOSTvalueFrom:secretKeyRef:name: minio-secretkey: MINIO_HOST- name: BUCKET_NAMEvalueFrom:secretKeyRef:name: minio-secretkey: BUCKET_NAMEexecutor:cores: 1instances: 10memory: "1G"labels:version: 3.3.1volumeMounts:- name: nfs-spark-volumemountPath: "/app/sparkcode"env:- name: AWS_REGIONvalueFrom:secretKeyRef:name: minio-secretkey: AWS_REGION- name: AWS_ACCESS_KEY_IDvalueFrom:secretKeyRef:name: minio-secretkey: AWS_ACCESS_KEY_ID- name: AWS_SECRET_ACCESS_KEYvalueFrom:secretKeyRef:name: minio-secretkey: AWS_SECRET_ACCESS_KEY- name: MINIO_ENDPOINTvalueFrom:secretKeyRef:name: minio-secretkey: MINIO_ENDPOINT- name: MINIO_HOSTvalueFrom:secretKeyRef:name: minio-secretkey: MINIO_HOST- name: BUCKET_NAMEvalueFrom:secretKeyRef:name: minio-secretkey: BUCKET_NAMEsparkConf:spark.query.sql: "select * from  cimarronbp_n.p025_load_stat limit 10" //传入的sql

三:传入参数,调用restful接口(Client)

public static void main(String[] args) throws Exception{Map<String,Object> param = new HashMap<String, Object>();param.put("taskName", "spark"+System.currentTimeMillis());param.put("sparkImage", "10.38.199.203:1443/fhc/zy-spark:v0.1");param.put("mainClass", "com.seagate.client.zyspark.SparkDemo");param.put("sparkJarFile", "local:///app/sparkcode/zyspark-0.0.1-SNAPSHOT.jar");param.put("driverCpu", "1");param.put("driverMemory", "1G");param.put("executorCpu", "1");param.put("instance", "5");param.put("executorMemory", "2G");param.put("dynamicSQLQuery", "select * from  cimarronbp_n.p025_load_stat limit 10");callSparkSqk(JSONObject.toJSON(param));
}

四:查看log

查看rancher的spark-app的namesapce下面,生成了driver和executor 的pod

查看driver的log,生成了453个task

++ id -u
+ myuid=1000
++ id -g
+ mygid=1000
+ set +e
++ getent passwd 1000
+ uidentry=hive:x:1000:1000::/home/hive:/bin/bash
+ set -e
+ '[' -z hive:x:1000:1000::/home/hive:/bin/bash ']'
+ '[' -z /usr/local/openjdk-11 ']'
+ SPARK_CLASSPATH=':/opt/spark/jars/*'
+ env
+ sort -t_ -k4 -n
+ grep SPARK_JAVA_OPT_
+ sed 's/[^=]*=\(.*\)/\1/g'
+ readarray -t SPARK_EXECUTOR_JAVA_OPTS
+ '[' -n '' ']'
+ '[' -z ']'
+ '[' -z ']'
+ '[' -n '' ']'
+ '[' -z ']'
+ '[' -z x ']'
+ SPARK_CLASSPATH='/opt/spark/conf::/opt/spark/jars/*'
+ case "$1" in
+ shift 1
+ CMD=("$SPARK_HOME/bin/spark-submit" --conf "spark.driver.bindAddress=$SPARK_DRIVER_BIND_ADDRESS" --deploy-mode client "$@")
+ exec /usr/bin/tini -s -- /opt/spark/bin/spark-submit --conf spark.driver.bindAddress=10.42.2.226 --deploy-mode client --properties-file /opt/spark/conf/spark.properties --class com.seagate.client.zyspark.SparkDemo local:///app/sparkcode/zyspark-0.0.1-SNAPSHOT.jar
24/01/24 07:31:21 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
=========================1
===========================2
24/01/24 07:31:21 INFO HiveConf: Found configuration file null
24/01/24 07:31:22 INFO SparkContext: Running Spark version 3.3.2
24/01/24 07:31:22 INFO ResourceUtils: ==============================================================
24/01/24 07:31:22 INFO ResourceUtils: No custom resources configured for spark.driver.
24/01/24 07:31:22 INFO ResourceUtils: ==============================================================
24/01/24 07:31:22 INFO SparkContext: Submitted application: spark1706081470242
24/01/24 07:31:22 INFO ResourceProfile: Default ResourceProfile created, executor resources: Map(cores -> name: cores, amount: 1, script: , vendor: , memory -> name: memory, amount: 2048, script: , vendor: , offHeap -> name: offHeap, amount: 0, script: , vendor: ), task resources: Map(cpus -> name: cpus, amount: 1.0)
24/01/24 07:31:22 INFO ResourceProfile: Limiting resource is cpus at 1 tasks per executor
24/01/24 07:31:22 INFO ResourceProfileManager: Added ResourceProfile id: 0
24/01/24 07:31:22 INFO SecurityManager: Changing view acls to: hive,root
24/01/24 07:31:22 INFO SecurityManager: Changing modify acls to: hive,root
24/01/24 07:31:22 INFO SecurityManager: Changing view acls groups to: 
24/01/24 07:31:22 INFO SecurityManager: Changing modify acls groups to: 
24/01/24 07:31:22 INFO SecurityManager: SecurityManager: authentication disabled; ui acls disabled; users  with view permissions: Set(hive, root); groups with view permissions: Set(); users  with modify permissions: Set(hive, root); groups with modify permissions: Set()
24/01/24 07:31:22 INFO Utils: Successfully started service 'sparkDriver' on port 7078.
24/01/24 07:31:22 INFO SparkEnv: Registering MapOutputTracker
24/01/24 07:31:22 INFO SparkEnv: Registering BlockManagerMaster
24/01/24 07:31:23 INFO BlockManagerMasterEndpoint: Using org.apache.spark.storage.DefaultTopologyMapper for getting topology information
24/01/24 07:31:23 INFO BlockManagerMasterEndpoint: BlockManagerMasterEndpoint up
24/01/24 07:31:23 INFO SparkEnv: Registering BlockManagerMasterHeartbeat
24/01/24 07:31:23 INFO DiskBlockManager: Created local directory at /var/data/spark-f47fd19b-5ec5-4ed4-9bb8-d43710f560da/blockmgr-823ae0ab-d2a2-4448-a920-2c80674a13c4
24/01/24 07:31:23 INFO MemoryStore: MemoryStore started with capacity 413.9 MiB
24/01/24 07:31:23 INFO SparkEnv: Registering OutputCommitCoordinator
24/01/24 07:31:23 INFO Utils: Successfully started service 'SparkUI' on port 4040.
24/01/24 07:31:23 INFO SparkContext: Added JAR local:///app/sparkcode/zyspark-0.0.1-SNAPSHOT.jar at file:/app/sparkcode/zyspark-0.0.1-SNAPSHOT.jar with timestamp 1706081482116
24/01/24 07:31:23 INFO SparkContext: The JAR local:///app/sparkcode/zyspark-0.0.1-SNAPSHOT.jar at file:/app/sparkcode/zyspark-0.0.1-SNAPSHOT.jar has been added already. Overwriting of added jar is not supported in the current version.
24/01/24 07:31:23 INFO SparkKubernetesClientFactory: Auto-configuring K8S client using current context from users K8S config file
24/01/24 07:31:25 INFO ExecutorPodsAllocator: Going to request 5 executors from Kubernetes for ResourceProfile Id: 0, target: 5, known: 0, sharedSlotFromPendingPods: 2147483647.
24/01/24 07:31:25 INFO BasicExecutorFeatureStep: Decommissioning not enabled, skipping shutdown script
24/01/24 07:31:26 INFO Utils: Successfully started service 'org.apache.spark.network.netty.NettyBlockTransferService' on port 7079.
24/01/24 07:31:26 INFO NettyBlockTransferService: Server created on spark1706081470242-7219f68d3a6157ef-driver-svc.spark-app.svc:7079
24/01/24 07:31:26 INFO BlockManager: Using org.apache.spark.storage.RandomBlockReplicationPolicy for block replication policy
24/01/24 07:31:26 INFO BlockManagerMaster: Registering BlockManager BlockManagerId(driver, spark1706081470242-7219f68d3a6157ef-driver-svc.spark-app.svc, 7079, None)
24/01/24 07:31:26 INFO BlockManagerMasterEndpoint: Registering block manager spark1706081470242-7219f68d3a6157ef-driver-svc.spark-app.svc:7079 with 413.9 MiB RAM, BlockManagerId(driver, spark1706081470242-7219f68d3a6157ef-driver-svc.spark-app.svc, 7079, None)
24/01/24 07:31:26 INFO BlockManagerMaster: Registered BlockManager BlockManagerId(driver, spark1706081470242-7219f68d3a6157ef-driver-svc.spark-app.svc, 7079, None)
24/01/24 07:31:26 INFO BlockManager: Initialized BlockManager: BlockManagerId(driver, spark1706081470242-7219f68d3a6157ef-driver-svc.spark-app.svc, 7079, None)
24/01/24 07:31:26 INFO BasicExecutorFeatureStep: Decommissioning not enabled, skipping shutdown script
24/01/24 07:31:26 INFO BasicExecutorFeatureStep: Decommissioning not enabled, skipping shutdown script
24/01/24 07:31:26 INFO BasicExecutorFeatureStep: Decommissioning not enabled, skipping shutdown script
24/01/24 07:31:26 INFO BasicExecutorFeatureStep: Decommissioning not enabled, skipping shutdown script
24/01/24 07:31:30 INFO KubernetesClusterSchedulerBackend$KubernetesDriverEndpoint: Registered executor NettyRpcEndpointRef(spark-client://Executor) (10.42.4.3:50280) with ID 3,  ResourceProfileId 0
24/01/24 07:31:30 INFO BlockManagerMasterEndpoint: Registering block manager 10.42.4.3:38355 with 1048.8 MiB RAM, BlockManagerId(3, 10.42.4.3, 38355, None)
24/01/24 07:31:30 INFO KubernetesClusterSchedulerBackend$KubernetesDriverEndpoint: Registered executor NettyRpcEndpointRef(spark-client://Executor) (10.42.3.163:33768) with ID 2,  ResourceProfileId 0
24/01/24 07:31:30 INFO BlockManagerMasterEndpoint: Registering block manager 10.42.3.163:40237 with 1048.8 MiB RAM, BlockManagerId(2, 10.42.3.163, 40237, None)
24/01/24 07:31:30 INFO KubernetesClusterSchedulerBackend$KubernetesDriverEndpoint: Registered executor NettyRpcEndpointRef(spark-client://Executor) (10.42.7.131:56864) with ID 5,  ResourceProfileId 0
24/01/24 07:31:30 INFO BlockManagerMasterEndpoint: Registering block manager 10.42.7.131:45533 with 1048.8 MiB RAM, BlockManagerId(5, 10.42.7.131, 45533, None)
24/01/24 07:31:30 INFO KubernetesClusterSchedulerBackend$KubernetesDriverEndpoint: Registered executor NettyRpcEndpointRef(spark-client://Executor) (10.42.2.227:52014) with ID 4,  ResourceProfileId 0
24/01/24 07:31:31 INFO KubernetesClusterSchedulerBackend: SchedulerBackend is ready for scheduling beginning after reached minRegisteredResourcesRatio: 0.8
sparkSession create cost:9290
==============================3
==============================3.1:select * from  cimarronbp_n.p025_load_stat limit 10
Hive Metastore URI: thrift://10.40.8.200:5000
Hive Warehouse Directory: /opt/spark/work-dir/spark-warehouse
SHOW DATABASES==============================3.1:select * from  cimarronbp_n.p025_load_stat limit 10
24/01/24 07:31:31 INFO BlockManagerMasterEndpoint: Registering block manager 10.42.2.227:43975 with 1048.8 MiB RAM, BlockManagerId(4, 10.42.2.227, 43975, None)
24/01/24 07:31:31 INFO SharedState: Setting hive.metastore.warehouse.dir ('null') to the value of spark.sql.warehouse.dir.
24/01/24 07:31:31 INFO SharedState: Warehouse path is 'file:/opt/spark/work-dir/spark-warehouse'.
24/01/24 07:31:31 INFO KubernetesClusterSchedulerBackend$KubernetesDriverEndpoint: Registered executor NettyRpcEndpointRef(spark-client://Executor) (10.42.6.99:42804) with ID 1,  ResourceProfileId 0
24/01/24 07:31:31 INFO BlockManagerMasterEndpoint: Registering block manager 10.42.6.99:36793 with 1048.8 MiB RAM, BlockManagerId(1, 10.42.6.99, 36793, None)
24/01/24 07:31:36 INFO HiveUtils: Initializing HiveMetastoreConnection version 2.3.9 using Spark classes.
24/01/24 07:31:36 INFO HiveClientImpl: Warehouse location for Hive client (version 2.3.9) is file:/opt/spark/work-dir/spark-warehouse
24/01/24 07:31:36 INFO metastore: Trying to connect to metastore with URI thrift://10.40.8.200:5000
24/01/24 07:31:36 INFO metastore: Opened a connection to metastore, current connections: 1
24/01/24 07:31:36 INFO metastore: Connected to metastore.
24/01/24 07:31:37 INFO CodeGenerator: Code generated in 329.422595 ms
24/01/24 07:31:37 INFO CodeGenerator: Code generated in 8.039488 ms
24/01/24 07:31:37 INFO CodeGenerator: Code generated in 8.313137 ms
+------------+
|   namespace|
+------------+
|  cimarronbp|
|cimarronbp_n|
|     default|
|        idat|
|     mintest|
|mintestsmall|
|         ods|
+------------+sparkSession sql:396
======================4
24/01/24 07:31:38 INFO DataSourceStrategy: Pruning directories with: 
24/01/24 07:31:39 INFO CodeGenerator: Code generated in 11.76912 ms
24/01/24 07:31:39 INFO SQLStdHiveAccessController: Created SQLStdHiveAccessController for session context : HiveAuthzSessionContext [sessionString=486be1dc-3907-49cb-ad05-f4200a382ae5, clientType=HIVECLI]
24/01/24 07:31:39 WARN SessionState: METASTORE_FILTER_HOOK will be ignored, since hive.security.authorization.manager is set to instance of HiveAuthorizerFactory.
24/01/24 07:31:39 INFO metastore: Mestastore configuration hive.metastore.filter.hook changed from org.apache.hadoop.hive.metastore.DefaultMetaStoreFilterHookImpl to org.apache.hadoop.hive.ql.security.authorization.plugin.AuthorizationMetaStoreFilterHook
24/01/24 07:31:39 INFO metastore: Closed a connection to metastore, current connections: 0
24/01/24 07:31:39 INFO metastore: Trying to connect to metastore with URI thrift://10.40.8.200:5000
24/01/24 07:31:39 INFO metastore: Opened a connection to metastore, current connections: 1
24/01/24 07:31:39 INFO metastore: Connected to metastore.
24/01/24 07:31:39 INFO MemoryStore: Block broadcast_0 stored as values in memory (estimated size 215.8 KiB, free 413.7 MiB)
24/01/24 07:31:39 INFO MemoryStore: Block broadcast_0_piece0 stored as bytes in memory (estimated size 36.3 KiB, free 413.7 MiB)
24/01/24 07:31:39 INFO BlockManagerInfo: Added broadcast_0_piece0 in memory on spark1706081470242-7219f68d3a6157ef-driver-svc.spark-app.svc:7079 (size: 36.3 KiB, free: 413.9 MiB)
24/01/24 07:31:39 INFO SparkContext: Created broadcast 0 from 
24/01/24 07:31:39 INFO metastore: Trying to connect to metastore with URI thrift://10.40.8.200:5000
24/01/24 07:31:39 INFO metastore: Opened a connection to metastore, current connections: 2
24/01/24 07:31:39 INFO metastore: Connected to metastore.
24/01/24 07:31:50 WARN MetricsConfig: Cannot locate configuration: tried hadoop-metrics2-s3a-file-system.properties,hadoop-metrics2.properties
24/01/24 07:31:50 INFO MetricsSystemImpl: Scheduled Metric snapshot period at 10 second(s).24/01/24 07:31:58 INFO DAGScheduler: Registering RDD 1248 (count at SparkDemo.java:443) as input to shuffle 0
24/01/24 07:31:58 INFO DAGScheduler: Got map stage job 0 (count at SparkDemo.java:443) with 453 output partitions
24/01/24 07:31:58 INFO DAGScheduler: Final stage: ShuffleMapStage 0 (count at SparkDemo.java:443)
24/01/24 07:31:58 INFO DAGScheduler: Parents of final stage: List()
24/01/24 07:31:58 INFO DAGScheduler: Missing parents: List()
24/01/24 07:31:58 INFO DAGScheduler: Submitting ShuffleMapStage 0 (MapPartitionsRDD[1248] at count at SparkDemo.java:443), which has no missing parents
24/01/24 07:31:59 INFO MemoryStore: Block broadcast_1 stored as values in memory (estimated size 416.1 KiB, free 413.3 MiB)
24/01/24 07:31:59 INFO MemoryStore: Block broadcast_1_piece0 stored as bytes in memory (estimated size 64.4 KiB, free 413.2 MiB)
24/01/24 07:31:59 INFO BlockManagerInfo: Added broadcast_1_piece0 in memory on spark1706081470242-7219f68d3a6157ef-driver-svc.spark-app.svc:7079 (size: 64.4 KiB, free: 413.8 MiB)
24/01/24 07:31:59 INFO SparkContext: Created broadcast 1 from broadcast at DAGScheduler.scala:1513
24/01/24 07:31:59 INFO DAGScheduler: Submitting 453 missing tasks from ShuffleMapStage 0 (MapPartitionsRDD[1248] at count at SparkDemo.java:443) (first 15 tasks are for partitions Vector(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14))
24/01/24 07:31:59 INFO TaskSchedulerImpl: Adding task set 0.0 with 453 tasks resource profile 0
24/01/24 07:31:59 INFO TaskSetManager: Starting task 0.0 in stage 0.0 (TID 0) (10.42.2.227, executor 4, partition 0, PROCESS_LOCAL, 4708 bytes) taskResourceAssignments Map()
24/01/24 07:31:59 INFO TaskSetManager: Starting task 1.0 in stage 0.0 (TID 1) (10.42.6.99, executor 1, partition 1, PROCESS_LOCAL, 4710 bytes) taskResourceAssignments Map()
24/01/24 07:31:59 INFO TaskSetManager: Starting task 2.0 in stage 0.0 (TID 2) (10.42.4.3, executor 3, partition 2, PROCESS_LOCAL, 4712 bytes) taskResourceAssignments Map()
24/01/24 07:31:59 INFO TaskSetManager: Starting task 3.0 in stage 0.0 (TID 3) (10.42.7.131, executor 5, partition 3, PROCESS_LOCAL, 4712 bytes) taskResourceAssignments Map()
24/01/24 07:31:59 INFO TaskSetManager: Starting task 4.0 in stage 0.0 (TID 4) (10.42.3.163, executor 2, partition 4, PROCESS_LOCAL, 4710 bytes) taskResourceAssignments Map()
24/01/24 07:31:59 INFO BlockManagerInfo: Added broadcast_1_piece0 in memory on 10.42.7.131:45533 (size: 64.4 KiB, free: 1048.7 MiB)
24/01/24 07:31:59 INFO BlockManagerInfo: Added broadcast_1_piece0 in memory on 10.42.3.163:40237 (size: 64.4 KiB, free: 1048.7 MiB)
24/01/24 07:31:59 INFO BlockManagerInfo: Added broadcast_1_piece0 in memory on 10.42.2.227:43975 (size: 64.4 KiB, free: 1048.7 MiB)
24/01/24 07:31:59 INFO BlockManagerInfo: Added broadcast_1_piece0 in memory on 10.42.4.3:38355 (size: 64.4 KiB, free: 1048.7 MiB)
24/01/24 07:31:59 INFO BlockManagerInfo: Added broadcast_1_piece0 in memory on 10.42.6.99:36793 (size: 64.4 KiB, free: 1048.7 MiB)
24/01/24 07:31:59 INFO BlockManagerInfo: Added broadcast_0_piece0 in memory on 10.42.4.3:38355 (size: 36.3 KiB, free: 1048.7 MiB)
24/01/24 07:32:00 INFO BlockManagerInfo: Added broadcast_0_piece0 in memory on 10.42.7.131:45533 (size: 36.3 KiB, free: 1048.7 MiB)
24/01/24 07:32:00 INFO BlockManagerInfo: Added broadcast_0_piece0 in memory on 10.42.2.227:43975 (size: 36.3 KiB, free: 1048.7 MiB)
24/01/24 07:32:00 INFO BlockManagerInfo: Added broadcast_0_piece0 in memory on 10.42.3.163:40237 (size: 36.3 KiB, free: 1048.7 MiB)
24/01/24 07:32:00 INFO BlockManagerInfo: Added broadcast_0_piece0 in memory on 10.42.6.99:36793 (size: 36.3 KiB, free: 1048.7 MiB)
24/01/24 07:32:02 INFO TaskSetManager: Starting task 5.0 in stage 0.0 (TID 5) (10.42.4.3, executor 3, partition 5, PROCESS_LOCAL, 4712 bytes) taskResourceAssignments Map()
24/01/24 07:32:02 INFO TaskSetManager: Finished task 2.0 in stage 0.0 (TID 2) in 2932 ms on 10.42.4.3 (executor 3) (1/453)
24/01/24 07:32:02 INFO TaskSetManager: Starting task 6.0 in stage 0.0 (TID 6) (10.42.2.227, executor 4, partition 6, PROCESS_LOCAL, 4712 bytes) taskResourceAssignments Map()
24/01/24 07:32:02 INFO TaskSetManager: Finished task 0.0 in stage 0.0 (TID 0) in 2991 ms on 10.42.2.227 (executor 4) (2/453)
24/01/24 07:32:02 INFO TaskSetManager: Starting task 7.0 in stage 0.0 (TID 7) (10.42.3.163, executor 2, partition 7, PROCESS_LOCAL, 4710 bytes) taskResourceAssignments Map()
24/01/24 07:32:02 INFO TaskSetManager: Finished task 4.0 in stage 0.0 (TID 4) in 3004 ms on 10.42.3.163 (executor 2) (3/453)
24/01/24 07:32:02 INFO TaskSetManager: Starting task 8.0 in stage 0.0 (TID 8) (10.42.4.3, executor 3, partition 8, PROCESS_LOCAL, 4710 bytes) taskResourceAssignments Map()
24/01/24 07:32:02 INFO TaskSetManager: Finished task 5.0 in stage 0.0 (TID 5) in 130 ms on 10.42.4.3 (executor 3) (4/453)
24/01/24 07:32:02 INFO TaskSetManager: Starting task 9.0 in stage 0.0 (TID 9) (10.42.7.131, executor 5, partition 9, PROCESS_LOCAL, 4708 bytes) taskResourceAssignments Map()
24/01/24 07:32:02 INFO TaskSetManager: Finished task 3.0 in stage 0.0 (TID 3) in 3107 ms on 10.42.7.131 (executor 5) (5/453)
24/01/24 07:32:02 INFO TaskSetManager: Starting task 10.0 in stage 0.0 (TID 10) (10.42.3.163, executor 2, partition 10, PROCESS_LOCAL, 4709 bytes) taskResourceAssignments Map()
24/01/24 07:32:02 INFO TaskSetManager: Finished task 7.0 in stage 0.0 (TID 7) in 134 ms on 10.42.3.163 (executor 2) (6/453)
24/01/24 07:32:02 INFO TaskSetManager: Starting task 11.0 in stage 0.0 (TID 11) (10.42.4.3, executor 3, partition 11, PROCESS_LOCAL, 4711 bytes) taskResourceAssignments Map()
24/01/24 07:32:02 INFO TaskSetManager: Finished task 8.0 in stage 0.0 (TID 8) in 100 ms on 10.42.4.3 (executor 3) (7/453)
24/01/24 07:32:02 INFO TaskSetManager: Starting task 12.0 in stage 0.0 (TID 12) (10.42.7.131, executor 5, partition 12, PROCESS_LOCAL, 4708 bytes) taskResourceAssignments Map()
24/01/24 07:32:02 INFO TaskSetManager: Finished task 9.0 in stage 0.0 (TID 9) in 97 ms on 10.42.7.131 (executor 5) (8/453)
24/01/24 07:32:02 INFO TaskSetManager: Starting task 13.0 in stage 0.0 (TID 13) (10.42.3.163, executor 2, partition 13, PROCESS_LOCAL, 4708 bytes) taskResourceAssignments Map()
24/01/24 07:32:02 INFO TaskSetManager: Finished task 10.0 in stage 0.0 (TID 10) in 87 ms on 10.42.3.163 (executor 2) (9/453)
24/01/24 07:32:02 INFO TaskSetManager: Starting task 14.0 in stage 0.0 (TID 14) (10.42.4.3, executor 3, partition 14, PROCESS_LOCAL, 4713 bytes) taskResourceAssignments Map()...........24/01/24 07:32:18 INFO DAGScheduler: Final stage: ResultStage 3 (show at SparkDemo.java:445)
24/01/24 07:32:18 INFO DAGScheduler: Parents of final stage: List()
24/01/24 07:32:18 INFO DAGScheduler: Missing parents: List()
24/01/24 07:32:18 INFO DAGScheduler: Submitting ResultStage 3 (MapPartitionsRDD[2499] at show at SparkDemo.java:445), which has no missing parents
24/01/24 07:32:18 INFO MemoryStore: Block broadcast_4 stored as values in memory (estimated size 565.9 KiB, free 413.1 MiB)
24/01/24 07:32:18 INFO MemoryStore: Block broadcast_4_piece0 stored as bytes in memory (estimated size 79.7 KiB, free 413.0 MiB)
24/01/24 07:32:18 INFO BlockManagerInfo: Added broadcast_4_piece0 in memory on spark1706081470242-7219f68d3a6157ef-driver-svc.spark-app.svc:7079 (size: 79.7 KiB, free: 413.8 MiB)
24/01/24 07:32:18 INFO SparkContext: Created broadcast 4 from broadcast at DAGScheduler.scala:1513
24/01/24 07:32:18 INFO DAGScheduler: Submitting 1 missing tasks from ResultStage 3 (MapPartitionsRDD[2499] at show at SparkDemo.java:445) (first 15 tasks are for partitions Vector(0))
24/01/24 07:32:18 INFO TaskSchedulerImpl: Adding task set 3.0 with 1 tasks resource profile 0
24/01/24 07:32:18 INFO TaskSetManager: Starting task 0.0 in stage 3.0 (TID 454) (10.42.3.163, executor 2, partition 0, PROCESS_LOCAL, 4722 bytes) taskResourceAssignments Map()
24/01/24 07:32:18 INFO BlockManagerInfo: Added broadcast_4_piece0 in memory on 10.42.3.163:40237 (size: 79.7 KiB, free: 1048.7 MiB)
24/01/24 07:32:19 INFO BlockManagerInfo: Added broadcast_3_piece0 in memory on 10.42.3.163:40237 (size: 36.4 KiB, free: 1048.7 MiB)
24/01/24 07:32:19 INFO TaskSetManager: Finished task 0.0 in stage 3.0 (TID 454) in 323 ms on 10.42.3.163 (executor 2) (1/1)
24/01/24 07:32:19 INFO TaskSchedulerImpl: Removed TaskSet 3.0, whose tasks have all completed, from pool 
24/01/24 07:32:19 INFO DAGScheduler: ResultStage 3 (show at SparkDemo.java:445) finished in 0.346 s
24/01/24 07:32:19 INFO DAGScheduler: Job 2 is finished. Cancelling potential speculative or zombie tasks for this job
24/01/24 07:32:19 INFO TaskSchedulerImpl: Killing all running tasks in stage 3: Stage finished
24/01/24 07:32:19 INFO DAGScheduler: Job 2 finished: show at SparkDemo.java:445, took 0.362538 s
24/01/24 07:32:19 INFO CodeGenerator: Code generated in 23.175128 ms
+----------+---------+--------------+------+----------+---+--------------+---------+---------+-------------+-------------+----------+----------+------+---------+
|serial_num|trans_seq|    state_name|spc_id|occurrence|seq|test_seq_event|stat_name|load_time|load_peak_cur|load_peak_vel|vcm_offset|event_date|family|operation|
+----------+---------+--------------+------+----------+---+--------------+---------+---------+-------------+-------------+----------+----------+------+---------+
|  WP01C6DB|       53|LUL_TEST25_SCS| 30101|         1| 17|             1|      MAX|    156.5|       -511.4|         -3.2|   65535.0|  20231202|   3AK|     CRT2|
|  WP01C6DB|       53|LUL_TEST25_SCS| 30101|         1| 17|             1|      MIN|    156.5|       -511.4|         -3.2|   65535.0|  20231202|   3AK|     CRT2|
|  WP01C6DB|       53|LUL_TEST25_SCS| 30101|         1| 17|             1|      AVG|    156.5|       -511.4|         -3.2|   65535.0|  20231202|   3AK|     CRT2|
|  WP01C6DB|       53|LUL_TEST25_SCS| 30101|         1| 17|             1|    STDEV|      0.0|          0.0|          0.0|   65535.0|  20231202|   3AK|     CRT2|
|  WP01C6DB|       53|LUL_TEST25_SCS| 30101|         1| 17|             1|   ERRCNT|      0.0|          0.0|          0.0|       0.0|  20231202|   3AK|     CRT2|
|  WP0187VM|       51|LUL_TEST25_SCS| 30101|         1| 17|             1|      MAX|    152.2|       -512.9|         -3.1|   65535.0|  20231202|   3AK|     CRT2|
|  WP0187VM|       51|LUL_TEST25_SCS| 30101|         1| 17|             1|      MIN|    152.2|       -512.9|         -3.1|   65535.0|  20231202|   3AK|     CRT2|
|  WP0187VM|       51|LUL_TEST25_SCS| 30101|         1| 17|             1|      AVG|    152.2|       -512.9|         -3.1|   65535.0|  20231202|   3AK|     CRT2|
|  WP0187VM|       51|LUL_TEST25_SCS| 30101|         1| 17|             1|    STDEV|      0.0|          0.0|          0.0|   65535.0|  20231202|   3AK|     CRT2|
|  WP0187VM|       51|LUL_TEST25_SCS| 30101|         1| 17|             1|   ERRCNT|      0.0|          0.0|          0.0|       0.0|  20231202|   3AK|     CRT2|
+----------+---------+--------------+------+----------+---+--------------+---------+---------+-------------+-------------+----------+----------+------+---------+24/01/24 07:32:19 INFO DataSourceStrategy: Pruning directories with: 
24/01/24 07:32:19 INFO CodeGenerator: Code generated in 71.006193 ms
24/01/24 07:32:19 INFO MemoryStore: Block broadcast_5 stored as values in memory (estimated size 216.0 KiB, free 412.8 MiB)
24/01/24 07:32:19 INFO MemoryStore: Block broadcast_5_piece0 stored as bytes in memory (estimated size 36.4 KiB, free 412.8 MiB)
24/01/24 07:32:19 INFO BlockManagerInfo: Added broadcast_5_piece0 in memory on spark1706081470242-7219f68d3a6157ef-driver-svc.spark-app.svc:7079 (size: 36.4 KiB, free: 413.8 MiB)
24/01/24 07:32:19 INFO SparkContext: Created broadcast 5 from 
24/01/24 07:32:22 INFO BlockManagerInfo: Removed broadcast_4_piece0 on spark1706081470242-7219f68d3a6157ef-driver-svc.spark-app.svc:7079 in memory (size: 79.7 KiB, free: 413.9 MiB)
24/01/24 07:32:22 INFO BlockManagerInfo: Removed broadcast_4_piece0 on 10.42.3.163:40237 in memory (size: 79.7 KiB, free: 1048.8 MiB).................24/01/24 07:32:32 INFO DAGScheduler: looking for newly runnable stages
24/01/24 07:32:32 INFO DAGScheduler: running: Set()
24/01/24 07:32:32 INFO DAGScheduler: waiting: Set()
24/01/24 07:32:32 INFO DAGScheduler: failed: Set()
24/01/24 07:32:32 INFO CodeGenerator: Code generated in 17.641789 ms
24/01/24 07:32:32 INFO SparkContext: Starting job: collect at SparkDemo.java:448
24/01/24 07:32:32 INFO DAGScheduler: Got job 4 (collect at SparkDemo.java:448) with 1 output partitions
24/01/24 07:32:32 INFO DAGScheduler: Final stage: ResultStage 6 (collect at SparkDemo.java:448)
24/01/24 07:32:32 INFO DAGScheduler: Parents of final stage: List(ShuffleMapStage 5)
24/01/24 07:32:32 INFO DAGScheduler: Missing parents: List()
24/01/24 07:32:32 INFO DAGScheduler: Submitting ResultStage 6 (MapPartitionsRDD[3753] at javaRDD at SparkDemo.java:448), which has no missing parents
24/01/24 07:32:32 INFO MemoryStore: Block broadcast_7 stored as values in memory (estimated size 40.2 KiB, free 412.8 MiB)
24/01/24 07:32:32 INFO MemoryStore: Block broadcast_7_piece0 stored as bytes in memory (estimated size 17.0 KiB, free 412.7 MiB)
24/01/24 07:32:32 INFO BlockManagerInfo: Added broadcast_7_piece0 in memory on spark1706081470242-7219f68d3a6157ef-driver-svc.spark-app.svc:7079 (size: 17.0 KiB, free: 413.8 MiB)
24/01/24 07:32:32 INFO SparkContext: Created broadcast 7 from broadcast at DAGScheduler.scala:1513
24/01/24 07:32:32 INFO DAGScheduler: Submitting 1 missing tasks from ResultStage 6 (MapPartitionsRDD[3753] at javaRDD at SparkDemo.java:448) (first 15 tasks are for partitions Vector(0))
24/01/24 07:32:32 INFO TaskSchedulerImpl: Adding task set 6.0 with 1 tasks resource profile 0
24/01/24 07:32:32 INFO TaskSetManager: Starting task 0.0 in stage 6.0 (TID 908) (10.42.7.131, executor 5, partition 0, NODE_LOCAL, 4472 bytes) taskResourceAssignments Map()
24/01/24 07:32:32 INFO BlockManagerInfo: Added broadcast_7_piece0 in memory on 10.42.7.131:45533 (size: 17.0 KiB, free: 1048.7 MiB)
24/01/24 07:32:32 INFO MapOutputTrackerMasterEndpoint: Asked to send map output locations for shuffle 1 to 10.42.7.131:56864
24/01/24 07:32:33 INFO TaskSetManager: Finished task 0.0 in stage 6.0 (TID 908) in 1175 ms on 10.42.7.131 (executor 5) (1/1)
24/01/24 07:32:33 INFO TaskSchedulerImpl: Removed TaskSet 6.0, whose tasks have all completed, from pool 
24/01/24 07:32:33 INFO DAGScheduler: ResultStage 6 (collect at SparkDemo.java:448) finished in 1.183 s
24/01/24 07:32:33 INFO DAGScheduler: Job 4 is finished. Cancelling potential speculative or zombie tasks for this job
24/01/24 07:32:33 INFO TaskSchedulerImpl: Killing all running tasks in stage 6: Stage finished
24/01/24 07:32:33 INFO DAGScheduler: Job 4 finished: collect at SparkDemo.java:448, took 1.191350 s
rdd collect cost:14796
jaList list:10
serial_num is :32
serial_num is :32
serial_num is :32
serial_num is :32
serial_num is :32
serial_num is :32
serial_num is :32
serial_num is :32
serial_num is :32
serial_num is :32
SparkDemo foreach cost:1
=========================5
24/01/24 07:32:34 INFO SparkUI: Stopped Spark web UI at http://spark1706081470242-7219f68d3a6157ef-driver-svc.spark-app.svc:4040
24/01/24 07:32:34 INFO KubernetesClusterSchedulerBackend: Shutting down all executors
24/01/24 07:32:34 INFO KubernetesClusterSchedulerBackend$KubernetesDriverEndpoint: Asking each executor to shut down
24/01/24 07:32:34 WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed.
24/01/24 07:32:34 INFO MapOutputTrackerMasterEndpoint: MapOutputTrackerMasterEndpoint stopped!
24/01/24 07:32:34 INFO MemoryStore: MemoryStore cleared
24/01/24 07:32:34 INFO BlockManager: BlockManager stopped
24/01/24 07:32:34 INFO BlockManagerMaster: BlockManagerMaster stopped
24/01/24 07:32:34 INFO OutputCommitCoordinator$OutputCommitCoordinatorEndpoint: OutputCommitCoordinator stopped!
24/01/24 07:32:34 INFO SparkContext: Successfully stopped SparkContext

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/246886.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

LeetCode 40.组合总和 II

组合总和 II 给定一个候选人编号的集合 candidates 和一个目标数 target &#xff0c;找出 candidates 中所有可以使数字和为 target 的组合。 candidates 中的每个数字在每个组合中只能使用 一次 。 注意&#xff1a;解集不能包含重复的组合。 方法一、回溯 由于题目要求解集…

C语言第十一弹---函数(下)

​ ✨个人主页&#xff1a; 熬夜学编程的小林 &#x1f497;系列专栏&#xff1a; 【C语言详解】 【数据结构详解】 函数 1、嵌套调用和链式访问 1.1、嵌套调用 1.2、链式访问 2、函数的声明和定义 2.1、单个文件 2.2、多个文件 2.3、static 和 extern 2.3.1、static…

机器学习的数据库积累........

https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf1_detection_zoo.md ​​​​​​​ 另一个database:&#xff08;网址:Object Detection Made Easy with TensorFlow Hub: Tutorial&#xff09; Object Detection Made Easy with Ten…

菱形打印和十进制ip转二进制

1.菱形打印 用for循环 #!/bin/bashread -p "请输入菱形的大小:" num #打印向上的等腰三角形 for ((i=1;i<=num;i++)) dofor ((j=num-1;j>=i;j--))doecho -n " " #打印的是前面的空格donefor ((k=1;k<=2*i-1;k++))doecho -n "*" #打印…

蓝桥杯——每日一练(简单题)

题目 问题描述   123321是一个非常特殊的数&#xff0c;它从左边读和从右边读是一样的。   输入一个正整数n&#xff0c; 编程求所有这样的五位和六位十进制数&#xff0c;满足各位数字之和等于n 。 输入格式   输入一行&#xff0c;包含一个正整数n。 输出格式   按从…

基于vue实现待办清单案例

一、需求 新增内容&#xff1b; 删除内容&#xff1b; 统计操作&#xff1b; 清空数据。 示例图&#xff1a; 二、代码演示 1、基础准备 index.css代码 html, body {margin: 0;padding: 0; } body {background: #fff ; } button {margin: 0;padding: 0;border: 0;backgr…

C++ 隐式转换构造函数和explicit 关键字学习

据说在内核代码中,多个地方使用了explicit 关键字;下面看一下; 在 C++ 中,隐式转换构造函数指的是当我们将一种类型的值赋给该类对象时,编译器会自动调用相应的构造函数进行类型转换。这样可以使得不同类型之间能够互相赋值或者传参。 具体来说,当一个类有多个构造函数…

数据结构(1)--> 顺序表

定义&#xff1a; 顺序表存储定义&#xff1a; 把逻辑上相邻的数据元素存储在物理上相邻的存储单元中的存储结构&#xff0c;顺序表功能的实现借助于数组&#xff0c;通过对数组进行封装&#xff0c;从而实现增删查改的功能&#xff0c;严格意义上来说&#xff08;数组无法实现…

vue3+echarts绘制某省区县地图

vue3echarts绘制某省区县地图 工作中经常需要画各种各样的图&#xff0c;echarts是使用最多的工具&#xff0c;接近春节&#xff0c;想把之前画的echarts图做一个整合&#xff0c;方便同事和自己随时使用&#xff0c;因此用vue3专门写了个web项目&#xff0c;考虑之后不断完善…

STM正点mini-新建工程模板,GPIO及寄存器(介绍)

一.新建工程模板(基于固件库) 1.1库函数与寄存器的区别 这里的启动文件都是根据容量来进行区分的 对MDK而言即使include了&#xff0c;也不知道在哪里找头文件 STM32F10X_HD,USE_STDPERIPH_DRIVER 二.新建工程模板(基于寄存器) 上面的大部分配置与固件库的一样 具体可以看手…

第5章 (python深度学习——波斯美女)

第5章 深度学习用于计算机视觉 本章包括以下内容&#xff1a; 理解卷积神经网络&#xff08;convnet&#xff09; 使用数据增强来降低过拟合 使用预训练的卷积神经网络进行特征提取 微调预训练的卷积神经网络 将卷积神经网络学到的内容及其如何做出分类决策可视化 本章将…

【Linux】开始使用 vim 吧!!!

Linux 1 what is vim &#xff1f;2 vim基本概念3 vim的基本操作 &#xff01;3.1 vim的快捷方式3.1.1 复制与粘贴3.1.2 撤销与剪切3.1.3 字符操作 3.2 vim的光标操作3.3 vim的文件操作 总结Thanks♪(&#xff65;ω&#xff65;)&#xff89;感谢阅读下一篇文章见&#xff01;…

成熟的内外网数据交换方案,如何实现跨网传输?

网络迅速发展&#xff0c;我们可以从网络上查找到各式各样的信息&#xff0c;但是同时网络安全问题也随之严重。近几年&#xff0c;各种有关网络安全的新闻不断被报道&#xff0c;数据泄露给很多企业带来了严重打击&#xff0c;不仅是经济损失&#xff0c;严重者还会对企业的声…

SharedPreferences卡顿分析

SP的使用及存在的问题 SharedPreferences(以下简称SP)是Android本地存储的一种方式&#xff0c;是以key-value的形式存储在/data/data/项目包名/shared_prefs/sp_name.xml里&#xff0c;SP的使用示例及源码解析参见&#xff1a;Android本地存储之SharedPreferences源码解析。以…

STM32 PWM驱动设计

单片机学习&#xff01; 目录 文章目录 前言 一、PWM驱动配置步骤 二、代码示例及注意事项 2.1 RCC开启时钟 2.2 配置时基单元 2.3 配置输出比较单元 2.4 配置GPIO 2.5 运行控制 三、PWM周期和占空比计算 总结 前言 PWM本质是利用面积等效原理来改变波形的有效值。 一、PWM驱动…

git安装步骤

安装环境&#xff1a;Windows10 64bit 下载 Git网址 &#xff1a;Git - Downloading Package 版本&#xff1a;Git-2.21.0-64-bit 第一步&#xff1a;双击下载后的Git-2.21.0-64-bit.exe&#xff0c;开始安装 安装开始 第二步&#xff1a;选择安装路径&#xff0c;点击[next]…

2024年美赛数学建模思路 - 案例:退火算法

文章目录 1 退火算法原理1.1 物理背景1.2 背后的数学模型 2 退火算法实现2.1 算法流程2.2算法实现 建模资料 ## 0 赛题思路 &#xff08;赛题出来以后第一时间在CSDN分享&#xff09; https://blog.csdn.net/dc_sinor?typeblog 1 退火算法原理 1.1 物理背景 在热力学上&a…

机器学习之pandas库学习

这里写目录标题 pandas介绍pandas核心数据结构SeriesDataFrameDataFrame的创建列访问列添加列删除行访问行添加行删除数据修改 pandas介绍 pandas是基于NumPy 的一种工具&#xff0c;该工具是为了解决数据分析任务而创建的。Pandas 纳入 了大量库和一些标准的数据模型&#xff…

通过Android Logcat分析firebase崩溃

参考&#xff1a;UnityIL2CPP包Crash闪退利用Android Logcat还原符号表堆栈日志 - 简书 一、安装Android Logcat插件 1、新建空白unity工程&#xff0c;打开PackageManager窗口&#xff0c;菜单栏Window/PackageManager 2、PackageManager中安装Android Logcat日志工具 3、安…

橘子学Mybatis08之Mybatis关于一级缓存的使用和适配器设计模式

前面我们说了mybatis的缓存设计体系&#xff0c;这里我们来正式看一下这玩意到底是咋个用法。 首先我们是知道的&#xff0c;Mybatis中存在两级缓存。分别是一级缓存(会话级)&#xff0c;和二级缓存(全局级)。 下面我们就来看看这两级缓存。 一、准备工作 1、准备数据库 在此之…