You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Xiaoyu Yao (JIRA)" <ji...@apache.org> on 2014/12/11 19:41:14 UTC
[jira] [Created] (HDFS-7512) Fix byte to string encoding issues in
hadoop-hdfs
Xiaoyu Yao created HDFS-7512:
--------------------------------
Summary: 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
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)