[
https://issues.apache.org/jira/browse/HDFS-7512?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Xiaoyu Yao updated HDFS-7512:
-----------------------------
Status: Patch Available (was: Open)
> Fix byte to string encoding issues in hadoop-hdfs
> -------------------------------------------------
>
> Key: HDFS-7512
> URL: https://issues.apache.org/jira/browse/HDFS-7512
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Reporter: Xiaoyu Yao
> Assignee: Xiaoyu Yao
> Attachments: HDFS-7512.0.patch
>
>
> In hadoop-hdfs, there are some bytes to string conversion using default
> charsets, which is flagged by findbugs 3.0 because the behavior of conversion
> depends on the platform settings of encoding. This jira proposes to fix the
> findbugs warnings below:
> Internationalization Warnings
> Code Warning
> Dm Found reliance on default encoding in
> org.apache.hadoop.hdfs.server.datanode.BlockReceiver.receiveBlock(DataOutputStream,
> DataInputStream, DataOutputStream, String, DataTransferThrottler,
> DatanodeInfo[], boolean): new java.io.FileWriter(File)
> Dm Found reliance on default encoding in
> org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.BlockPoolSlice.addToReplicasMap(ReplicaMap,
> File, RamDiskReplicaTracker, boolean): new java.util.Scanner(File)
> Dm Found reliance on default encoding in
> org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.BlockPoolSlice.loadDfsUsed():
> new java.util.Scanner(File)
> Dm Found reliance on default encoding in
> org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.BlockPoolSlice.saveDfsUsed():
> new java.io.FileWriter(File)
> Dm Found reliance on default encoding in
> org.apache.hadoop.hdfs.server.datanode.web.webhdfs.ExceptionHandler.exceptionCaught(Throwable):
> String.getBytes()
> Dm Found reliance on default encoding in
> org.apache.hadoop.hdfs.server.datanode.web.webhdfs.WebHdfsHandler.onGetFileChecksum(ChannelHandlerContext):
> String.getBytes()
> Dm Found reliance on default encoding in
> org.apache.hadoop.hdfs.server.mover.Mover$Cli.readPathFile(String): new
> java.io.FileReader(String)
> Dm Found reliance on default encoding in
> org.apache.hadoop.hdfs.server.namenode.FSDirStatAndListingOp.getListingInt(FSDirectory,
> String, byte[], boolean): new String(byte[])
> Dm Found reliance on default encoding in
> org.apache.hadoop.hdfs.server.namenode.FSImageUtil.<static initializer for
> FSImageUtil>(): String.getBytes()
> Dm Found reliance on default encoding in
> org.apache.hadoop.hdfs.server.namenode.INode.dumpTreeRecursively(PrintStream):
> new java.io.PrintWriter(OutputStream, boolean)
> Dm Found reliance on default encoding in
> org.apache.hadoop.hdfs.tools.offlineImageViewer.FSImageHandler.channelRead0(ChannelHandlerContext,
> HttpRequest): String.getBytes()
> Dm Found reliance on default encoding in
> org.apache.hadoop.hdfs.tools.offlineImageViewer.FSImageHandler.exceptionCaught(ChannelHandlerContext,
> Throwable): String.getBytes()
> Dm Found reliance on default encoding in
> org.apache.hadoop.hdfs.tools.offlineImageViewer.OfflineImageViewerPB.run(String[]):
> new java.io.PrintWriter(File)
> Dm Found reliance on default encoding in
> org.apache.hadoop.hdfs.tools.offlineImageViewer.OfflineImageViewerPB.run(String[]):
> new java.io.PrintWriter(OutputStream)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)