| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" |
| targetNamespace="uri:falcon:cluster:0.1" xmlns="uri:falcon:cluster:0.1" |
| xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="2.1"> |
| <xs:annotation> |
| <xs:documentation> |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version |
| 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| </xs:documentation> |
| <xs:appinfo> |
| <jaxb:schemaBindings> |
| <jaxb:package name="org.apache.falcon.entity.v0.cluster"/> |
| </jaxb:schemaBindings> |
| </xs:appinfo> |
| </xs:annotation> |
| <xs:element name="cluster" type="cluster"> |
| </xs:element> |
| <xs:complexType name="cluster"> |
| <xs:annotation> |
| <xs:documentation>The cluster contains the definition of different |
| interfaces which are used by Falcon like readonly, write, workflow and messaging. |
| A cluster is referenced by feeds and processes which are on-boarded |
| to Falcon by its name. |
| name: the name of cluster, which must be unique. |
| colo: the name of the colo to which this cluster belongs to. |
| </xs:documentation> |
| </xs:annotation> |
| <xs:sequence> |
| <xs:element type="KEY_VALUE_PAIR" name="tags" minOccurs="0"> |
| <xs:annotation> |
| <xs:documentation> |
| tags: a process specifies an optional list of comma separated tags, |
| Key Value Pairs, separated by comma, |
| which is used for classification of processes. |
| Example: consumer=consumer@xyz.com, owner=producer@xyz.com, department=forecasting |
| </xs:documentation> |
| </xs:annotation> |
| </xs:element> |
| <xs:element type="interfaces" name="interfaces"/> |
| <xs:element type="locations" name="locations"/> |
| <xs:element type="properties" name="properties" minOccurs="0"/> |
| </xs:sequence> |
| <xs:attribute type="IDENTIFIER" name="name" use="required"/> |
| <xs:attribute type="xs:string" name="description"/> |
| <xs:attribute type="xs:string" name="colo" use="required"/> |
| </xs:complexType> |
| <xs:complexType name="locations"> |
| <xs:annotation> |
| <xs:documentation>A list of locations on cluster. |
| </xs:documentation> |
| </xs:annotation> |
| <xs:sequence> |
| <xs:element type="location" name="location" maxOccurs="unbounded" minOccurs="1"/> |
| </xs:sequence> |
| </xs:complexType> |
| <xs:complexType name="property"> |
| <xs:annotation> |
| <xs:documentation> |
| A key-value pair, which are propagated to the |
| workflow engine. |
| Ideally the Mapred's job queue name (queueName) and |
| JMS impl class nameof messaging engine (brokerImplClass) |
| should be defined here. |
| </xs:documentation> |
| </xs:annotation> |
| <xs:attribute type="xs:string" name="name" use="required"/> |
| <xs:attribute type="xs:string" name="value" use="required"/> |
| </xs:complexType> |
| <xs:complexType name="interface"> |
| <xs:annotation> |
| <xs:documentation> |
| An interface specifies the interface type, Falcon uses it to schedule |
| entities in workflow engine, to save and read data from hadoop and to |
| publish messages to messaging engine. |
| endpoint: is the url for each interface; examples: for write it is the |
| url of hdfs (fs.default.name) and |
| for workflow it is url of workflow engine like oozie. |
| version: The current runtime version of each interface. |
| </xs:documentation> |
| </xs:annotation> |
| <xs:attribute type="interfacetype" name="type" use="required"/> |
| <xs:attribute type="xs:string" name="endpoint" use="required"/> |
| <xs:attribute type="xs:string" name="version" use="required"/> |
| </xs:complexType> |
| <xs:complexType name="properties"> |
| <xs:annotation> |
| <xs:documentation> |
| A list of property elements. |
| </xs:documentation> |
| </xs:annotation> |
| <xs:sequence> |
| <xs:element type="property" name="property" maxOccurs="unbounded" minOccurs="0"/> |
| </xs:sequence> |
| </xs:complexType> |
| <xs:complexType name="location"> |
| <xs:annotation> |
| <xs:documentation> |
| Location has the name and the path. |
| name: is the type of locations like |
| staging, temp and working. |
| path: the hdfs path for each location. |
| Falcon would use the location to do intermediate |
| processing of entities in hdfs and hence Falcon |
| should have read/write/execute permission on these |
| locations. |
| </xs:documentation> |
| </xs:annotation> |
| <xs:attribute type="IDENTIFIER" name="name" use="required"/> |
| <xs:attribute type="xs:string" name="path" use="required"/> |
| </xs:complexType> |
| <xs:complexType name="interfaces"> |
| <xs:annotation> |
| <xs:documentation> |
| A list of interfaces. |
| </xs:documentation> |
| </xs:annotation> |
| <xs:sequence> |
| <xs:element type="interface" name="interface" maxOccurs="unbounded" minOccurs="3"/> |
| </xs:sequence> |
| </xs:complexType> |
| <xs:simpleType name="interfacetype"> |
| <xs:annotation> |
| <xs:documentation> |
| An interface has 6 different interface types: readonly, write, |
| execute, workflow, messaging, registry. |
| readonly specifies the hadoop's hftp address, it's endpoint is the value of |
| dfs.http.address.ex: hftp://corp.namenode:50070/ |
| write specifies the interface to write to hdfs, it's endpoint is the value |
| of fs.default.name.ex: hdfs://corp.namenode:8020 |
| execute specifies the interface for job tracker, it's endpoint is the value |
| of mapred.job.tracker. ex:corp.jt:8021 |
| workflow specifies the interface for workflow engine, example of it's |
| endpoint is value for OOZIE_URL.ex: http://corp.oozie:11000/oozie |
| messaging specifies the interface for sending feed availability messages, it's |
| endpoint is broker url with tcp address.ex: tcp://corp.messaging:61616?daemon=true |
| registry specifies the interface for Hcatalog. |
| </xs:documentation> |
| </xs:annotation> |
| <xs:restriction base="xs:string"> |
| <xs:enumeration value="readonly"/> |
| <xs:enumeration value="write"/> |
| <xs:enumeration value="execute"/> |
| <xs:enumeration value="workflow"/> |
| <xs:enumeration value="messaging"/> |
| <xs:enumeration value="registry"/> |
| </xs:restriction> |
| </xs:simpleType> |
| <xs:simpleType name="IDENTIFIER"> |
| <xs:restriction base="xs:string"> |
| <xs:pattern value="(([a-zA-Z]([\-a-zA-Z0-9])*){1,39})"/> |
| </xs:restriction> |
| </xs:simpleType> |
| <xs:simpleType name="KEY_VALUE_PAIR"> |
| <xs:restriction base="xs:string"> |
| <xs:pattern value="(\w+=[^,]+)?([,]?[ ]*[\w]+=[^,]+)*"/> |
| </xs:restriction> |
| </xs:simpleType> |
| </xs:schema> |