图解Kerberos协议原理 内网渗透之kerberos协议分析 kerberos 协议 Kerberos Concepts - Principals, Keytabs and Delegation Tokens A user in Kerberos is called a principal, which is made up of three distinct components: the primary, instance, and realm. A Kerberos principal is used in a Kerberos-secured system to represent a unique identity. The first component of the principal is called the primary, or sometimes the user component. The primary component is an arbitrary string and may be the operating system username of the user or the name of a service. The primary component is followed by an optional section ca
Read more »

背景 Facebook的数据仓库存储在少量大型Hadoop/HDFS集群。Hive是Facebook在几年前专为Hadoop打造的一款数据仓库工具。在以前,Facebook的科学家和分析师一直依靠Hive来做数据分析。但Hive使用MapReduce作为底层计算框架,是专为批处理设计的。但随着数据越来越多,使用Hive进行一个简单的数据查询可能要花费几分到几小时,显然不能满足交互式查询的需求。Facebook也调研了其他比Hive更快的工具,但它们要么在功能有所限制要么就太简单,以至于无法操作Facebook庞大的数据仓库。 2012年开始试用的一些外部项目都不合适,他们决定自己开发,这就是Presto。2012年秋季开始开发,目前该项目已经在超过 1000名Facebook雇员中使用,运行超过30000个查询,每日数据在1PB级别。Facebook称Presto的性能比Hive要好上10倍多。2013年Facebook正式宣布开源Presto。 定位 presto 官网 Presto is an open source distributed SQL query engine for running interactive analytic queries against data sources of all sizes ranging from gigabytes to
Read more »

other storage 主要是存的系统的一些缓存、日志等数据。有时会占特别大空间,可以按下列步骤清理 1. 暂时关闭 SIP,以能查看和删除系统文件(解决 not permitted 问题) 1. 以 recover mode 重启电脑:启动时,按 command + R 即可 2. 选择 Utilities -> Terminal 3. 在 Terminal 中输入 csrutil disable 关闭 SIP 4. 重启电脑 在完成 clean 后,应该重复 1、2,并在 terminal 中输入 csrutil enable 来启动 SIP 重启电脑后,可以通过 csrutil status 来查看 SIP 服务是否启动(清理完成后应该启动) 2. 按 size 查找大文件 1 2 $ cd / $ sudo du -sh -- *| sort -hr 3. 常见的大文件 ~/Libraray/Caches 和 /Library/Caches ~/Libraray 和 /Library 下的 Caches 和 logs 等都是可以安全删除的。可以查看一下大小,把自己不用的 cache 删掉。 当然也可以查看 Library 下的所有大文件,确认是否可以删除 docker Docker 的 images、volumes 等可能占很大空间,可以查
Read more »

数据仓库建模 数据仓库的多维数据模型 数据仓库的多维数据模型 – 非常好的一系列文章 Kimball 维度建模 维度建模就是时刻考虑如何能够提供简单性,以业务为驱动,以用户理解性和查询性能为目标 kimball维度建模详解 维度建模分为两种表:事实表和维度表 1. 事实表:必然存在的一些数据,像采集的日志文件,订单表,都可以作为事实表 特征:是一堆主键的集合,每个主键对应维度表中的一条记录,客观存在的,根据主题确定出需要使用的数据 1. 维度表:维度就是所分析的数据的一个量,维度表就是以合适的角度来创建的表,分析问题的一个角度:时间、地域、终端、用户等角度 多维数据模型的定义和作用 多维数据模型是为了满足用户从多角度多层次进行数据查询和分析的需要而建立起来的基于事实和维的数据库模型,其基本的应用是为了实现OLAP(Online Analytical Processing)。 当然,通过多维数据模型的数据展示、查询和获取就是其作用的展现,但其真的作用的实现在于,通过数据仓库可以根据不同的数据需求建立起各类多维模型,并组成数据集市开放给不同的用户群体使用,也就是根据需求定制的各类数据商品摆放在数据集市中供不同的数据消费者进行采购。 多维数据模型最大的优点就是其基于分析优化的数据组织和存储模式。 主题建模 多维分析仓库构建-面向主题的建模 构成 主题建模是对
Read more »

