建表:

CREATE TABLE my_first_table (
id BIGINT,
name STRING
)
TBLPROPERTIES(
'storage_handler' = 'com.cloudera.kudu.hive.KuduStorageHandler',
'kudu.table_name' = 'my_first_table',
'kudu.master_addresses' = 'node1:7051',
'kudu.key_columns' = 'id'
);

Fetched 0 row(s) in 1.26s
[node2:21000] > show tables;
Query: show tables
+----------------+
| name |
+----------------+
| my_first_table |
+----------------+
Fetched 1 row(s) in 0.06s
[node2:21000] > desc my_first_table
> ;
Query: describe my_first_table
+------+--------+---------+
| name | type | comment |
+------+--------+---------+
| id | bigint | |
| name | string | |
+------+--------+---------+
Fetched 2 row(s) in 5.09s

插入数据:

insert into my_first_table(id, name) values(,'shaocheng');
insert into my_first_table(id, name) values(,'jianzhong');
insert into my_first_table(id, name) values(,'chenbiao');
insert into my_first_table(id, name) values(,'xingjiang');

[node2:21000] > insert into my_first_table(id, name) values(1001,'shaocheng');
Query: insert into my_first_table(id, name) values(1001,'shaocheng')
Inserted 1 row(s) in 0.27s
[node2:21000] > insert into my_first_table(id, name) values(1002,'jianzhong');
Query: insert into my_first_table(id, name) values(1002,'jianzhong')
Inserted 1 row(s) in 0.12s
[node2:21000] > insert into my_first_table(id, name) values(1003,'chenbiao');
Query: insert into my_first_table(id, name) values(1003,'chenbiao')
Inserted 1 row(s) in 0.12s
[node2:21000] > insert into my_first_table(id, name) values(1004,'xingjiang');
Query: insert into my_first_table(id, name) values(1004,'xingjiang')
Inserted 1 row(s) in 0.12s

查询:

[node2:21000] > select * from my_first_table;
Query: select * from my_first_table
+------+-----------+
| id | name |
+------+-----------+
| 1001 | shaocheng |
| 1002 | jianzhong |
| 1003 | chenbiao |
| 1004 | xingjiang |
+------+-----------+

删除:

[node2:21000] > delete my_first_table where id=1003;
Query: delete my_first_table where id=1003

Fetched 0 row(s) in 0.17s
[node2:21000] > select * from my_first_table;
Query: select * from my_first_table
+------+-----------+
| id | name |
+------+-----------+
| 1001 | shaocheng |
| 1002 | jianzhong |
| 1004 | xingjiang |
+------+-----------+
Fetched 3 row(s) in 0.15s

建立第二张表:

CREATE TABLE my_second_table TBLPROPERTIES(
'storage_handler' = 'com.cloudera.kudu.hive.KuduStorageHandler',
'kudu.table_name' = 'my_second_table',
'kudu.master_addresses' = 'node1:7051',
'kudu.key_columns' = 'id'
) AS SELECT * FROM my_first_table ;

CREATE TABLE my_second_table TBLPROPERTIES(
'storage_handler' = 'com.cloudera.kudu.hive.KuduStorageHandler',
'kudu.table_name' = 'my_second_table',
'kudu.master_addresses' = 'node1:7051',
'kudu.key_columns' = 'id'
) AS SELECT * FROM my_first_table ;

