Repository: falcon Updated Branches: refs/heads/master c087f9e83 -> 3849c7c52
FALCON-1147 Allow _ in the names for name value pair. Contributed by Sowmya Ramesh Project: http://git-wip-us.apache.org/repos/asf/falcon/repo Commit: http://git-wip-us.apache.org/repos/asf/falcon/commit/3849c7c5 Tree: http://git-wip-us.apache.org/repos/asf/falcon/tree/3849c7c5 Diff: http://git-wip-us.apache.org/repos/asf/falcon/diff/3849c7c5 Branch: refs/heads/master Commit: 3849c7c520c12cc28cf8833bd664923815c13212 Parents: c087f9e Author: Ajay Yadava <[email protected]> Authored: Tue Jun 9 10:18:20 2015 +0530 Committer: Ajay Yadava <[email protected]> Committed: Tue Jun 9 10:18:20 2015 +0530 ---------------------------------------------------------------------- CHANGES.txt | 2 ++ client/src/main/resources/cluster-0.1.xsd | 2 +- client/src/main/resources/feed-0.1.xsd | 2 +- client/src/main/resources/process-0.1.xsd | 2 +- .../org/apache/falcon/entity/parser/ClusterEntityParserTest.java | 4 ++-- .../org/apache/falcon/entity/parser/ProcessEntityParserTest.java | 2 +- common/src/test/resources/config/cluster/cluster-0.1.xml | 2 +- common/src/test/resources/config/feed/feed-0.1.xml | 1 + common/src/test/resources/config/process/process-0.1.xml | 2 +- 9 files changed, 11 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/falcon/blob/3849c7c5/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 27813d5..f12e1cc 100755 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,8 @@ Trunk (Unreleased) FALCON-1039 Add instance dependency API in falcon(Ajay Yadava) IMPROVEMENTS + FALCON-1147 Allow _ in the names for name value pair(Sowmya Ramesh via Ajay Yadava) + FALCON-676 Enable metrics for Titan(Ajay Yadava) FALCON-1060 Handle transaction failures in Lineage(Pavan Kumar Kolamuri via Ajay Yadava) http://git-wip-us.apache.org/repos/asf/falcon/blob/3849c7c5/client/src/main/resources/cluster-0.1.xsd ---------------------------------------------------------------------- diff --git a/client/src/main/resources/cluster-0.1.xsd b/client/src/main/resources/cluster-0.1.xsd index dd2c171..34e3689 100644 --- a/client/src/main/resources/cluster-0.1.xsd +++ b/client/src/main/resources/cluster-0.1.xsd @@ -185,7 +185,7 @@ </xs:simpleType> <xs:simpleType name="KEY_VALUE_PAIR"> <xs:restriction base="xs:string"> - <xs:pattern value="(\w+=[^,]+)?([,]?[ ]*[\w]+=[^,]+)*"/> + <xs:pattern value="([\w_]+=[^,]+)?([,]?[ ]*[\w_]+=[^,]+)*"/> </xs:restriction> </xs:simpleType> <xs:complexType name="ACL"> http://git-wip-us.apache.org/repos/asf/falcon/blob/3849c7c5/client/src/main/resources/feed-0.1.xsd ---------------------------------------------------------------------- diff --git a/client/src/main/resources/feed-0.1.xsd b/client/src/main/resources/feed-0.1.xsd index a228b29..4ff8baa 100644 --- a/client/src/main/resources/feed-0.1.xsd +++ b/client/src/main/resources/feed-0.1.xsd @@ -378,7 +378,7 @@ </xs:simpleType> <xs:simpleType name="KEY_VALUE_PAIR"> <xs:restriction base="xs:string"> - <xs:pattern value="(\w+=[^,]+)?([,]?[ ]*[\w]+=[^,]+)*"/> + <xs:pattern value="([\w_]+=[^,]+)?([,]?[ ]*[\w_]+=[^,]+)*"/> </xs:restriction> </xs:simpleType> <xs:complexType name="catalog-table"> http://git-wip-us.apache.org/repos/asf/falcon/blob/3849c7c5/client/src/main/resources/process-0.1.xsd ---------------------------------------------------------------------- diff --git a/client/src/main/resources/process-0.1.xsd b/client/src/main/resources/process-0.1.xsd index 2d64716..7f62aac 100644 --- a/client/src/main/resources/process-0.1.xsd +++ b/client/src/main/resources/process-0.1.xsd @@ -378,7 +378,7 @@ <xs:simpleType name="KEY_VALUE_PAIR"> <xs:restriction base="xs:string"> - <xs:pattern value="(\w+=[^,]+)?([,]?[ ]*[\w]+=[^,]+)*"/> + <xs:pattern value="([\w_]+=[^,]+)?([,]?[ ]*[\w_]+=[^,]+)*"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="PIPELINE_LIST"> http://git-wip-us.apache.org/repos/asf/falcon/blob/3849c7c5/common/src/test/java/org/apache/falcon/entity/parser/ClusterEntityParserTest.java ---------------------------------------------------------------------- diff --git a/common/src/test/java/org/apache/falcon/entity/parser/ClusterEntityParserTest.java b/common/src/test/java/org/apache/falcon/entity/parser/ClusterEntityParserTest.java index 69230b2..b7886bd 100644 --- a/common/src/test/java/org/apache/falcon/entity/parser/ClusterEntityParserTest.java +++ b/common/src/test/java/org/apache/falcon/entity/parser/ClusterEntityParserTest.java @@ -147,9 +147,9 @@ public class ClusterEntityParserTest extends AbstractTestBase { Cluster cluster = parser.parse(stream); final String tags = cluster.getTags(); - Assert.assertEquals("[email protected], [email protected], department=forecasting", tags); + Assert.assertEquals("[email protected], [email protected], _department_type=forecasting", tags); - final String[] keys = {"consumer", "owner", "department", }; + final String[] keys = {"consumer", "owner", "_department_type", }; final String[] values = {"[email protected]", "[email protected]", "forecasting", }; final String[] pairs = tags.split(","); http://git-wip-us.apache.org/repos/asf/falcon/blob/3849c7c5/common/src/test/java/org/apache/falcon/entity/parser/ProcessEntityParserTest.java ---------------------------------------------------------------------- diff --git a/common/src/test/java/org/apache/falcon/entity/parser/ProcessEntityParserTest.java b/common/src/test/java/org/apache/falcon/entity/parser/ProcessEntityParserTest.java index 432e92a..8783081 100644 --- a/common/src/test/java/org/apache/falcon/entity/parser/ProcessEntityParserTest.java +++ b/common/src/test/java/org/apache/falcon/entity/parser/ProcessEntityParserTest.java @@ -96,7 +96,7 @@ public class ProcessEntityParserTest extends AbstractTestBase { Assert.assertEquals(process.getEntityType(), EntityType.PROCESS); Assert.assertEquals(process.getTags(), - "[email protected], [email protected], department=forecasting"); + "[email protected], [email protected], _department_type=forecasting"); Assert.assertEquals(process.getPipelines(), "testPipeline,dataReplication_Pipeline"); Assert.assertEquals(process.getInputs().getInputs().get(0).getName(), "impression"); http://git-wip-us.apache.org/repos/asf/falcon/blob/3849c7c5/common/src/test/resources/config/cluster/cluster-0.1.xml ---------------------------------------------------------------------- diff --git a/common/src/test/resources/config/cluster/cluster-0.1.xml b/common/src/test/resources/config/cluster/cluster-0.1.xml index 35bfbbb..5e36f72 100644 --- a/common/src/test/resources/config/cluster/cluster-0.1.xml +++ b/common/src/test/resources/config/cluster/cluster-0.1.xml @@ -18,7 +18,7 @@ --> <cluster colo="default" description="" name="testCluster" xmlns="uri:falcon:cluster:0.1"> - <tags>[email protected], [email protected], department=forecasting</tags> + <tags>[email protected], [email protected], _department_type=forecasting</tags> <interfaces> <interface type="readonly" endpoint="hftp://localhost:50010" version="0.20.2"/> http://git-wip-us.apache.org/repos/asf/falcon/blob/3849c7c5/common/src/test/resources/config/feed/feed-0.1.xml ---------------------------------------------------------------------- diff --git a/common/src/test/resources/config/feed/feed-0.1.xml b/common/src/test/resources/config/feed/feed-0.1.xml index aa1998f..f8518c5 100644 --- a/common/src/test/resources/config/feed/feed-0.1.xml +++ b/common/src/test/resources/config/feed/feed-0.1.xml @@ -18,6 +18,7 @@ --> <feed description="clicks log" name="clicks" xmlns="uri:falcon:feed:0.1" > + <tags>[email protected], [email protected], _department_type=forecasting</tags> <partitions> <partition name="fraud"/> <partition name="good"/> http://git-wip-us.apache.org/repos/asf/falcon/blob/3849c7c5/common/src/test/resources/config/process/process-0.1.xml ---------------------------------------------------------------------- diff --git a/common/src/test/resources/config/process/process-0.1.xml b/common/src/test/resources/config/process/process-0.1.xml index a4cfb46..2659903 100644 --- a/common/src/test/resources/config/process/process-0.1.xml +++ b/common/src/test/resources/config/process/process-0.1.xml @@ -17,7 +17,7 @@ limitations under the License. --> <process name="sample" xmlns="uri:falcon:process:0.1"> - <tags>[email protected], [email protected], department=forecasting</tags> + <tags>[email protected], [email protected], _department_type=forecasting</tags> <pipelines>testPipeline,dataReplication_Pipeline</pipelines> <clusters> <cluster name="testCluster">