install quickstart Airflow is published as apache-airflow package in PyPI. Installing it however might be sometimes tricky because Airflow is a bit of both a library and application. Libraries usually keep their dependencies open and applications usually pin them, but we should do neither and both at the same time. We decided to keep our dependencies as open as possible (in setup.cfg and setup.py) so users can install different version of libraries if needed. This means that from time to time plain pip install apache-airflow will not work or will produce unusable Airflow installation. In ord
Read more »

reference 官方安装指导 Preparation 除非说明,默认以下操作都是在所有节点上执行 修改 host 1 2 3 4 5 6 7 [root@master ~]# vi /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.105.137 master 192.168.105.191 slave1 192.168.105.13 slave2 修改 network config 1 2 3 4 5 6 7 8 9 10 11 12 [root@master ~]# vi /etc/sysconfig/network # Created by anaconda NETWORKING=yes HOSTNAME=master [root@master ~]# hostnamectl set-hostname master [root@master ~]# hostname master # ping 各个节点,查看是否可连通 [root@maste
Read more »

Architecture Install install steps Access Apache Atlas UI using a browser: http://localhost:21000 You can also access the rest api http://localhost:21000/api/atlas/v2 默认的用户名密码是 (admin, admin) Atlas Features 定义元模型,规范元数据 atlas 可以维护(增删改查) metadata types,支持 * 创建多种类型的 metadata types * businessmetadatadef:业务元数据的元模型 * classificationdef:标签数据的元模型 * entitydef:一般元数据的元模型 * enumdef * relationshipdef:关系元数据的元模型 * structdef * 元模型支持定义属性约束、索引、唯一性等 * 按 id/typename/query 来检索 相关 API 定义 typedef request schema object 1 2 # DELETE/GET/POST/PUT /v2/types/typedef 约束 * type
Read more »

ftp .csv 文件导入 可以先将文件弄到 HDFS,然后创建/更新 hive 表来关联到 HDFS 文件。 将文件弄到 HDFS有以下一些方法: 1. ftp -> local -> hdfs: 将文件先下载到本地,再通过 hdfs 命令拷贝到 hdfs 中 2. ftp -> hdfs: 直接连接 FTP,将文件拷到 hdfs 中,省却本地拷贝 3. 已有的数据采集工具:使用实时数据流处理系统,来实现不同系统之间的流通 一、ftp -> local ->hdfs 几种方案: 1. hadoop fs -get ftp://uid:password@server_url/file_path temp_file | hadoop fs -moveFromLocal tmp_file hadoop_path/dest_file 2. 参照这个实现用 python 包从 ftp 中读,然后用 hdfs 命令写到 hdfs 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 from urllib.request import urlopen
Read more »

Concept Sqoop: sq are the first two of “sql”, oop are the last three of “hadoop”. It transfers bulk data between hdfs and relational database servers. It supports: * Full Load * Incremental Load * Parallel Import/Export (throught mapper jobs) * Compression * Kerberos Security Integration * Data loading directly to HIVE Sqoop cannot import .csv files into hdfs/hive. It only support databases / mainframe datasets import. Architecture Sqoop provides CLI, thus you can use a simple command to conduct import/export. The import/export are executes in fact through map tasks. When Import f
Read more »

Concept 5分钟了解MPP数据库 MPP (Massively Parallel Processing),即大规模并行处理。简单来说,MPP是将任务并行的分散到多个服务器和节点上,在每个节点上计算完成后,将各自部分的结果汇总在一起得到最终的结果(与Hadoop相似,但主要针对大规模关系型数据的分析计算)。 MPP架构特征 * 任务并行执行; * 数据分布式存储(本地化); * 分布式计算; * 私有资源; * 横向扩展; * Shared Nothing架构。 MPPDB v.s. Hadoop 知乎-为什么说HADOOP扩展性优于MPP架构的关系型数据库? hadoop 和 MPPDB 最大的区别在于:对数据管理理念的不同。 1. HDFS/Hadoop 对于数据管理是粗放型管理,以一个文件系统的模式,让用户根据文件夹层级,把文件直接塞到池子里。处理也以批处理为主,就是拼命 scan。如果想在一大堆数据里找符合条件的数据,hadoop 就是粗暴的把所有文件从头到尾 scan 一遍,因为对于这些文件他没有索引、分类等,他管的少,知道的也少,用的时候每次就要全 scan。 2. 数据库的本质在于数据管理,对外提供在线访问、增删改查等一系列操作。数据库的内存管理比较精细,有一套很完善的数据管理和分布体系。如果想在一大堆数据里找符合条件的数据,他可以根据
Read more »
0%