[GitHub] [incubator-druid] ccaominh commented on a change in pull request #8864: add sequenceName and currentCheckPoint for backwards compatibility

2019-11-13 Thread GitBox
ccaominh commented on a change in pull request #8864: add sequenceName and 
currentCheckPoint for backwards compatibility
URL: https://github.com/apache/incubator-druid/pull/8864#discussion_r346075809
 
 

 ##
 File path: 
indexing-service/src/main/java/org/apache/druid/indexing/common/actions/CheckPointDataSourceMetadataAction.java
 ##
 @@ -75,6 +75,28 @@ public SeekableStreamDataSourceMetadata 
getPreviousCheckPoint()
 return checkpointMetadata;
   }
 
+  // For backwards compatibility
 
 Review comment:
   Can add a unit test for the serialization/deserialization between old and 
new DTOs


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



[GitHub] [incubator-druid] ccaominh commented on a change in pull request #8864: add sequenceName and currentCheckPoint for backwards compatibility

2019-11-14 Thread GitBox
ccaominh commented on a change in pull request #8864: add sequenceName and 
currentCheckPoint for backwards compatibility
URL: https://github.com/apache/incubator-druid/pull/8864#discussion_r346492231
 
 

 ##
 File path: 
indexing-service/src/main/java/org/apache/druid/indexing/common/actions/CheckPointDataSourceMetadataAction.java
 ##
 @@ -75,6 +75,28 @@ public SeekableStreamDataSourceMetadata 
getPreviousCheckPoint()
 return checkpointMetadata;
   }
 
+  // For backwards compatibility
 
 Review comment:
   One option is to manually create a JSON string and then deserialize it to a 
different version. If you don't want to manually create the JSON, then one 
option is to add a class in the test file that is the old DTO.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



[GitHub] [incubator-druid] ccaominh commented on a change in pull request #8864: add sequenceName and currentCheckPoint for backwards compatibility

2019-11-15 Thread GitBox
ccaominh commented on a change in pull request #8864: add sequenceName and 
currentCheckPoint for backwards compatibility
URL: https://github.com/apache/incubator-druid/pull/8864#discussion_r347055593
 
 

 ##
 File path: 
indexing-service/src/main/java/org/apache/druid/indexing/common/actions/CheckPointDataSourceMetadataAction.java
 ##
 @@ -75,6 +76,28 @@ public SeekableStreamDataSourceMetadata 
getPreviousCheckPoint()
 return checkpointMetadata;
   }
 
+  // For backwards compatibility
+  @Deprecated
+  @JsonProperty
+  public SeekableStreamDataSourceMetadata getCurrentCheckPoint()
+  {
+return checkpointMetadata;
+  }
+
+  /**
+   * Returning a dummy value so the objects from older versions still work
+   * with current version
+   * TODO : this should be removed in the next release
+   *
+   * @return dummy value
+   */
+  @Deprecated
+  @JsonProperty("sequenceName")
+  public String getBaseSequenceName()
 
 Review comment:
   Similar comment as above


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



[GitHub] [incubator-druid] ccaominh commented on a change in pull request #8864: add sequenceName and currentCheckPoint for backwards compatibility

2019-11-15 Thread GitBox
ccaominh commented on a change in pull request #8864: add sequenceName and 
currentCheckPoint for backwards compatibility
URL: https://github.com/apache/incubator-druid/pull/8864#discussion_r347054768
 
 

 ##
 File path: 
indexing-service/src/main/java/org/apache/druid/indexing/common/actions/CheckPointDataSourceMetadataAction.java
 ##
 @@ -114,4 +137,29 @@ public String toString()
", checkpointMetadata=" + checkpointMetadata +
'}';
   }
+
+  @Override
+  public boolean equals(Object o)
 
 Review comment:
   Since you have an override for `equals`, you'll need to also override 
`hashCode`
   
   FYI, the [SonarLint intellij 
plugin](https://plugins.jetbrains.com/plugin/7973-sonarlint) will give you a 
warning if you don't override both.
   
   While typing this, I just noticed LGTM flagged the same issue.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org



[GitHub] [incubator-druid] ccaominh commented on a change in pull request #8864: add sequenceName and currentCheckPoint for backwards compatibility

2019-11-15 Thread GitBox
ccaominh commented on a change in pull request #8864: add sequenceName and 
currentCheckPoint for backwards compatibility
URL: https://github.com/apache/incubator-druid/pull/8864#discussion_r34707
 
 

 ##
 File path: 
indexing-service/src/main/java/org/apache/druid/indexing/common/actions/CheckPointDataSourceMetadataAction.java
 ##
 @@ -75,6 +76,28 @@ public SeekableStreamDataSourceMetadata 
getPreviousCheckPoint()
 return checkpointMetadata;
   }
 
+  // For backwards compatibility
+  @Deprecated
+  @JsonProperty
+  public SeekableStreamDataSourceMetadata getCurrentCheckPoint()
 
 Review comment:
   Since this is just for Jackson, you can make it private and then get rid of 
the `@Deprecated` if you want


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org