上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 68 下一页
摘要: Spark中本身内置了Hive,但一般用于测试,生产环境中需要连接外置的Hive 1.将Hive的配置文件hive-site.xml拷贝到Spark的配置目录下 cp /usr/hive/apache-hive-3.1.3-bin/conf/hive-site.xml /usr/spark/spar 阅读全文
posted @ 2024-01-15 12:06 SpringCore 阅读(262) 评论(0) 推荐(0)
摘要: 本文的前提条件: SparkSQL in Java 参考地址:JDBC To Other Databases 1.POM添加Mysql JDBC驱动 <dependency> <groupId>com.mysql</groupId> <artifactId>mysql-connector-j</ar 阅读全文
posted @ 2024-01-15 10:20 SpringCore 阅读(235) 评论(0) 推荐(0)
摘要: 本文的前提条件: SparkSQL in Java 参考地址:User Defined Aggregate Functions (UDAFs) 1.声明列实体类 package cn.coreqi.entity; import java.io.Serializable; public class U 阅读全文
posted @ 2024-01-14 21:52 SpringCore 阅读(66) 评论(0) 推荐(0)
摘要: 本文的前提条件: SparkSQL in Java 参考地址:User Defined Aggregate Functions (UDAFs) 1.自定义实体类 package cn.coreqi.entity; import java.io.Serializable; public class A 阅读全文
posted @ 2024-01-14 17:45 SpringCore 阅读(84) 评论(0) 推荐(0)
摘要: 本文的前提条件: SparkSQL in Java 代码如下 1.自定义聚合函数 package cn.coreqi.udaf; import org.apache.spark.sql.Row; import org.apache.spark.sql.expressions.MutableAggre 阅读全文
posted @ 2024-01-14 15:33 SpringCore 阅读(41) 评论(0) 推荐(0)
摘要: 本文的前提条件: SparkSQL in Java 参考地址: Scalar User Defined Functions (UDFs) 完整代码 package cn.coreqi; import static org.apache.spark.sql.functions.udf; import 阅读全文
posted @ 2024-01-14 13:16 SpringCore 阅读(39) 评论(0) 推荐(0)
摘要: 参考地址:Starting Point: SparkSession 1.新建Maven项目,POM引入依赖 <dependencies> <dependency> <groupId>org.apache.spark</groupId> <artifactId>spark-core_2.13</art 阅读全文
posted @ 2024-01-14 13:14 SpringCore 阅读(124) 评论(0) 推荐(0)
摘要: 独立部署(Standalone)模式由 Spark 自身提供计算资源,无需其他框架提供资源。这种方式降低了和其他第三方资源框架的耦合性,独立性非常强。但是Spark 主要是计算框架,而不是资源调度框架,所以本身提供的资源调度并不是它的强项,所以还是和其他专业的资源调度框架集成会更靠谱一些。 在国内工 阅读全文
posted @ 2024-01-02 20:59 SpringCore 阅读(191) 评论(0) 推荐(0)
摘要: 1.下载Spark 3.5.0 https://spark.apache.org/downloads.html 2.安装JDK Linux 安装Openjdk 3.安装Hadoop Hadoop-3.3.6分布式集群搭建步骤 4.安装Zookeeper ZooKeeper 3.9.1 集群模式安装 阅读全文
posted @ 2024-01-02 19:44 SpringCore 阅读(963) 评论(0) 推荐(0)
摘要: 1.连接节点 bin/zkCli.sh -server 192.168.58.131:2181 2.命令行语法 命令基本语法 功能描述 help 显示所有操作命令 ls path 使用ls命令来查看当前znode的子节点[可监听]-w 监听子节点变化-s 附加次级信息 create 普通创建-s 含 阅读全文
posted @ 2024-01-02 13:59 SpringCore 阅读(24) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 68 下一页