Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
None
-
None
-
None
-
None
Description
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)
Attachments
Attachments
Issue Links
- duplicates
-
HDFS-7515 Fix new findbugs warnings in hadoop-hdfs
- Closed