You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Devaraj Das (JIRA)" <ji...@apache.org> on 2013/08/28 00:45:52 UTC

[jira] [Commented] (HBASE-9036) Few small code cleanup

    [ https://issues.apache.org/jira/browse/HBASE-9036?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13751826#comment-13751826 ] 

Devaraj Das commented on HBASE-9036:
------------------------------------

Hey folks, any reason why this wasn't committed on 0.95?
                
> Few small code cleanup
> ----------------------
>
>                 Key: HBASE-9036
>                 URL: https://issues.apache.org/jira/browse/HBASE-9036
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Jean-Marc Spaggiari
>            Assignee: Jean-Marc Spaggiari
>            Priority: Minor
>             Fix For: 0.98.0
>
>         Attachments: HBASE-9036-v0-trunk.patch, HBASE-9036-v1-trunk.patch, HBASE-9036-v2-trunk.patch
>
>
> Few code cleanup from HBase trunk.
> 1) TestOperation use String.format with 6 %s but give 7 parameters.
> Resolution: Trivial
> 2) ClassFinder can throw a NPE.
> If jarFile = new JarInputStream(new FileInputStream(jarFileName)); throw an exception and we want to proceed on exceptions, jarFile will be null, and just few lines after we will do a jarFile.getNextJarEntry() where NPE is not catch and will fail and throw an NPE. So I thinkg we can't proceed on exceptions for this first try since it will fail just the after with an NPE and we will loose the information about the real cause of the exception.  Therefor, we should always throw ioEx is the InputStream creation fails.
> 3)AccessController declare cfs but never use it.
> 4) FavoredNodeAssignmentHelper invokes toString on an array.
> Just changed that to Bytes.toString() to print the server name.
> 5) ModifyTableHandler invokes toString on the tableName array.
> Just changed that to Bytes.toString() to print the table name.
> 6) HFileWriterV2 invokes toString on the keys arrays.
> Just changed that to Bytes.toStringBinary() to print the keys. And change some toString() calls to toStringBinary()
> 7) ServerAndLoad want to be serializable, but ServerName is not.
> Made ServerName serializable since it's only Strings, numbers and bytes.
> 8) StorageClusterStatusModel want to be serializable, but its nested class Node is not.
> Made Node serializable since it's only numbers and bytes.
> 9) In HRegion outResults can't be null since it's already used for outResults.isEmpty() few lines above.
> Just remove the test.
> 10) In RegionScannerHolder region can't be null since it's already used for region.startRegionOperation (and others) few lines above.
> Just remove the test.
> 11) CellCounter thisRowFamilyName can't be null since toStringBinary will return the string "null" for a null value.
> Just remove the test.
> 12) CellCounter again, thisRowQualifierName can't be null since it's strings concatenations.
> Just remove the test.
> 13) HBaseFsck setDisplayFullReport should be static since writing to a static field.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira