[15/50] hadoop git commit: HDDS-187. Command status publisher for datanode. Contributed by Ajay Kumar.
HDDS-187. Command status publisher for datanode. Contributed by Ajay Kumar. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/f89e2659 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/f89e2659 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/f89e2659 Branch: refs/heads/HDFS-13572 Commit: f89e265905f39c8e51263a3946a8b8e6ab4ebad9 Parents: 87eeb26 Author: Anu Engineer Authored: Thu Jul 12 21:34:32 2018 -0700 Committer: Anu Engineer Committed: Thu Jul 12 21:35:12 2018 -0700 -- .../org/apache/hadoop/hdds/HddsConfigKeys.java | 8 + .../org/apache/hadoop/hdds/HddsIdFactory.java | 53 ++ .../common/src/main/resources/ozone-default.xml | 9 + .../apache/hadoop/utils/TestHddsIdFactory.java | 77 + .../report/CommandStatusReportPublisher.java| 71 .../common/report/ReportPublisher.java | 9 + .../common/report/ReportPublisherFactory.java | 4 + .../statemachine/DatanodeStateMachine.java | 2 + .../common/statemachine/StateContext.java | 70 .../CloseContainerCommandHandler.java | 5 +- .../commandhandler/CommandHandler.java | 11 ++ .../DeleteBlocksCommandHandler.java | 166 ++- .../ReplicateContainerCommandHandler.java | 7 +- .../commands/CloseContainerCommand.java | 36 ++-- .../ozone/protocol/commands/CommandStatus.java | 141 .../protocol/commands/DeleteBlocksCommand.java | 13 +- .../commands/ReplicateContainerCommand.java | 20 ++- .../protocol/commands/ReregisterCommand.java| 10 ++ .../ozone/protocol/commands/SCMCommand.java | 19 +++ .../StorageContainerDatanodeProtocol.proto | 21 +++ .../ozone/container/common/ScmTestMock.java | 33 +++- .../common/report/TestReportPublisher.java | 75 - .../hadoop/hdds/scm/events/SCMEvents.java | 57 --- .../server/SCMDatanodeHeartbeatDispatcher.java | 23 ++- .../TestSCMDatanodeHeartbeatDispatcher.java | 25 ++- .../ozone/container/common/TestEndPoint.java| 111 - 26 files changed, 935 insertions(+), 141 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/f89e2659/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsConfigKeys.java -- diff --git a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsConfigKeys.java b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsConfigKeys.java index dec2c1c..8b449fb 100644 --- a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsConfigKeys.java +++ b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsConfigKeys.java @@ -17,7 +17,15 @@ */ package org.apache.hadoop.hdds; +import org.apache.hadoop.hdds.scm.ScmConfigKeys; +/** + * Config class for HDDS. + */ public final class HddsConfigKeys { private HddsConfigKeys() { } + public static final String HDDS_COMMAND_STATUS_REPORT_INTERVAL = + "hdds.command.status.report.interval"; + public static final String HDDS_COMMAND_STATUS_REPORT_INTERVAL_DEFAULT = + ScmConfigKeys.OZONE_SCM_HEARBEAT_INTERVAL_DEFAULT; } http://git-wip-us.apache.org/repos/asf/hadoop/blob/f89e2659/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsIdFactory.java -- diff --git a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsIdFactory.java b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsIdFactory.java new file mode 100644 index 000..b244b8c --- /dev/null +++ b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsIdFactory.java @@ -0,0 +1,53 @@ +/** + * 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.hdds; + +import java.util.UUID; +import java.util.concurrent.atomic.AtomicLong; + +/** + * HDDS Id generator. + */ +public final class HddsIdFactory { + private HddsIdFactory() { + } + + private static final AtomicLong
[08/32] hadoop git commit: HDDS-187. Command status publisher for datanode. Contributed by Ajay Kumar.
HDDS-187. Command status publisher for datanode. Contributed by Ajay Kumar. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/f89e2659 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/f89e2659 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/f89e2659 Branch: refs/heads/HDFS-12943 Commit: f89e265905f39c8e51263a3946a8b8e6ab4ebad9 Parents: 87eeb26 Author: Anu Engineer Authored: Thu Jul 12 21:34:32 2018 -0700 Committer: Anu Engineer Committed: Thu Jul 12 21:35:12 2018 -0700 -- .../org/apache/hadoop/hdds/HddsConfigKeys.java | 8 + .../org/apache/hadoop/hdds/HddsIdFactory.java | 53 ++ .../common/src/main/resources/ozone-default.xml | 9 + .../apache/hadoop/utils/TestHddsIdFactory.java | 77 + .../report/CommandStatusReportPublisher.java| 71 .../common/report/ReportPublisher.java | 9 + .../common/report/ReportPublisherFactory.java | 4 + .../statemachine/DatanodeStateMachine.java | 2 + .../common/statemachine/StateContext.java | 70 .../CloseContainerCommandHandler.java | 5 +- .../commandhandler/CommandHandler.java | 11 ++ .../DeleteBlocksCommandHandler.java | 166 ++- .../ReplicateContainerCommandHandler.java | 7 +- .../commands/CloseContainerCommand.java | 36 ++-- .../ozone/protocol/commands/CommandStatus.java | 141 .../protocol/commands/DeleteBlocksCommand.java | 13 +- .../commands/ReplicateContainerCommand.java | 20 ++- .../protocol/commands/ReregisterCommand.java| 10 ++ .../ozone/protocol/commands/SCMCommand.java | 19 +++ .../StorageContainerDatanodeProtocol.proto | 21 +++ .../ozone/container/common/ScmTestMock.java | 33 +++- .../common/report/TestReportPublisher.java | 75 - .../hadoop/hdds/scm/events/SCMEvents.java | 57 --- .../server/SCMDatanodeHeartbeatDispatcher.java | 23 ++- .../TestSCMDatanodeHeartbeatDispatcher.java | 25 ++- .../ozone/container/common/TestEndPoint.java| 111 - 26 files changed, 935 insertions(+), 141 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/f89e2659/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsConfigKeys.java -- diff --git a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsConfigKeys.java b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsConfigKeys.java index dec2c1c..8b449fb 100644 --- a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsConfigKeys.java +++ b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsConfigKeys.java @@ -17,7 +17,15 @@ */ package org.apache.hadoop.hdds; +import org.apache.hadoop.hdds.scm.ScmConfigKeys; +/** + * Config class for HDDS. + */ public final class HddsConfigKeys { private HddsConfigKeys() { } + public static final String HDDS_COMMAND_STATUS_REPORT_INTERVAL = + "hdds.command.status.report.interval"; + public static final String HDDS_COMMAND_STATUS_REPORT_INTERVAL_DEFAULT = + ScmConfigKeys.OZONE_SCM_HEARBEAT_INTERVAL_DEFAULT; } http://git-wip-us.apache.org/repos/asf/hadoop/blob/f89e2659/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsIdFactory.java -- diff --git a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsIdFactory.java b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsIdFactory.java new file mode 100644 index 000..b244b8c --- /dev/null +++ b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsIdFactory.java @@ -0,0 +1,53 @@ +/** + * 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.hdds; + +import java.util.UUID; +import java.util.concurrent.atomic.AtomicLong; + +/** + * HDDS Id generator. + */ +public final class HddsIdFactory { + private HddsIdFactory() { + } + + private static final AtomicLong
[38/50] [abbrv] hadoop git commit: HDDS-187. Command status publisher for datanode. Contributed by Ajay Kumar.
HDDS-187. Command status publisher for datanode. Contributed by Ajay Kumar. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/f89e2659 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/f89e2659 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/f89e2659 Branch: refs/heads/YARN-7402 Commit: f89e265905f39c8e51263a3946a8b8e6ab4ebad9 Parents: 87eeb26 Author: Anu Engineer Authored: Thu Jul 12 21:34:32 2018 -0700 Committer: Anu Engineer Committed: Thu Jul 12 21:35:12 2018 -0700 -- .../org/apache/hadoop/hdds/HddsConfigKeys.java | 8 + .../org/apache/hadoop/hdds/HddsIdFactory.java | 53 ++ .../common/src/main/resources/ozone-default.xml | 9 + .../apache/hadoop/utils/TestHddsIdFactory.java | 77 + .../report/CommandStatusReportPublisher.java| 71 .../common/report/ReportPublisher.java | 9 + .../common/report/ReportPublisherFactory.java | 4 + .../statemachine/DatanodeStateMachine.java | 2 + .../common/statemachine/StateContext.java | 70 .../CloseContainerCommandHandler.java | 5 +- .../commandhandler/CommandHandler.java | 11 ++ .../DeleteBlocksCommandHandler.java | 166 ++- .../ReplicateContainerCommandHandler.java | 7 +- .../commands/CloseContainerCommand.java | 36 ++-- .../ozone/protocol/commands/CommandStatus.java | 141 .../protocol/commands/DeleteBlocksCommand.java | 13 +- .../commands/ReplicateContainerCommand.java | 20 ++- .../protocol/commands/ReregisterCommand.java| 10 ++ .../ozone/protocol/commands/SCMCommand.java | 19 +++ .../StorageContainerDatanodeProtocol.proto | 21 +++ .../ozone/container/common/ScmTestMock.java | 33 +++- .../common/report/TestReportPublisher.java | 75 - .../hadoop/hdds/scm/events/SCMEvents.java | 57 --- .../server/SCMDatanodeHeartbeatDispatcher.java | 23 ++- .../TestSCMDatanodeHeartbeatDispatcher.java | 25 ++- .../ozone/container/common/TestEndPoint.java| 111 - 26 files changed, 935 insertions(+), 141 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/f89e2659/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsConfigKeys.java -- diff --git a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsConfigKeys.java b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsConfigKeys.java index dec2c1c..8b449fb 100644 --- a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsConfigKeys.java +++ b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsConfigKeys.java @@ -17,7 +17,15 @@ */ package org.apache.hadoop.hdds; +import org.apache.hadoop.hdds.scm.ScmConfigKeys; +/** + * Config class for HDDS. + */ public final class HddsConfigKeys { private HddsConfigKeys() { } + public static final String HDDS_COMMAND_STATUS_REPORT_INTERVAL = + "hdds.command.status.report.interval"; + public static final String HDDS_COMMAND_STATUS_REPORT_INTERVAL_DEFAULT = + ScmConfigKeys.OZONE_SCM_HEARBEAT_INTERVAL_DEFAULT; } http://git-wip-us.apache.org/repos/asf/hadoop/blob/f89e2659/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsIdFactory.java -- diff --git a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsIdFactory.java b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsIdFactory.java new file mode 100644 index 000..b244b8c --- /dev/null +++ b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsIdFactory.java @@ -0,0 +1,53 @@ +/** + * 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.hdds; + +import java.util.UUID; +import java.util.concurrent.atomic.AtomicLong; + +/** + * HDDS Id generator. + */ +public final class HddsIdFactory { + private HddsIdFactory() { + } + + private static final AtomicLong
hadoop git commit: HDDS-187. Command status publisher for datanode. Contributed by Ajay Kumar.
Repository: hadoop Updated Branches: refs/heads/trunk 87eeb26e7 -> f89e26590 HDDS-187. Command status publisher for datanode. Contributed by Ajay Kumar. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/f89e2659 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/f89e2659 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/f89e2659 Branch: refs/heads/trunk Commit: f89e265905f39c8e51263a3946a8b8e6ab4ebad9 Parents: 87eeb26 Author: Anu Engineer Authored: Thu Jul 12 21:34:32 2018 -0700 Committer: Anu Engineer Committed: Thu Jul 12 21:35:12 2018 -0700 -- .../org/apache/hadoop/hdds/HddsConfigKeys.java | 8 + .../org/apache/hadoop/hdds/HddsIdFactory.java | 53 ++ .../common/src/main/resources/ozone-default.xml | 9 + .../apache/hadoop/utils/TestHddsIdFactory.java | 77 + .../report/CommandStatusReportPublisher.java| 71 .../common/report/ReportPublisher.java | 9 + .../common/report/ReportPublisherFactory.java | 4 + .../statemachine/DatanodeStateMachine.java | 2 + .../common/statemachine/StateContext.java | 70 .../CloseContainerCommandHandler.java | 5 +- .../commandhandler/CommandHandler.java | 11 ++ .../DeleteBlocksCommandHandler.java | 166 ++- .../ReplicateContainerCommandHandler.java | 7 +- .../commands/CloseContainerCommand.java | 36 ++-- .../ozone/protocol/commands/CommandStatus.java | 141 .../protocol/commands/DeleteBlocksCommand.java | 13 +- .../commands/ReplicateContainerCommand.java | 20 ++- .../protocol/commands/ReregisterCommand.java| 10 ++ .../ozone/protocol/commands/SCMCommand.java | 19 +++ .../StorageContainerDatanodeProtocol.proto | 21 +++ .../ozone/container/common/ScmTestMock.java | 33 +++- .../common/report/TestReportPublisher.java | 75 - .../hadoop/hdds/scm/events/SCMEvents.java | 57 --- .../server/SCMDatanodeHeartbeatDispatcher.java | 23 ++- .../TestSCMDatanodeHeartbeatDispatcher.java | 25 ++- .../ozone/container/common/TestEndPoint.java| 111 - 26 files changed, 935 insertions(+), 141 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/f89e2659/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsConfigKeys.java -- diff --git a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsConfigKeys.java b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsConfigKeys.java index dec2c1c..8b449fb 100644 --- a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsConfigKeys.java +++ b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsConfigKeys.java @@ -17,7 +17,15 @@ */ package org.apache.hadoop.hdds; +import org.apache.hadoop.hdds.scm.ScmConfigKeys; +/** + * Config class for HDDS. + */ public final class HddsConfigKeys { private HddsConfigKeys() { } + public static final String HDDS_COMMAND_STATUS_REPORT_INTERVAL = + "hdds.command.status.report.interval"; + public static final String HDDS_COMMAND_STATUS_REPORT_INTERVAL_DEFAULT = + ScmConfigKeys.OZONE_SCM_HEARBEAT_INTERVAL_DEFAULT; } http://git-wip-us.apache.org/repos/asf/hadoop/blob/f89e2659/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsIdFactory.java -- diff --git a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsIdFactory.java b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsIdFactory.java new file mode 100644 index 000..b244b8c --- /dev/null +++ b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/HddsIdFactory.java @@ -0,0 +1,53 @@ +/** + * 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.hdds; + +import java.util.UUID; +import java.util.concurrent.atomic.AtomicLong; + +/** + * HDDS Id generator. + */ +public final class