You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/03/25 07:03:36 UTC

[GitHub] [ozone] Xushaohong opened a new pull request #2082: HDDS-4982.Solve intellj warnings on DBTransactionBuffer

Xushaohong opened a new pull request #2082:
URL: https://github.com/apache/ozone/pull/2082


   ## What changes were proposed in this pull request?
   The root cause of this warning is due to misleadingly using generic classes instead of generic methods.
   The generic class specifies the real type when instantiating,  and the generic method specifies the real type when it is being called.
   There are two methods under DBTransactionBuffer, the method` addToBuffer` and `removeFromBuffer`.
   According to where these methods call, they are actually designed to write keys into separate tables or remove them. 
   The key and value of different table are different, and so are the types. This is where generic methods work.
   Thus I modified the generic class and erased the generic class.
   
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-4982
   
   ## How was this patch tested?
   CI
   


-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] GlenGeng commented on pull request #2082: HDDS-4982.Solve intellj warnings on DBTransactionBuffer

Posted by GitBox <gi...@apache.org>.
GlenGeng commented on pull request #2082:
URL: https://github.com/apache/ozone/pull/2082#issuecomment-806546217


   @bshashikant Please take a look.


-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] GlenGeng commented on pull request #2082: HDDS-4982.Solve intellj warnings on DBTransactionBuffer

Posted by GitBox <gi...@apache.org>.
GlenGeng commented on pull request #2082:
URL: https://github.com/apache/ozone/pull/2082#issuecomment-809856989


   Thanks @Xushaohong for the contribution. I will merge it.


-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] GlenGeng merged pull request #2082: HDDS-4982.Solve intellj warnings on DBTransactionBuffer

Posted by GitBox <gi...@apache.org>.
GlenGeng merged pull request #2082:
URL: https://github.com/apache/ozone/pull/2082


   


-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] GlenGeng commented on a change in pull request #2082: HDDS-4982.Solve intellj warnings on DBTransactionBuffer

Posted by GitBox <gi...@apache.org>.
GlenGeng commented on a change in pull request #2082:
URL: https://github.com/apache/ozone/pull/2082#discussion_r601342749



##########
File path: hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/scm/metadata/DBTransactionBuffer.java
##########
@@ -25,11 +25,11 @@
 /**
  * DB transaction that abstracts the updates to the underlying datastore.
  */
-public interface DBTransactionBuffer<KEY, VALUE> extends Closeable {
+public interface DBTransactionBuffer extends Closeable {
 
-  void addToBuffer(Table<KEY, VALUE> table, KEY key, VALUE value) throws
-      IOException;
+  <KEY, VALUE> void addToBuffer(Table<KEY, VALUE> table, KEY key, VALUE value)
+      throws IOException;
 
-  void removeFromBuffer(Table<KEY, VALUE> table, KEY key) throws
+  <KEY, VALUE> void removeFromBuffer(Table<KEY, VALUE> table, KEY key) throws

Review comment:
       `throws IOException;`




-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] GlenGeng commented on pull request #2082: HDDS-4982.Solve intellj warnings on DBTransactionBuffer

Posted by GitBox <gi...@apache.org>.
GlenGeng commented on pull request #2082:
URL: https://github.com/apache/ozone/pull/2082#issuecomment-809131001


   +1


-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org