> On Dec. 17, 2014, 5:21 a.m., Neha Narkhede wrote: > > core/src/main/scala/kafka/server/BrokerMetadataFileHandler.scala, line 46 > > <https://reviews.apache.org/r/23702/diff/8/?file=776402#file776402line46> > > > > If this crashes before syncing the data, it might lead to a corrupted > > meta.properties file. We should probably write to a tmp file and atomically > > swap it in, similar to how we handle writes in other checkpoint files (eg. > > OffsetCheckpoint). > > > > Also, how about naming this BrokerMetadata?
I am usng BrokerMetadata as a case class and pass it to BrokerMetadataFileHandler.write . I thought the case class going to be easy to expand in the future if we would like to add more data to BrokerMetadata. I can mimick OffsetCheckpoint and just pass the brokerId to write method. Let me know what you think. - Sriharsha ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/23702/#review65293 ----------------------------------------------------------- On Jan. 2, 2015, 1:39 a.m., Sriharsha Chintalapani wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/23702/ > ----------------------------------------------------------- > > (Updated Jan. 2, 2015, 1:39 a.m.) > > > Review request for kafka. > > > Bugs: KAFKA-1070 > https://issues.apache.org/jira/browse/KAFKA-1070 > > > Repository: kafka > > > Description > ------- > > KAFKA-1070. Auto-assign node id. > > > Diffs > ----- > > core/src/main/scala/kafka/common/GenerateBrokerIdException.scala > PRE-CREATION > core/src/main/scala/kafka/common/InconsistentBrokerIdException.scala > PRE-CREATION > core/src/main/scala/kafka/server/BrokerMetadataFileHandler.scala > PRE-CREATION > core/src/main/scala/kafka/server/KafkaConfig.scala > 6e26c5436feb4629d17f199011f3ebb674aa767f > core/src/main/scala/kafka/server/KafkaServer.scala > 1bf7d10cef23a77e716666eb16bf6d0e68bc4ebe > core/src/main/scala/kafka/utils/ZkUtils.scala > 56e3e88e0cc6d917b0ffd1254e173295c1c4aabd > core/src/test/scala/unit/kafka/server/ServerGenerateBrokerIdTest.scala > PRE-CREATION > core/src/test/scala/unit/kafka/utils/TestUtils.scala > 94d0028d8c4907e747aa8a74a13d719b974c97bf > > Diff: https://reviews.apache.org/r/23702/diff/ > > > Testing > ------- > > > Thanks, > > Sriharsha Chintalapani > >