saintstack commented on a change in pull request #1301: HBASE-23833. The
relocated hadoop-thirdparty protobuf breaks HBase asyncwal
URL: https://github.com/apache/hbase/pull/1301#discussion_r394798394
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/io/asyncfs/FanOutOneBlockAsyncDFSOutputSaslHelper.java
##########
@@ -355,6 +353,55 @@ private void sendSaslMessage(ChannelHandlerContext ctx,
byte[] payload) throws I
return Collections.singletonList(new
CipherOption(CipherSuite.AES_CTR_NOPADDING));
}
+ private static class BuilderPayloadSetter {
+ private static Class<?> byteStringClass;
+ private static Class<?> builderClass;
+ private static Method copyFromMethod;
+ private static Method setPayloadMethod = null;
+
+ static void setter(DataTransferEncryptorMessageProto.Builder builder,
byte[] payload) {
+ Object byteStringObject = null;
+ try {
+ byteStringObject = copyFromMethod.invoke(null, payload);
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ }
+
+ if (setPayloadMethod == null) {
+ try {
+ setPayloadMethod = builderClass.getMethod("setPayload",
byteStringClass);
Review comment:
hmm... we can't set this till setter time I suppose? Could we do it at
static class loading time?
----------------------------------------------------------------
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]
With regards,
Apache Git Services