You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Hadoop QA (JIRA)" <ji...@apache.org> on 2007/09/01 04:51:18 UTC
[jira] Commented: (HADOOP-1821) [hbase] Replace all
String.getBytes() with String.getBytes("UTF-8")
[ https://issues.apache.org/jira/browse/HADOOP-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12524249 ]
Hadoop QA commented on HADOOP-1821:
-----------------------------------
-1, build or testing failed
2 attempts failed to build and test the latest attachment http://issues.apache.org/jira/secure/attachment/12364909/patch.txt against trunk revision r571547.
Test results: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/668/testReport/
Console output: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/668/console
Please note that this message is automatically generated and may represent a problem with the automation system and not the patch.
> [hbase] Replace all String.getBytes() with String.getBytes("UTF-8")
> -------------------------------------------------------------------
>
> Key: HADOOP-1821
> URL: https://issues.apache.org/jira/browse/HADOOP-1821
> Project: Hadoop
> Issue Type: Bug
> Components: contrib/hbase
> Affects Versions: 0.15.0
> Reporter: Jim Kellerman
> Assignee: Jim Kellerman
> Fix For: 0.15.0
>
> Attachments: patch.txt
>
>
> We cannot rely on the default encoding being UTF-8 so a naked String.getBytes() will return the bytes in whatever the default encoding is for the platform on which code is running. If it is subsequently read on another machine with a different default encoding, converting the bytes back to a string will result in garbage.
> Consequently, we should always specify an encoding for getBytes() and new String. UTF-8 is the preferred encoding.
> The places where we use unqualified getBytes are:
> HConstants.DELETE_BYTES, HConstants.COMPLETE_CACHEFLUSH
> hbase.io.MapWritable.main (but this will not be an issue once HADOOP-1760 is completed)
> TestHMemcache.addRows
> PerformanceEvaluation.generateValue
> TestGet
> TestHRegion
> TestHBaseCluster
> TestTableMapReduce
> TestScanner2
> TestRegExpRowFilter
> TestRowFilterSet
> org.onelab.test.StringKey
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.