- 浏览: 348374 次
- 性别:
- 来自: 杭州
文章分类
最新评论
-
lvyuan1234:
你好,你那个sample.txt文件可以分享给我吗
hive insert overwrite into -
107x:
不错,谢谢!
hive 表的一些默认值 -
on_way_:
赞
Hadoop相关书籍 -
bupt04406:
dengkanghua 写道出来这个问题该怎么解决?hbase ...
Unexpected state导致HMaster abort -
dengkanghua:
出来这个问题该怎么解决?hbase master启动不起来。
Unexpected state导致HMaster abort
srcTables:
"src", "src1", "srcbucket", "srcbucket2", "src_json", "src_thrift",
"src_sequencefile", "srcpart"
src、src1两表都是两个columns:
src :
create table src(key string, value string);
load data local inpath 'src/data/files/kv1.txt' into table src;
src1:
data/files/kv3.txt
create table src1(key string, value string);
load data local inpath 'src/data/files/kv3.txt' into table src1;
srcbucket:
CREATE TABLE srcbucket(key int, value string) CLUSTERED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE
LOAD DATA LOCAL INPATH '/home/tianzhao/apache/hive-trunk-snapshot/data/files/srcbucket0.txt' INTO TABLE srcbucket
LOAD DATA LOCAL INPATH '/home/tianzhao/apache/hive-trunk-snapshot/data/files/srcbucket1.txt' INTO TABLE srcbucket
srcbucket2:
"CREATE TABLE srcbucket2(key int, value string) CLUSTERED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE"
"srcbucket20.txt", "srcbucket21.txt","srcbucket22.txt", "srcbucket23.txt"
src_sequencefile:
data/files/kv1.seq
src_thrift:
data/files/complex.seq
create table src_thrift(aint int, aString string,lint array<int>, lString array<string>, lintString array<struct<myint:int, mString:string, underscore_int:int>>, mStringString map<string, string>) row format serde 'org.apache.hadoop.hive.serde2.thrift.ThriftDeserializer' with serdeproperties("serialization.class"="org.apache.hadoop.hive.serde2.thrift.test.Complex", "serialization.format"="org.apache.thrift.protocol.TBinaryProtocol") stored as sequencefile;
load数据是:
hive> load data local inpath 'src/data/files/complex.seq' into table src_thrift;
src_json:
data/files/json.txt
srcpart:
create table srcpart(key string, value string) partitioned by(ds string, hr string);
LOAD DATA LOCAL INPATH 'src/data/files/kv1.txt' OVERWRITE INTO TABLE srcpart PARTITION (ds='2008-04-08',hr='11');
LOAD DATA LOCAL INPATH 'src/data/files/kv1.txt' OVERWRITE INTO TABLE srcpart PARTITION (ds='2008-04-08',hr='12');
LOAD DATA LOCAL INPATH 'src/data/files/kv1.txt' OVERWRITE INTO TABLE srcpart PARTITION (ds='2008-04-09',hr='11');
LOAD DATA LOCAL INPATH 'src/data/files/kv1.txt' OVERWRITE INTO TABLE srcpart PARTITION (ds='2008-04-09',hr='12');
输入 ql/src/test/results/clientpositive
输出 build/ql/test/logs/clientpositive
输入数据:ql/../data/files
build/test/data/warehouse
URL="jdbc:derby:;databaseName=../build/test/junit_metastore_db;create=true" driver="org.apache.derby.jdbc.EmbeddedDriver" userName="APP"
11/06/09 09:24:09 INFO metastore.HiveMetaStore: 0: get_table : db=default tbl=src_sequencefile
11/06/09 09:24:10 INFO metastore.HiveMetaStore: 0: drop_table : db=default tbl=src_sequencefile
11/06/09 09:24:10 INFO metastore.HiveMetaStore: 0: get_table : db=default tbl=src_sequencefile
11/06/09 09:24:10 INFO metastore.warehouse: deleting pfile:/home/tianzhao/apache/hive-trunk-snapshot/build/test/data/warehouse/src_sequencefile
11/06/09 09:24:10 INFO metastore.warehouse: Deleted the diretory pfile:/home/tianzhao/apache/hive-trunk-snapshot/build/test/data/warehouse/src_sequencefile
创建了这些表之后就可以启动hive,在hive的cli里面运行hive-0.6.0\src\ql\src\test\queries下面的testcase里面的HiveSQL了。
例如:
创建src表,加载数据到表src
create table src(key string, value string);
load data local inpath 'src/data/files/kv1.txt' into table src;
运行hive-0.6.0/src/ql/src/test/queries/clientpositive/groupby1.q里面的HiveSQL。
输出的结果可以跟hive-0.6.0/src/ql/src/test/results/clientpositive/groupby1.q.out里面的进行比较。
"src", "src1", "srcbucket", "srcbucket2", "src_json", "src_thrift",
"src_sequencefile", "srcpart"
src、src1两表都是两个columns:
src :
create table src(key string, value string);
load data local inpath 'src/data/files/kv1.txt' into table src;
src1:
data/files/kv3.txt
create table src1(key string, value string);
load data local inpath 'src/data/files/kv3.txt' into table src1;
srcbucket:
CREATE TABLE srcbucket(key int, value string) CLUSTERED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE
LOAD DATA LOCAL INPATH '/home/tianzhao/apache/hive-trunk-snapshot/data/files/srcbucket0.txt' INTO TABLE srcbucket
LOAD DATA LOCAL INPATH '/home/tianzhao/apache/hive-trunk-snapshot/data/files/srcbucket1.txt' INTO TABLE srcbucket
srcbucket2:
"CREATE TABLE srcbucket2(key int, value string) CLUSTERED BY (key) INTO 4 BUCKETS STORED AS TEXTFILE"
"srcbucket20.txt", "srcbucket21.txt","srcbucket22.txt", "srcbucket23.txt"
src_sequencefile:
data/files/kv1.seq
src_thrift:
data/files/complex.seq
create table src_thrift(aint int, aString string,lint array<int>, lString array<string>, lintString array<struct<myint:int, mString:string, underscore_int:int>>, mStringString map<string, string>) row format serde 'org.apache.hadoop.hive.serde2.thrift.ThriftDeserializer' with serdeproperties("serialization.class"="org.apache.hadoop.hive.serde2.thrift.test.Complex", "serialization.format"="org.apache.thrift.protocol.TBinaryProtocol") stored as sequencefile;
load数据是:
hive> load data local inpath 'src/data/files/complex.seq' into table src_thrift;
src_json:
data/files/json.txt
srcpart:
create table srcpart(key string, value string) partitioned by(ds string, hr string);
LOAD DATA LOCAL INPATH 'src/data/files/kv1.txt' OVERWRITE INTO TABLE srcpart PARTITION (ds='2008-04-08',hr='11');
LOAD DATA LOCAL INPATH 'src/data/files/kv1.txt' OVERWRITE INTO TABLE srcpart PARTITION (ds='2008-04-08',hr='12');
LOAD DATA LOCAL INPATH 'src/data/files/kv1.txt' OVERWRITE INTO TABLE srcpart PARTITION (ds='2008-04-09',hr='11');
LOAD DATA LOCAL INPATH 'src/data/files/kv1.txt' OVERWRITE INTO TABLE srcpart PARTITION (ds='2008-04-09',hr='12');
输入 ql/src/test/results/clientpositive
输出 build/ql/test/logs/clientpositive
输入数据:ql/../data/files
build/test/data/warehouse
URL="jdbc:derby:;databaseName=../build/test/junit_metastore_db;create=true" driver="org.apache.derby.jdbc.EmbeddedDriver" userName="APP"
11/06/09 09:24:09 INFO metastore.HiveMetaStore: 0: get_table : db=default tbl=src_sequencefile
11/06/09 09:24:10 INFO metastore.HiveMetaStore: 0: drop_table : db=default tbl=src_sequencefile
11/06/09 09:24:10 INFO metastore.HiveMetaStore: 0: get_table : db=default tbl=src_sequencefile
11/06/09 09:24:10 INFO metastore.warehouse: deleting pfile:/home/tianzhao/apache/hive-trunk-snapshot/build/test/data/warehouse/src_sequencefile
11/06/09 09:24:10 INFO metastore.warehouse: Deleted the diretory pfile:/home/tianzhao/apache/hive-trunk-snapshot/build/test/data/warehouse/src_sequencefile
创建了这些表之后就可以启动hive,在hive的cli里面运行hive-0.6.0\src\ql\src\test\queries下面的testcase里面的HiveSQL了。
例如:
创建src表,加载数据到表src
create table src(key string, value string);
load data local inpath 'src/data/files/kv1.txt' into table src;
运行hive-0.6.0/src/ql/src/test/queries/clientpositive/groupby1.q里面的HiveSQL。
输出的结果可以跟hive-0.6.0/src/ql/src/test/results/clientpositive/groupby1.q.out里面的进行比较。
发表评论
-
hive rename table name
2013-09-18 14:28 2600hive rename tablename hive re ... -
hive的distribute by如何partition long型的数据
2013-08-20 10:15 2480有用户问:hive的distribute by分桶是怎么分 ... -
hive like vs rlike vs regexp
2013-04-11 18:53 11216like vs rlike vs regexp r ... -
hive sql where条件很简单,但是太多
2012-07-18 15:51 8744insert overwrite table aaaa ... -
insert into时(string->bigint)自动类型转换
2012-06-14 12:30 8281原表src: hive> desc src; ... -
通过复合结构来优化udf的调用
2012-05-11 14:07 1210select split("accba&quo ... -
RegexSerDe
2012-03-14 09:58 1551官方示例在: https://cwiki.apache.or ... -
Hive 的 OutputCommitter
2012-01-30 19:44 1820Hive 的 OutputCommitter publi ... -
hive LATERAL VIEW 行转列
2011-11-09 14:49 5452drop table lateralview; create ... -
hive complex type
2011-11-08 19:56 1371数据: 1,100|3,20|2,70|5,100 建表: ... -
hive转义字符
2011-10-25 16:41 6245CREATE TABLE escape (id STRING, ... -
hive 两个不同类型的columns进行比较
2011-09-19 13:46 3039select case when "ab1234&q ... -
lateral view
2011-09-18 04:04 0lateral view与udtf相关 -
udf 中获得 FileSystem
2011-09-14 10:28 0在udf中获得FileSystem,需要获得知道fs.defa ... -
hive union mapjoin
2011-09-09 16:29 0union union.q union2.q ... -
hive eclipse
2011-09-08 17:42 0eclipse-templates$ vi .classpat ... -
hive join filter
2011-09-07 23:05 0join16.q.out hive.optimize.ppd ... -
hive limit
2011-09-07 21:02 0limit 关键字: input4_limit.q.out ... -
hive convertMapJoin MapJoinProcessor
2011-09-06 21:17 0join25.q join26 ... -
hive hive.merge.mapfiles hive.merge.mapredfiles
2011-09-06 19:14 0HiveConf: HIVEMERGEMAPFILES ...
相关推荐
《DBeaver与Hive连接:hive-jdbc-uber-2.6.5.0-292.jar驱动详解》 在大数据处理领域,Hive作为一个基于Hadoop的数据仓库工具,广泛用于数据查询和分析。而DBeaver,作为一款跨平台的数据库管理工具,以其用户友好的...
含两个文件hive-jdbc-3.1.2-standalone.jar和apache-hive-3.1.2-bin.tar.gz 含两个文件hive-jdbc-3.1.2-standalone.jar和apache-hive-3.1.2-bin.tar.gz 含两个文件hive-jdbc-3.1.2-standalone.jar和apache-hive-...
标题中的“hive-jdbc-uber-2.6.5.0-292.zip”指的是Hive JDBC驱动的Uber版本,版本号为2.6.5.0-292。Uber JAR是一种包含所有依赖的单一JAR文件,便于分发和使用,特别是对于连接工具如DataGrip这样的集成开发环境...
apache-hive-2.1.1-bin.tar apache-hive-2.1.1-bin.tar apache-hive-2.1.1-bin.tarapache-hive-2.1.1-bin.tar apache-hive-2.1.1-bin.tar apache-hive-2.1.1-bin.tarapache-hive-2.1.1-bin.tar apache-hive-2.1.1-...
centos 下hive连接mysql驱动 ,mysql-connector-java-8.0.26-1.el7.noarch. 使用方法: 1.下载本rpm文件后,上传至你的服务器(虚拟机) 2. rpm -ivh mysql-connector-java-8.0.26-1.el7.noarch进行安装 3.安装完成...
Hive JDBC Uber Driver,如文件名“hive-jdbc-uber-2.6.5.0-292.jar”所示,是Apache Hive提供的一个关键组件,主要用于在Java应用程序中与Hive服务进行交互。这个Uber版本的驱动程序集成了所有必要的依赖,使得用户...
标题中的"**hive-jdbc-uber-2.6.5.0-292.jar**"是一个Uber(也称为Shaded)JAR文件,它集成了Hive JDBC驱动的所有依赖项。Uber JAR的目的是为了方便部署,因为它将所有必需的库合并到一个单一的文件中,避免了类路径...
Hive JDBC Uber Driver,即“hive-jdbc-uber-2.6.3.0-292.jar”,是Apache Hive提供的一种集成型JDBC驱动,它使得Java应用程序能够通过标准的JDBC接口与Hive服务器进行通信,实现数据查询、操作和管理。这个特定版本...
在本案例中,"ranger-2.0.0-hive-plugin.tar.gz" 是Apache Ranger为Hive服务编译好的插件包,旨在简化Ranger在Hive上的部署过程,避免用户自行编译可能遇到的复杂性和时间消耗。 Ranger Hive 插件的主要功能包括: ...
hive客户端工具DBever连接时所使用的驱动,hive-jdbc-uber-2.6.5.0-292.jar,hive-jdbc-uber-2.6.5.0-292.jar,hive-jdbc-uber-2.6.5.0-292.jar
3. `conf/`:默认的配置文件,如`hive-default.xml`和`hive-site.xml`,用户可以在此修改Hive的行为。 4. `scripts/`:包含Hive的一些初始化和管理脚本。 5. `metastore/`:元数据存储相关的库和脚本,Hive使用元...
Apache Hive(hive-storage-2.8.1.tar.gz、hive-storage-2.7.3.tar.gz)是一种分布式容错数据仓库系统,支持大规模分析,并使用 SQL 促进读取、写入和管理驻留在分布式存储中的 PB 级数据。Hive 构建在 Apache ...
Apache Hive(apache-hive-3.1.3-bin.tar.gz、apache-hive-3.1.3-src.tar.gz)是一种分布式容错数据仓库系统,支持大规模分析,并使用 SQL 促进读取、写入和管理驻留在分布式存储中的 PB 级数据。Hive 构建在 Apache...
Apache Hive(apache-hive-1.2.2-bin.tar.gz、apache-hive-1.2.2-src.tar.gz)是一种分布式容错数据仓库系统,支持大规模分析,并使用 SQL 促进读取、写入和管理驻留在分布式存储中的 PB 级数据。Hive 构建在 Apache...
hive-jdbc-uber-2.6.5.0-292.jar DbVisualizer (as of version 9.5.5) Below is an example configuration using DbVisualizer: Open the Diver Manager dialog ("Tools" > "Driver Manager...") and hit the ...
hive-jdbc-1.1.0-cdh5.4.5-standalone.jar Caused by: java.sql.SQLException: java.lang.ClassNotFoundException: org.apache.hive.jdbc.HiveDriver at com.trs.gateway.commons.hive.HiveFeature.getConnection...
hive-site.xml 这是一份我本地配置的好用的,hadoop2.7.3 搭建hive-site.xml可以参考一下,希望对您有帮助啊
at com.trs.gateway.commons.hive.HiveFeature.getConnection(HiveFeature.java:57) at com.trs.gateway.commons.database.DatabaseUtil.connectUsingClass(DatabaseUtil.java:112) ... 7 more Caused by: ...