KVM全称"Kernel-based Virtual Machine",即基于内核的虚拟机,在linux内启用kvm需要硬件,内核和软件(qemu)支持,这篇文章教你如何配置并安装KVM虚拟机. 检查硬件和系统的兼容性 检查硬件虚拟化:LC_ALL=C lscpu | grep Virtualiza ...
分类:
系统相关 时间:
2020-06-25 23:24:38
阅读次数:
150
必知必会13条 all *** # 取出所有 Book.objects.all().delete() ##删除所有对象 删除数据记录 filter *** # 过滤 Book.objects.filter(pk=1).update(price=190) 修改主键为1的书籍对象,的字段price为19 ...
分类:
数据库 时间:
2020-06-25 23:06:14
阅读次数:
60
开窗函数的理解参见: 理解hive中的开窗函数 over()中除了可以使用partition by选择分组字段外, 还有以下函数 order by 排序 指定聚合行的范围, 配合order by使用 current row: 当前行 n PRECEDING: 往前 n 行数据 n FOLLOWING... ...
分类:
其他好文 时间:
2020-06-25 21:54:18
阅读次数:
76
O(∩_∩)O哈哈~ 在学习 Mysql 的时候又遇到了新问题了 o(╥﹏╥)o 当我在准备为用户授权的时候: grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option; 遇到如下的情况o(╥ ...
分类:
数据库 时间:
2020-06-25 21:32:59
阅读次数:
81
一.sql分类及基本语法 1.sql分类 (1)DDL:数据库定义语言,用于定义表,列,索引等数据库对象. create,drop,alter等 (2)DML:数据库操纵语言,增删改查数据库的记录insert,delete,update,select等 (3)DCL:数据库控制语言,定义了数据库的表 ...
分类:
数据库 时间:
2020-06-25 21:30:09
阅读次数:
75
Hive、Spark SQL和Impala三种分布式SQL查询引擎都是SQL-on-Hadoop解决方案,但又各有特点。前面已经讨论了Hive和Impala,本节先介绍一下SparkSQL,然后从功能、架构、使用场景几个角度比较这三款产品的异同,最后附上分别由cloudera公司和SAS公司出示的关 ...
分类:
数据库 时间:
2020-06-25 21:29:31
阅读次数:
581
题目一: 我们有如下的用户访问数据 userId visitDate visitCount u01 2017/1/21 5 u02 2017/1/23 6 u03 2017/1/22 8 u04 2017/1/20 3 u01 2017/1/23 6 u01 2017/2/21 8 u02 2017 ...
分类:
其他好文 时间:
2020-06-25 21:23:41
阅读次数:
87
Substring with Concatenation of All Words (H) 题目 You are given a string, s, and a list of words, words, that are all of the same length. Find all star ...
分类:
其他好文 时间:
2020-06-25 21:20:39
阅读次数:
56
def reduce_mem_usage(df): """ iterate through all the columns of a dataframe and modify the data type to reduce memory usage. """ start_mem = df.memor ...
分类:
其他好文 时间:
2020-06-25 21:10:13
阅读次数:
70
开窗函数简单介绍 与聚合函数一样,开窗函数也是需要对行进行分组, 然后使用聚合算子. 可是它不像普通聚合函数那样每组只返回一个值,而是每一行返回一个窗口的聚合结果. 举例说明 数据如下 hive (default)> select * from over_test; open_test.name o... ...
分类:
其他好文 时间:
2020-06-25 19:37:31
阅读次数:
197