kudu playground的更多相关文章

  1. 安装Kudu

    1.默认安装好yum2.需以root身份安装3.安装ntp yum install ntp -y4.启动ntp /etc/init.d/ntpd start|stop|restart5.添加安装包yu ...

  2. 窥探Swift编程之在Playground上尽情的玩耍

    自从苹果公司发布Swift的时候,Xcode上又多了一样新的东西---"Playground".Playground就像操场一样,可以供我们在代码的世界里尽情的玩耍,在本篇博客中就 ...

  3. 通过KUDU获取Azure网站的日志

    部署到Azure上的website,由于无法通过RDP的方式去登录查看log,所以我们只能通过FTP的方式或者kudu的方式进行查看,具体如下: 1.使用FTP账户和密码登录网站的KUDU界面: 如您 ...

  4. 自制工具:迅速打开一个Node 环境的Playground

    需求 经常有这种情况,写代码的时候需要实验种想法,亟需一种playground 环境来玩耍.如果是前端的话可以打开chrome 的控制台,但是如果是Node 的话就比较麻烦了.我要打开我的存放试验代码 ...

  5. Particle Playground 3.03 - 粒子特效王者

    <ignore_js_op> <ignore_js_op> <ignore_js_op> <ignore_js_op> <ignore_js_op ...

  6. Swift开发第三篇——Playground

    本篇分为两部分: 一.Playground的延时运行 二.Playground的可视化 一.Playground的延时运行 Playground 就是提供一个可以即时编译的类似 REPL 的环境,他为 ...

  7. kudu

    Kudu White Paper http://www.cloudera.com/documentation/betas/kudu/0-5-0/topics/kudu_resources.html h ...

  8. TensorFlow Playground

    A Neural Network Playground Understanding neural networks with TensorFlow Playground 机器之心翻译

  9. swift开发:试玩 Apple 站点的 playground

    https://developer.apple.com/library/prerelease/ios/documentation/swift/conceptual/swift_programming_ ...

随机推荐

  1. Query Designer:Exception,不同的值显示不同的颜色

    声明:原创作品,转载时请注明文章来自SAP师太技术博客( 博/客/园www.cnblogs.com):www.cnblogs.com/jiangzhengjun,并以超链接形式标明文章原始出处,否则将 ...

  2. Java Web之会话管理二:Session

    一.Session 在web开发中,服务器可以为每个yoghurt浏览器创建一个会话对象(Session)对象.注意:一个浏览器独占一个Session对象.因此,在需要保存用户数据时,服务器程序可以把 ...

  3. Example For maven-compiler-plugin

    1. Compiling Sources Using A Different JDK The compilerVersion parameter can be used to specify the ...

  4. MAC 设置环境变量path的几种方法

    mac 一般使用bash作为默认shell Mac系统的环境变量,加载顺序为:/etc/profile /etc/paths ~/.bash_profile ~/.bash_login ~/.prof ...

  5. ireport5.6+jasperreport6.3开发(四)--以javabean为基准的报表开发(ireport)

    javabean完成以后就是添加ireport的报表了 打开ireport的option然后在classpath中添加路径. 然后在ireport中追加数据源如图,点击图标后会出现数据源列表然后按ne ...

  6. Notepad++进行php开发所必需的插件

    Notepad++进行php开发所必需的插件有那些呢? 1. Compare: 可以用来比较两个文件不同之处. 2. Explorer:文件浏览器插件,包含收藏夹.Session保存功能.可与NppE ...

  7. Sublime Text 3 使用问题答疑

    命令面板/命令模式:ctrl+shift+pctrl+cctrl+v → ctrl+shift+v粘贴时会保持原格式(缩进)ctrl+sctrl+z撤销ctrl+y恢复撤销在当前行下面添加一行:ctr ...

  8. Galera集群server.cnf参数调整--Innodb存储引擎内存相关参数(一)

    在innodb引擎中,内存的组成主要有三部分:缓冲池(buffer pool),重做日志缓存(redo log buffer),额外的内存池(additional memory pool).

  9. rtc关机闹钟2 Alarm manager

    public void set(int type, long triggerAtMillis, long windowMillis, long intervalMillis, PendingInten ...

  10. 非对称加密算法--DH

    注意:本节内容主要参考自<Java加密与解密的艺术(第2版)>第8章“高等加密算法--非对称加密算法” 11.1.非对称加密算法 特点: 发送方和接收方均有一个密钥对(公钥+私钥),其中公 ...