From f934f62fc71b4776e88f86d4254de0ea12147511 Mon Sep 17 00:00:00 2001 From: Jian He Date: Sun, 12 Jun 2016 11:32:03 -0700 Subject: [PATCH] YARN-5218. Initial core change for DNS for YARN. Contributed by Jonathan Maron --- hadoop-project/pom.xml | 8 + .../dev-support/findbugs-exclude.xml | 16 +- .../hadoop-yarn/hadoop-yarn-registry/pom.xml | 5 + .../registry/client/api/DNSOperations.java | 60 + .../client/api/DNSOperationsFactory.java | 78 + .../client/api/RegistryConstants.java | 111 +- .../client/impl/zk/CuratorService.java | 266 ++- .../client/impl/zk/ListenerHandle.java | 25 + .../registry/client/impl/zk/PathListener.java | 30 + .../types/yarn/YarnRegistryAttributes.java | 16 +- .../ApplicationServiceRecordProcessor.java | 353 ++++ .../dns/BaseServiceRecordProcessor.java | 469 +++++ .../dns/ContainerServiceRecordProcessor.java | 278 +++ .../server/dns/RecordCreatorFactory.java | 275 +++ .../registry/server/dns/RegistryDNS.java | 1534 +++++++++++++++++ .../server/dns/RegistryDNSServer.java | 290 ++++ .../registry/server/dns/SecureableZone.java | 151 ++ .../server/dns/ServiceRecordProcessor.java | 53 + .../registry/server/dns/ZoneSelector.java | 33 + .../registry/server/dns/package-info.java | 26 + .../registry/server/dns/TestRegistryDNS.java | 561 ++++++ .../server/dns/TestSecureRegistryDNS.java | 44 + .../test/resources/0.17.172.in-addr.arpa.zone | 36 + .../src/test/resources/test.private | 32 + 24 files changed, 4659 insertions(+), 91 deletions(-) create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/java/org/apache/hadoop/registry/client/api/DNSOperations.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/java/org/apache/hadoop/registry/client/api/DNSOperationsFactory.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/java/org/apache/hadoop/registry/client/impl/zk/ListenerHandle.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/java/org/apache/hadoop/registry/client/impl/zk/PathListener.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/java/org/apache/hadoop/registry/server/dns/ApplicationServiceRecordProcessor.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/java/org/apache/hadoop/registry/server/dns/BaseServiceRecordProcessor.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/java/org/apache/hadoop/registry/server/dns/ContainerServiceRecordProcessor.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/java/org/apache/hadoop/registry/server/dns/RecordCreatorFactory.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/java/org/apache/hadoop/registry/server/dns/RegistryDNS.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/java/org/apache/hadoop/registry/server/dns/RegistryDNSServer.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/java/org/apache/hadoop/registry/server/dns/SecureableZone.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/java/org/apache/hadoop/registry/server/dns/ServiceRecordProcessor.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/java/org/apache/hadoop/registry/server/dns/ZoneSelector.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/main/java/org/apache/hadoop/registry/server/dns/package-info.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/test/java/org/apache/hadoop/registry/server/dns/TestRegistryDNS.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/test/java/org/apache/hadoop/registry/server/dns/TestSecureRegistryDNS.java create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/test/resources/0.17.172.in-addr.arpa.zone create mode 100644 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/test/resources/test.private diff --git a/hadoop-project/pom.xml b/hadoop-project/pom.xml index b65f00a713..f5b550ffab 100644 --- a/hadoop-project/pom.xml +++ b/hadoop-project/pom.xml @@ -89,6 +89,7 @@ 2.12.0 3.0.0 3.1.0-RC1 + 2.1.7 11.0.2 4.0 @@ -1217,6 +1218,13 @@ + + + dnsjava + dnsjava + ${dnsjava.version} + +