Apache9 commented on a change in pull request #2630:
URL: https://github.com/apache/hbase/pull/2630#discussion_r528205391



##########
File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java
##########
@@ -3657,9 +3657,10 @@ public static CheckAndMutate 
toCheckAndMutate(ClientProtos.Condition condition,
           return builder.build((Put) m);
         } else if (m instanceof Delete) {
           return builder.build((Delete) m);
+        } else if (m instanceof Increment) {
+          return builder.build((Increment) m);
         } else {
-          throw new DoNotRetryIOException("Unsupported mutate type: " + 
mutations.get(0)
-            .getClass().getSimpleName().toUpperCase());
+          return builder.build((Append) m);

Review comment:
       This is for safety. Maybe in the future someone other than us two will 
implement a new type of Mutation and we will throw a DoNotRetryIOException 
directly here which will be easy to know what's wrong here, otherwise the 
behavior will be confusing. 




----------------------------------------------------------------
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:
[email protected]


Reply via email to