[hadoop] branch branch-3.1 updated: YARN-9545. Create healthcheck REST endpoint for ATSv2. Contributed by Zoltan Siegl.
This is an automated email from the ASF dual-hosted git repository. sunilg pushed a commit to branch branch-3.1 in repository https://gitbox.apache.org/repos/asf/hadoop.git The following commit(s) were added to refs/heads/branch-3.1 by this push: new d65371c YARN-9545. Create healthcheck REST endpoint for ATSv2. Contributed by Zoltan Siegl. d65371c is described below commit d65371c4e8bbb4ae655ccacda389cd37a18fab32 Author: Sunil G AuthorDate: Thu Jun 6 06:24:01 2019 +0530 YARN-9545. Create healthcheck REST endpoint for ATSv2. Contributed by Zoltan Siegl. (cherry picked from commit f1d3a17d3e67ec2acad52227a3f4eb7cca83e468) --- .../yarn/api/records/timeline/TimelineHealth.java | 82 .../node_modules/.bin/apidoc | 1 + .../node_modules/.bin/markdown-it | 1 + .../node_modules/.bin/r.js | 1 + .../node_modules/.bin/r_js | 1 + .../node_modules/.bin/semver | 1 + .../node_modules/.bin/shjs | 1 + .../yarn.lock | 422 + .../storage/HBaseTimelineReaderImpl.java | 13 + .../reader/TimelineReaderManager.java | 10 + .../reader/TimelineReaderWebServices.java | 33 ++ .../storage/FileSystemTimelineReaderImpl.java | 23 ++ .../timelineservice/storage/TimelineReader.java| 8 + .../reader/TestTimelineReaderWebServices.java | 19 + 14 files changed, 616 insertions(+) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/timeline/TimelineHealth.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/timeline/TimelineHealth.java new file mode 100644 index 000..d592167 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/timeline/TimelineHealth.java @@ -0,0 +1,82 @@ +/** + * 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. + */ +package org.apache.hadoop.yarn.api.records.timeline; + + +import org.apache.hadoop.classification.InterfaceAudience; +import org.apache.hadoop.classification.InterfaceStability; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * This class holds health information for ATS. + */ +@XmlRootElement(name = "health") +@XmlAccessorType(XmlAccessType.NONE) +@InterfaceAudience.Public +@InterfaceStability.Unstable +public class TimelineHealth { + + /** + * Timline health status. + * + * RUNNING - Service is up and running + * READER_CONNECTION_FAULURE - isConnectionAlive() of reader implementation + *reported an error + */ + public enum TimelineHealthStatus { +RUNNING, +READER_CONNECTION_FAILURE + } + + private TimelineHealthStatus healthStatus; + private String diagnosticsInfo; + + public TimelineHealth(TimelineHealthStatus healthy, String diagnosticsInfo) { +this.healthStatus = healthy; +this.diagnosticsInfo = diagnosticsInfo; + } + + public TimelineHealth() { + + } + + @XmlElement(name = "healthStatus") + public TimelineHealthStatus getHealthStatus() { +return healthStatus; + } + + @XmlElement(name = "diagnosticsInfo") + public String getDiagnosticsInfo() { +return diagnosticsInfo; + } + + + public void setHealthStatus(TimelineHealthStatus healthStatus) { +this.healthStatus = healthStatus; + } + + public void setDiagnosticsInfo(String diagnosticsInfo) { +this.diagnosticsInfo = diagnosticsInfo; + } + + +} \ No newline at end of file diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-catalog/hadoop-yarn-applications-catalog-webapp/node_modules/.bin/apidoc b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-catalog/hadoop-yarn-applications-catalog-webapp/node_modules/.bin/apidoc new file mode 12 index 000..a588095 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-ya
[hadoop] branch branch-3.1 updated: YARN-9545. Create healthcheck REST endpoint for ATSv2. Contributed by Zoltan Siegl.
This is an automated email from the ASF dual-hosted git repository. sunilg pushed a commit to branch branch-3.1 in repository https://gitbox.apache.org/repos/asf/hadoop.git The following commit(s) were added to refs/heads/branch-3.1 by this push: new bc028d3 YARN-9545. Create healthcheck REST endpoint for ATSv2. Contributed by Zoltan Siegl. bc028d3 is described below commit bc028d3ebbc62617810d2c358b98bd2c71877dfd Author: Sunil G AuthorDate: Wed Jun 12 19:23:40 2019 +0530 YARN-9545. Create healthcheck REST endpoint for ATSv2. Contributed by Zoltan Siegl. (cherry picked from commit 72203f7a12c943ca231fbc40c058a1a094b009cd) --- .../yarn/api/records/timeline/TimelineHealth.java | 82 ++ .../storage/HBaseTimelineReaderImpl.java | 13 .../reader/TimelineReaderManager.java | 10 +++ .../reader/TimelineReaderWebServices.java | 33 + .../storage/FileSystemTimelineReaderImpl.java | 23 ++ .../timelineservice/storage/TimelineReader.java| 8 +++ .../reader/TestTimelineReaderWebServices.java | 19 + 7 files changed, 188 insertions(+) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/timeline/TimelineHealth.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/timeline/TimelineHealth.java new file mode 100644 index 000..d592167 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/timeline/TimelineHealth.java @@ -0,0 +1,82 @@ +/** + * 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. + */ +package org.apache.hadoop.yarn.api.records.timeline; + + +import org.apache.hadoop.classification.InterfaceAudience; +import org.apache.hadoop.classification.InterfaceStability; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * This class holds health information for ATS. + */ +@XmlRootElement(name = "health") +@XmlAccessorType(XmlAccessType.NONE) +@InterfaceAudience.Public +@InterfaceStability.Unstable +public class TimelineHealth { + + /** + * Timline health status. + * + * RUNNING - Service is up and running + * READER_CONNECTION_FAULURE - isConnectionAlive() of reader implementation + *reported an error + */ + public enum TimelineHealthStatus { +RUNNING, +READER_CONNECTION_FAILURE + } + + private TimelineHealthStatus healthStatus; + private String diagnosticsInfo; + + public TimelineHealth(TimelineHealthStatus healthy, String diagnosticsInfo) { +this.healthStatus = healthy; +this.diagnosticsInfo = diagnosticsInfo; + } + + public TimelineHealth() { + + } + + @XmlElement(name = "healthStatus") + public TimelineHealthStatus getHealthStatus() { +return healthStatus; + } + + @XmlElement(name = "diagnosticsInfo") + public String getDiagnosticsInfo() { +return diagnosticsInfo; + } + + + public void setHealthStatus(TimelineHealthStatus healthStatus) { +this.healthStatus = healthStatus; + } + + public void setDiagnosticsInfo(String diagnosticsInfo) { +this.diagnosticsInfo = diagnosticsInfo; + } + + +} \ No newline at end of file diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase/hadoop-yarn-server-timelineservice-hbase-client/src/main/java/org/apache/hadoop/yarn/server/timelineservice/storage/HBaseTimelineReaderImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase/hadoop-yarn-server-timelineservice-hbase-client/src/main/java/org/apache/hadoop/yarn/server/timelineservice/storage/HBaseTimelineReaderImpl.java index fadfd14..b83d60f 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase/hadoop-yarn-server-timelineservice-hbase-client/src/main/java/org/apache/hadoop/yarn/server/timelineservice/storage/HBaseTimelineReaderImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase/h