Hive 上配置 Hive on Spark

Hive on Spark配置 Hive on Spark安装,hadoop-3.3.0,spark-3.4.3-bin-hadoop3,apache-hive-3.1.3 阅读详情

Hive 的安装配置见:Hive 安装配置

在 Hive 上配置 Hive on Spark

安装

在服务器 ns1 上安装,此服务器之前已经安装好 Hive;

下载解压

官网地址:http://spark.apache.org/downloads.html

下载:spark-3.0.0-bin-hadoop3.2.tgz

说明:

Hive3.1.2 支持的 Spark 是 2.4.5,所以需要将下载的 Hive3.1.2 的源码中的 pom 文件中的 Spark 版本改为 3.0.0,然后再编译打包,得到支持 Spark 3.0.0 的 Jar 包;

$ tar xzvf spark-3.0.0-bin-hadoop3.2.tgz -C /home/hadoop/local/

$ cd /home/hadoop/local

$ ln -s spark-3.0.0-bin-hadoop3.2 spark

配置环境变量

$ sudo vim /etc/profile.d/my_env.sh

HADOOP_HOME=/home/local/hadoop                                                                                                                                       
ZOOKEEPER_HOME=/home/hadoop/local/zookeeper                                                                                                                          
KAFKA_HOME=/home/hadoop/local/kafka                                                                                                                                  
KE_HOME=/home/hadoop/local/efak                                                                                                                                      
FLUME_HOME=/home/hadoop/local/flume                                                                                                                                  
SQOOP_HOME=/home/hadoop/local/sqoop                                                                                                                                  
HIVE_HOME=/home/hadoop/local/hive                                                                                                                                    
SPARK_HOME=/home/hadoop/local/spark                                                                                                                                  
PATH=$PATH:/home/hadoop/bin:$HADOOP_HOME/bin:$HADOOP_HOME/sbin:$ZOOKEEPER_HOME/bin:$KAFKA_HOME/bin:$KE_HOME/bin:$FLUME_HOME/bin:$SQOOP_HOME/bin:$HIVE_HOME/bin:$SPARK
_HOME/bin:$SPARK_HOME/sbin                                                                                                                                           
export HADOOP_HOME ZOOKEEPER_HOME KAFKA_HOME KE_HOME FLUME_HOME SQOOP_HOME HIVE_HOME SPARK_HOME PATH   

配置 Hive on Spark

在 hive 中增加配置 spark-defaults.conf

$ vim /home/hadoop/local/hive/conf/spark-defaults.conf

spark.master=yarn                                                                                                                                                    
spark.eventLog.enabled=true                                                                                                                                          
spark.eventLog.dir=hdfs://mycluster/spark/history                                                                                                                     
spark.executor.memory=2g                                                                                                                                             
spark.driver.memory=2g
#spark.memory.offHeap.enabled=true
#spark.memory.offHeap.size=2g
spark.driver.extraLibraryPath=/home/local/hadoop/lib/native
spark.executor.extraLibraryPath=/home/local/hadoop/lib/native

hdfs 中 /spark/history 目录是存放 spark 历史日志的地方,要在 hadoop 的页面 http//ns2:50070 上看下这个目录是否已有,如果没有就手动新建这个文件夹;

或手动创建:

$ hdfs dfs -mkdir /spark/history

在 hive-site.conf 配置文件中添加如下几条配置

$ vim /home/hadoop/local/hive/conf/hive-site.conf

最下面添加:

<property>
   <name>spark.yarn.jars</name>
   <value>hdfs://mycluster/spark/jars/*</value>
</property>

<property>
   <name>hive.execution.engine</name>
    <value>spark</value>
</property>

<property>
   <name>hive.spark.client.connect.timeout</name>
    <value>10000ms</value>
</property>

完整的配置:

<?xml version="1.0"?>
<?xml-style sheettype="text/xsl" href="configuration.xsl"?>
<configuration>
   <property>
       <name>javax.jdo.option.ConnectionURL</name>
       <value>jdbc:mysql://ns1:3306/metastore?useSSL=false&amp;useUnicode=true&amp;characterEncoding=UTF-8</value>
   </property>

   <property>
       <name>javax.jdo.option.ConnectionDriverName</name>
       <value>com.mysql.cj.jdbc.Driver</value>
   </property>

   <property>
       <name>javax.jdo.option.ConnectionUserName</name>
       <value>root</value>
   </property>

   <property>
       <name>javax.jdo.option.ConnectionPassword</name>
       <value>123456</value>
   </property>

   <property>
       <name>hive.metastore.warehouse.dir</name>
       <value>/user/hive/warehouse</value>
   </property>

   <property>
       <name>hive.metastore.schema.verification</name>
       <value>false</value>
   </property>

   <property>
   <name>hive.server2.thrift.port</name>
   <value>10000</value>
   </property>

   <property>
       <name>hive.server2.thrift.bind.host</name>
       <value>ns1</value>
   </property>

   <property>
       <name>hive.metastore.event.db.notification.api.auth</name>
       <value>false</value>
   </property>
   
   <property>
       <name>spark.yarn.jars</name>
       <value>hdfs://mycluster/spark/jars/*</value>
   </property>

   <property>
       <name>hive.execution.engine</name>
       <value>spark</value>
   </property>

   <property>
       <name>hive.spark.client.connect.timeout</name>
       <value>10000ms</value>
   </property>
    
