原因 在Hadoop环境中,在各种数据集和处理关系之间建立关系 在集群中进行数据集管理例如数据集声明周期、数据集复制等 抓取数据集或者处理过程的血统信息。 允许本地数据和其他任何地方的集群进行数据整合。 与metastore和catalog进行整合,例如:Hive和Hcatalog Easy to onboard new workflows/pipelines, with support for late data handling, retry policies
即使Oozie可以工作的很好,但在某些场景中,Oozie的调度也被证明存在限制。在当前的版本中,Falcon依赖Oozie去调度和工作流的执行。 Falcon relies on Oozie for both scheduling and for workflow execution, due to which the scheduling is limited to time based/cron based scheduling with additional gating conditions on data availability. 这本身对数据集的周期性具有了强加的限制.为了提供更好的调度能力,Falcon将推出自己的调度器。
控制流 即使实际工作中,调度器(Oozie)负责工作流,Falcon通过订阅每一个工作流可能产生的信息依旧保持着执行路径。当Falcon在Oozie中产生一个工作流,When Falcon generates a workflow in Oozie, it does so, after instrumenting the workflow with additional steps which includes messaging via JMS.Falcon能够订阅这些控制信息和能够完成例如撤销,处理后序数据等的展示。
Feed Schedule flow
Process Schedule flow
部署模式 Falcon有两种基本组件:Falcon Prism and Falcon Server,正如这个名字所说Falcon Prism切割到达Falcon server的请求。
Distributed Mode(分布式) 分布式模式是为了多个hadoop集群的案例,以及需要多个工作流调度器去调度他们。在这种模式中,falcon有两个组件Prism and Server(s),每个Prism and servers都会有他们自己的计划配置(运行时间和启动任务所具备的配置)以及他们各自的配置位置。在这个模式中Prism作为两个falconServer的连接点,所有的命令对于Prism都适用,但是只有read and instance api对Server是有用的。接下来的请求能被发送到每一个Hadoop集群:
Communication between prism and falcon server (for submit/update entity function) is secured over https:// using a client-certificate based auth.Prism server需要提供有效的客户端验证才能使Falcon server来接收请求。
存储 Falcon introduces a new abstraction to encapsulate the storage for a given feed which can either be expressed as a path on the file system, 文件系统存储或者在Hcatalog的表,such as Hive, Catalog Storage.
1 2 3 4 任何一个Feed都应该包含其中的一个
File System Storage(文件系统存储) 这表示为文件系统上的一个存储路径,这个路径指定了Feed在这个集群上的哪个地方具有有效性,一个路径的标签包含:data, meta, stats 以及他们相应的路径,一个Feed至少包含data路径标签,这个标签指定了feed周期性产生数据的HDFS的路径,例如: ex: type=”data” path=”/projects/TrafficHourly/YEAR−YEAR−{MONTH}-${DAY}/traffic” The granularity of date pattern in the path should be at least that of a frequency of a feed.
1 2 3 Catalog Storage (Table)表
一个表的标签指定了在catalog中注册的表的URI:
catalog:$database-name:$table-name#partition-key=partition-value);partition-key=partition-value);* 1 这是一个URI的模板,它并没有对 Hive or HCatalog任何的参考,它对于所有实现catalog registry都能够适用,The catalog implementation specified in the startup config provides implementation for the catalog URI. 高级分区必须是一个日期的模式,在日期模式的设置必须和feed的频率设置一致。
Update操作允许对早已经提交或者调度的实体进行更新操作,更新Feed可能导致所有串联的Process进行更新,Process update triggers update in falcon if entity is scheduled.
Cluster update will require user to update dependent Feed and Process entities that are already scheduled. 集群更新需要在falcon安全模式下进行. We provide a CLI command for the user to update the scheduled dependent entities after cluster update and exiting safemode.
For example, in order to import and export with MySQL, please make sure the latest MySQL connector
*mysql-connector-java-5.1.31.jar+* is copied into oozie's Sqoop share lib
/user/oozie/share/lib/{lib-dir}/sqoop/mysql-connector-java-5.1.31.jar+
where {lib-dir} value varies in oozie deployments.
当读接口和写接口的凭据不能使用时,将使用默认的凭据The default credential specifies the password using password alias feature available via hadoop credential functionality. 用户可以创建一个秘钥使用如下命令:
hadoop credential -create -provider
1
where is a string and is a HDFS jceks file,在运行期间 ,the specified alias will be used to look up the password stored encrypted in the jceks hdfs file specified under the providerPath element.
导入策略将使用datasource实体指定特定连接特定的数据源,表名应该在存在引用的数据库中,导入过程可以指定导入特定的字段并且可以指定是每次都是全部一次性倒入或者增量导入, The merge policy specifies how to organize (snapshot or append, i.e time series partiitons) the data on hadoop.有效的组合是:
[full,snapshot] :数据每次被全部抽取并且被保存在Feed指定的位置。
[incremental, append] :data is extracted incrementally using the key specified in the deltacolumn and added as a partition to the feed instance location.
视图控制层代码demo如下:
@Controller
@RequestMapping("/")
public class MessageController {
private final MessageRepository messageRepository;
@Autowired
public MessageController(Mes
作为一名
Linux SA,日常运维中很多地方都会用到脚本,而服务器的ip一般采用静态ip或者MAC绑定,当然后者比较操作起来相对繁琐,而前者我们可以设置主机名、ip信息、网关等配置。修改成特定的主机名在维护和管理方面也比较方便。如下脚本用途为:修改ip和主机名等相关信息,可以根据实际需求修改,举一反三!
#!/bin/sh
#auto Change ip netmask ga