Grant Henke has posted comments on this change. ( http://gerrit.cloudera.org:8080/13191 )
Change subject: [backup] Support partition alterations between Kudu backups ...................................................................... Patch Set 1: (9 comments) http://gerrit.cloudera.org:8080/#/c/13191/1//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/13191/1//COMMIT_MSG@19 PS1, Line 19: prevously > previously Done http://gerrit.cloudera.org:8080/#/c/13191/1/java/kudu-backup/src/main/scala/org/apache/kudu/backup/KuduRestore.scala File java/kudu-backup/src/main/scala/org/apache/kudu/backup/KuduRestore.scala: http://gerrit.cloudera.org:8080/#/c/13191/1/java/kudu-backup/src/main/scala/org/apache/kudu/backup/KuduRestore.scala@119 PS1, Line 119: catch { : // Passthrough on NonCoveredRangeException. These are the expected way of : // detecting a partition which was dropped between backups and filtering : // out the rows from that dropped partition. : case ncr: NonCoveredRangeException => Unit : } > +1 I went back on forth with this. I will make a change. http://gerrit.cloudera.org:8080/#/c/13191/1/java/kudu-backup/src/main/scala/org/apache/kudu/backup/TableMetadata.scala File java/kudu-backup/src/main/scala/org/apache/kudu/backup/TableMetadata.scala: http://gerrit.cloudera.org:8080/#/c/13191/1/java/kudu-backup/src/main/scala/org/apache/kudu/backup/TableMetadata.scala@330 PS1, Line 330: def getPartitionSchema(metadata: TableMetadataPB): PartitionSchema = { > Method name is kinda confusing given KuduTable.getPartitionSchema. It returns the same thing. One from the metadata and one from the table. http://gerrit.cloudera.org:8080/#/c/13191/1/java/kudu-client/src/main/java/org/apache/kudu/client/KuduPartitioner.java File java/kudu-client/src/main/java/org/apache/kudu/client/KuduPartitioner.java: http://gerrit.cloudera.org:8080/#/c/13191/1/java/kudu-client/src/main/java/org/apache/kudu/client/KuduPartitioner.java@55 PS1, Line 55: Map<String, Partition> tabletIdToPartition) { > Nit: indentation Done http://gerrit.cloudera.org:8080/#/c/13191/1/java/kudu-client/src/main/java/org/apache/kudu/client/KuduPartitioner.java@56 PS1, Line 56: TODO > nit: TODO(ghenke) Done http://gerrit.cloudera.org:8080/#/c/13191/1/java/kudu-client/src/main/java/org/apache/kudu/client/KuduPartitioner.java@61 PS1, Line 61: partitionByStartKey.put(EMPTY, NON_COVERED_RANGE_INDEX); > Why did you move this into the constructor? I think it'd be easier to follo yeah, it wasn't great but I decided I was okay with this since there we no remote calls in the constructor. http://gerrit.cloudera.org:8080/#/c/13191/1/java/kudu-client/src/main/java/org/apache/kudu/client/KuduPartitioner.java@180 PS1, Line 180: // Use a LinkedHashMap to maintain partition order. > Why do we care about order? That doesn't appear to be part of the contract It's not strictly required, but maintains old and convenient behavior. I will add a detailed comment. http://gerrit.cloudera.org:8080/#/c/13191/1/java/kudu-client/src/main/java/org/apache/kudu/client/KuduPartitioner.java@194 PS1, Line 194: String tabletId = new String(tablet.getTabletId(), UTF_8); > Could we avoid the conversion and retain the tablet ID as a byte array? See It gets messy because I want to use it in the Map but I can't use a byte array as a key in a map. I could convert it to a BytesKey, but I did't really want to expose that. The API is already inconsistent and often exposes tableId as a string, so I didn't feel bad about doing it here too. http://gerrit.cloudera.org:8080/#/c/13191/1/java/kudu-client/src/main/java/org/apache/kudu/client/PartitionSchema.java File java/kudu-client/src/main/java/org/apache/kudu/client/PartitionSchema.java: http://gerrit.cloudera.org:8080/#/c/13191/1/java/kudu-client/src/main/java/org/apache/kudu/client/PartitionSchema.java@44 PS1, Line 44: @InterfaceAudience.LimitedPrivate("Impala") : @InterfaceStability.Unstable > Do these annotations automatically apply to nested classes too? Yes -- To view, visit http://gerrit.cloudera.org:8080/13191 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I31e0eb27f163c38840e5466ff85d0b4a44d4ec0a Gerrit-Change-Number: 13191 Gerrit-PatchSet: 1 Gerrit-Owner: Grant Henke <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Grant Henke <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Mike Percy <[email protected]> Gerrit-Comment-Date: Wed, 01 May 2019 23:07:50 +0000 Gerrit-HasComments: Yes