</configuration>

向 HDFS 上传 Spark 纯净版 Jar 包

下载并解压:

$ tar -zxvf spark-3.0.0-bin-without-hadoop.tgz

上传 Spark 纯净版 jar 包到 HDFS:

$ hdfs dfs -mkdir -p /spark/jars

$ hdfs dfs -put spark-3.0.0-bin-without-hadoop/jars/* /spark/jars/

一共上传了 146 个 Jar 包;

测试

1)启动 hive 客户端

$ hive

2)创建表:

$ create table test;

$ use test;

$ create table student(id int, name string);

$ insert into student values(1001, 'zhangsan');

Query ID = hadoop_20220915174910_4ed7ce9b-b7a1-41c8-a55d-b008569fbb53
Total jobs = 1
Launching Job 1 out of 1
In order to change the average load for a reducer (in bytes):
  set hive.exec.reducers.bytes.per.reducer=<number>
In order to limit the maximum number of reducers:
  set hive.exec.reducers.max=<number>
In order to set a constant number of reducers:
  set mapreduce.job.reduces=<number>
Failed to execute spark task, with exception 'java.lang.Exception(Failed to submit Spark work, please retry later)'
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.spark.SparkTask. Failed to submit Spark work, please retry later
hive> insert into student values(1001, 'zhangsan');
Query ID = hadoop_20220915175122_eaccaf93-6488-4a91-9375-75794c880b23
Total jobs = 1
Launching Job 1 out of 1
In order to change the average load for a reducer (in bytes):
  set hive.exec.reducers.bytes.per.reducer=<number>
In order to limit the maximum number of reducers:
  set hive.exec.reducers.max=<number>
In order to set a constant number of reducers:
  set mapreduce.job.reduces=<number>
Running with YARN Application = application_1663211231728_0013
Kill Command = /home/local/hadoop/bin/yarn application -kill application_1663211231728_0013
Hive on Spark Session Web UI URL: http://ns2:32777

Query Hive on Spark job[0] stages: [0, 1]
Spark job[0] status = RUNNING
--------------------------------------------------------------------------------------
          STAGES   ATTEMPT        STATUS  TOTAL  COMPLETED  RUNNING  PENDING  FAILED  
--------------------------------------------------------------------------------------
Stage-0 ........         0      FINISHED      1          1        0        0       0  
Stage-1 ........         0      FINISHED      1          1        0        0       0  
--------------------------------------------------------------------------------------
STAGES: 02/02    [==========================>>] 100%  ELAPSED TIME: 6.09 s     
--------------------------------------------------------------------------------------
Spark job[0] finished successfully in 6.09 second(s)
Loading data to table test.student
OK
Time taken: 22.528 seconds

$ insert into student values(1002, 'lisi');

$ select * from student;

OK                                                                                                                                                                   
1001    zhangsan                                                                                                                                                     
1002    lisi                                                                                                                                                         
Time taken: 0.174 seconds, Fetched: 2 row(s)  

Hive 整合 Spark 全教程 (Hive on Spark) 分类应用Haddop 2.xHaddop 3.xNNPortsNamenode80209820NNPortsNN HTTP UI500709870NNPorts504709871SNN portsSNN HTTP500919869SNN ports500909868DN portsDN IPC500209867DN portsDN500109866DN portsDN HTTP UI500759864DN portsNamenode。 阅读详情

相关推荐

Hive on Spark 部署

所以采用 Spark 纯净版 jar 包,不包含 hadoop 和 hive 相关依赖, 避免冲突。:Hive 任务最终由 Spark 来执行,Spark 任务资源分配由 Yarn 来调度,该任务有 可能被分配到集群的任何一个节点。所以需要将 Spark 的依赖上传到HDFS 集群路径,这样 集群中任何一个节点都能获取到。1.上传并解压 spark-3.0.0-bin-without-hadoop.tgz。1.上传并解压解压 spark-3.0.0-bin-hadoop3.2.tgz。

gm_ji的博客 672

Hive on Spark环境搭建

Hive 引擎包括:默认 MR、tez、spark最底层的引擎就是MR (Mapreduce)无需配置,Hive运行自带Hive on Spark:Hive 既作为存储元数据又负责 SQL 的解析优化,语法是 HQL 语法,执行引擎变成了 Spark,Spark 负责采用 RDD 执行。Spark on Hive : Hive 只作为存储元数据,Spark 负责 SQL 解析优化,语法是 Spark SQL语法,Spark 负责采用 RDD 执行。

TH_NUM的博客 4551

Spark on Hive 环境配置

Spark on Hive 环境配置搭建准备配置修改启动及测试 Hive Tables - Spark 3.1.2 Documentation (apache.org) 搭建准备 ① 准备 Hadoop 和 Hive 环境 Hadoop 介绍及集群搭建参考 Hive 搭建参考 ② 准备 Spark on Yarn 环境 环境搭建-Spark on YARN_ 配置修改 修改 hive-site.xml 配置文件:在 3 台 Spark 服务器上都操作 # 进入 Spark 安装目录 cd /opt/serv

半吊子Kyle的博客 4774

Hive On Spark 概述、安装配置、计算引擎更换、应用、异常解决

Hive On Spark 概述、安装配置、计算引擎更换、应用、异常解决

JIE的博客 --- moon_coder 1万+

R爬虫RSelenium环境搭建及简单应用

这是鄙人自己实践的一种可行的环境搭建,我会尽量详细的写下大家步骤。

weixin_44349986的博客 2017

用了7年的 source insight 3.5 背景色及字体配置(提升code效率)

在此记录并share用了7年的 source insight 3.5 背景色及字体配置,提升阅读代码效率

Chasing Freedom 7548

hive on spark 配置 和 spark on hive

Hive引擎简介 Hive引擎包括:默认MR、tez、spark Hive on Spark:Hive既作为存储元数据又负责SQL的解析优化,语法是HQL语法,执行引擎变成了Spark,Spark负责采用RDD执行。 Spark on Hive : Hive只作为存储元数据,Spark负责SQL解析优化,语法是SparkSQL语法,Spark负责采用RDD执行。 HiveonSpark配置 1)兼容性说明 注意:官网下载的Hive3.1.2和Spark3.0.0默认是不兼容的。因为Hive...

yang灬仔 5048

FreeRTOS实战:STM32CubeMX配置USART+DMA实现高效串口通信(附完整代码)

本文详细介绍了如何使用FreeRTOS和STM32CubeMX配置USART与DMA实现高效串口通信。通过对比轮询、中断和DMA三种模式的性能差异,提供完整的STM32CubeMX配置步骤和代码实现,帮助开发者优化嵌入式系统的串口通信性能,显著提升数据吞吐量和系统响应速度。

weixin_29190169的博客 460

spark安装以及hive on spark和spark on hive 的配置

安装spark版本为已经编译好的spark-3.2.1-bin-hadoop3.2-scala2.13.tgz,其同样兼容hadoop-3.3.2; Hive on Spark(为hive配置spark引擎):Hive既作为存储元数据又负责SQL的解析优化,语法是HQL语法,执行引擎变成了Spark,Spark负责采用RDD执行。Hive默认执行引擎是mapreduce,由于需频繁读取磁盘,效率比较低,Spark在内存中读取数据,所以总体来讲比MapReduce快很多(当然首次执行速度还是比较慢的) ..

v15220的博客 4831

FinalShell连接Ubuntu报Connection refused?SSH服务排查与解决指南

SSH(Secure Shell)是远程登录Linux服务器的核心协议,其工作原理基于TCP三次握手建立加密通道。当客户端发起连接时,若目标端口无服务监听,内核将返回RST包,表现为Connection refused错误。理解这一机制对运维排查至关重要,可快速区分服务缺失与网络故障。在开发测试、虚拟机管理等场景中,SSH服务的正确配置直接影响远程操作效率。本文针对FinalShell连接Ubuntu时常见的Connection refused报错,深入剖析SSH服务安装、监听地址、防火墙放行及虚拟机网络模

weixin_29611239的博客 253

Ubuntu终端接入Codex:一行脚本搞定AI编程助手安装与配置

在开发者日常工作中,命令行终端是最高频的操作环境,而AI编程助手的出现正在改变传统的编码方式。通过将大模型能力与终端工具链结合,开发者无需切换窗口即可完成命令查询、代码生成、项目理解和自动执行等任务。Ubuntu作为服务器和开发机的主流系统,搭配Node.js生态和API Key认证,即可在本地闭环运行AI助手。本文从环境准备、密钥配置、权限管理到自动化脚本封装,系统拆解在终端中接入Codex的完整流程,并分享高频用法与实测排障经验,帮助开发者安全、高效地让AI融入命令行工作流。

weixin_29061041的博客 338

详解Hive on Spark配置

Hive on Spark配置 Hive引擎默认的是MapReduce,就是没执行一个Hive语句,其实都是运行了一个MR程序,都知道的,MR虽好,但是慢呢。所以在时代的驱使下,就出现了把Hive的引擎更换的需要,通常Hive的引擎还有tez、Spark。我们经常听到Hive on Spark和Spark on Hive,不明所以的小伙伴还会以为这两个是倒装句,其实不然,Hive on Spark 和 Spark on Hive有着很大的区别 Hive on Spark:直译就是把Hive 放到 Spark

weixin_46429290的博客 4593

Cesium 入门

Viewer:主要窗口Cesium 展示三维要素内容的主要窗口,包含三维地球的视窗,还包含了一些基础控价const viewer = new Cesium.Viewer('div的ID',{ options可选参数 },包括图层)options可选参数animation: false, 隐藏动画效果timeline:false, 隐藏时间轴等等Scene:场景类,隐藏地球图层Entity:实体类。

虎康的博客 3681

Hive on Spark on YARN配置整理

文章目录版本兼容性spark安装(建议源码编译安装)源码编译(以spark-2.3.3版本,hadoop-3.1.0版本为例)YARN配置Hive配置To add the Spark dependency to HiveConfigure Hive execution engine to use SparkConfigure Spark-application configs for HiveAl...

逝无痕——kaidy 5349

手把手教你玩转服务器芯片架构​专栏--​​3.5 实战案例:用SystemC搭建一个多核服务器芯片的NoC模型(含流量分配与延迟仿真)​

通过SystemC搭建多核NoC模型,可深入验证流量分配策略与延迟特性。实际工程中需结合FPGA原型验证(如Xilinx Alveo)进行时序收敛分析,并通过参数化设计适配不同服务器芯片需求。

MHD0815的博客 3052

第三方 API 调用 OpenClaw 出现 LLM request timed out 的解决方案

本文主要介绍了第三方 API 调用 OpenClaw 出现 LLM request timed out 的解决方案,希望能对使用OpenClaw的同学们有所帮助。 文章目录 1. 问题描述 2. 解决方案

weixin_43178406的博客 8万+

Hive on Spark配置总结

Hive on spark

ksh的博客 7722

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

Hive on Spark && Spark on Hive配置

本文详细介绍了Hive与Spark集成的两种配置方式:Hive on Spark和Spark on Hive。Hive on Spark通过修改Hive执行引擎为Spark,提升计算效率但需注意内存配置;Spark on Hive则让Spark直接访问Hive元数据,提供更灵活的数据处理能力。配置步骤包括环境变量设置、配置文件修改、HDFS目录创建、依赖文件上传等关键操作,并提供了测试方法和中文乱码解决方案。两种方式都实现了Hive与Spark的优势互补,可根据实际需求选择适合的集成方案。

m0_46241543的博客 195

怀旧版电脑GBC模拟器

再现原版GBC掌机的界面,电脑运行连游戏界面都一样大小,很怀旧,很真实,(英文版)强烈推荐,很小的文件,很难才找到的。

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

Hive on Spark 配置

Hive引擎包括:MR(默认)、tez、spark。Hive on Spark:Hive既作为存储元数据又负责 SQL 的解析优化,语法是 HQL 语法,执行引擎变成了 Spark,Spark 负责采用 RDD 执行。Spark on Hive:Hive 只作为存储元数据,Spark负责SQL解析优化,语法是Spark SQL语法,Spark负责采用 RDD 执行。

hu_wei123的博客 2758

VB摄像头监控

该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制

配置Hive on Spark

需求场景 对hive进行记录数统计以及获取ddl语句均需通过spark engine,配置Hive on Spark予以支持。 工作流程 添加spark服务; 配置需要使用spark的hive:Spark On YARN Service选项选择已创建的spark服务并保存;...

chuiliang9247的博客 342

hive on spark配置方案详解

spark.driver.extraJavaOptions=-Dhdp.version=3.1.0.0-78 ##如果不配置,spark executor无法启动。2、将该spark客户端,放到/usr/hdp/3.1.0.0-78/hive目录下,命名为sparkengine。1、在/usr/hdp/3.1.0.0-78/hive/lib中添加spark2的依赖包。3、配置conf/spark-default.conf和spark-env.sh。一、安装hive-on-spark客户端。

sunxunyong的博客 1491

hive集群配置 hive on spark

hive集群配置 hive on spark 标签(空格分隔): hive HiveServer2的高可用-HA配置 HiveServer2的高可用-HA配置 hive on spark 基于Spark 2.0.0搭建Hive on Spark环境 编译spark hive on spark要求spark编译时不集成hive,编辑命令如下,需要安...

zh350229319的专栏 3468
上一篇: Hadoop 安装配置
下一篇: Hive External Table 外部表
开发老张
博客等级 码龄19年 8粉丝 74原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值