-- range call with endSELECT*FROM range(6+ cos(3));+---+| id|+---+|0||1||2||3||4|+---+-- range call with start and endSELECT*FROM range(5,10);+---+| id|+---+|5||6||7||8||9|+---+-- range call with numPartitionsSELECT*FROM range(0,10,2,200);+---+| id|+---+|0||2||4||6||8|+---+-- range call with a table aliasSELECT*FROM range(5,8)AS test;+---+| id|+---+|5||6||7|+---+SELECT explode(array(10,20));+---+|col|+---+|10||20|+---+SELECT inline(array(struct(1,'a'), struct(2,'b')));+----+----+|col1|col2|+----+----+|1| a||2| b|+----+----+SELECT posexplode(array(10,20));+---+---+|pos|col|+---+---+|0|10||1|20|+---+---+SELECT stack(2,1,2,3);+----+----+|col0|col1|+----+----+|1|2||3|null|+----+----+SELECT json_tuple('{"a":1, "b":2}','a','b');+---+---+| c0| c1|+---+---+|1|2|+---+---+SELECT parse_url('http://spark.apache.org/path?query=1','HOST');+-----------------------------------------------------+|parse_url(http://spark.apache.org/path?query=1, HOST)|+-----------------------------------------------------+| spark.apache.org|+-----------------------------------------------------+-- Use explode in a LATERAL VIEW clauseCREATETABLE test (c1 INT);INSERTINTO test VALUES(1);INSERTINTO test VALUES(2);SELECT*FROM test LATERAL VIEW explode (ARRAY(3,4))AS c2;+--+--+|c1|c2|+--+--+|1|3||1|4||2|3||2|4|+--+--+
1. 前言 最近要做一个扫描 ip 端口的功能
扫描的工具有很多,但是如何做到短时间扫描大量的 ip 是个相对困难的事情。
市场上比较出名的工具有 masscan和nmap
masscan 支持异步扫描,对多线程的利用很好,同时仅仅支持 syn 半开扫描ÿ…
已有一个OCI计算实例,Oracle Linux 7.9,1OCPU,16G内存:
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.9 (Maipo)$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte O…