[
https://issues.apache.org/jira/browse/HBASE-5732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13255320#comment-13255320
]
Zhihong Yu commented on HBASE-5732:
-----------------------------------
On review board, it is obvious where white spaces are introduced.
{code}
+ private void wrapWithSasl(ByteBufferOutputStream response)
+ throws IOException {
+ if (connection.useSasl) {
{code}
I suggest checking !connection.useSasl so that we can return early - this is
minor.
{code}
+ private void saslReadAndProcess(byte[] saslToken) throws IOException,
+ InterruptedException {
+ if (!saslContextEstablished) {
{code}
The else branch starting at line 1313 is much shorter than the if branch.
Consider handling the saslContextEstablished case first and return. This would
save indentation for the !saslContextEstablished case.
{code}
+ private void disposeSasl() {
+ if (saslServer != null) {
+ try {
+ saslServer.dispose();
{code}
Please assign null to saslServer after the dispose() call.
In readAndProcess():
{code}
+ if (dataLength < 0) {
+ LOG.warn("Unexpected data length " + dataLength + "!! from " +
+ getHostAddress());
+ }
data = ByteBuffer.allocate(dataLength);
{code}
When dataLength is negative, the allocate() call would throw
IllegalArgumentException. It would be nice to change the above LOG.warn() into
IllegalArgumentException.
{code}
+ TokenUtil.obtainTokenForJob(job,UserGroupInformation.getCurrentUser());
{code}
Please add a space after comma.
> Remove the SecureRPCEngine and merge the security-related logic in the core
> engine
> ----------------------------------------------------------------------------------
>
> Key: HBASE-5732
> URL: https://issues.apache.org/jira/browse/HBASE-5732
> Project: HBase
> Issue Type: Improvement
> Reporter: Devaraj Das
> Attachments: rpcengine-merge.patch
>
>
> Remove the SecureRPCEngine and merge the security-related logic in the core
> engine. Follow up to HBASE-5727.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira