> On Jan. 11, 2017, 9:41 a.m., Robert Levas wrote: > > ambari-server/src/main/java/org/apache/ambari/server/metadata/RoleCommandOrder.java, > > line 405 > > <https://reviews.apache.org/r/55391/diff/1/?file=1601797#file1601797line405> > > > > This isn't a deep copy of the map. Will that be an issue?
No, it shouldn't be. A new map is created, but it takes the references to the Set<> instances along with it. That's OK since there's no way to directly modify that Set. Instead, you can call initalize() again which will blow away the references for the cloned instance. - Jonathan ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/55391/#review161121 ----------------------------------------------------------- On Jan. 10, 2017, 4:24 p.m., Jonathan Hurley wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/55391/ > ----------------------------------------------------------- > > (Updated Jan. 10, 2017, 4:24 p.m.) > > > Review request for Ambari, Nate Cole, Robert Levas, and Sid Wagle. > > > Bugs: AMBARI-19448 > https://issues.apache.org/jira/browse/AMBARI-19448 > > > Repository: ambari > > > Description > ------- > > As of AMBARI-19435, HOU now uses the role command ordering to determine how > to start components on a host. This is because some components (such as > NodeManager and DataNode) require their masters to be online first in order > to register correctly. When co-located on the same host, masters and slaves > must be started in the correct order. > > However, some ordering defined on the stack will not work for HOU. For > example, the stack doesn't enforce that NameNode start before DataNode. This > is because in a normal start command, the DataNode can wait for up to 30 > minutes for the NameNode to come online. During an upgrade, the upgrade logic > waits to ensure that the DataNode is online and registered before moving on. > Since the role ordering allows DataNode to start first, this start always > fails during an upgrade. > > In order to allow this custom ordering, a new section was added for upgrades > to the role_command_order.json. > > ``` > { > "_comment" : "Record format:", > "_comment" : "blockedRole-blockedCommand: [blockerRole1-blockerCommand1 ... > ", > "general_deps" : { > ... > }, > "host_ordered_upgrade" : { > "DATANODE-START": ["NAMENODE-START"] > } > ``` > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/metadata/CachedRoleCommandOrderProvider.java > 7cf197b > > ambari-server/src/main/java/org/apache/ambari/server/metadata/RoleCommandOrder.java > cebc1b7 > > ambari-server/src/main/java/org/apache/ambari/server/state/stack/StackRoleCommandOrder.java > b660ec1 > > ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/HostOrderGrouping.java > abb2aab > ambari-server/src/main/resources/stacks/HDP/2.5/role_command_order.json > 5a9825d > > ambari-server/src/test/java/org/apache/ambari/server/metadata/RoleCommandOrderTest.java > f0a40c9 > ambari-server/src/test/resources/stacks/HDP/2.2.0/role_command_order.json > faaee6e > > Diff: https://reviews.apache.org/r/55391/diff/ > > > Testing > ------- > > PENDING... > > > Thanks, > > Jonathan Hurley > >
