hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject svn commit: r1433242 - in /hadoop/common/branches/HDFS-347/hadoop-hdfs-project/hadoop-hdfs: ./ src/main/java/org/apache/hadoop/hdfs/
Date Tue, 15 Jan 2013 00:31:35 GMT
Author: todd
Date: Tue Jan 15 00:31:35 2013
New Revision: 1433242

URL: http://svn.apache.org/viewvc?rev=1433242&view=rev
Log:
HDFS-4402. Some small DomainSocket fixes: avoid findbugs warning, change log level, etc. Contributed
by Colin Patrick McCabe.

Modified:
    hadoop/common/branches/HDFS-347/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-347.txt
    hadoop/common/branches/HDFS-347/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/BlockReaderLocal.java
    hadoop/common/branches/HDFS-347/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DomainSocketFactory.java
    hadoop/common/branches/HDFS-347/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/FileInputStreamCache.java

Modified: hadoop/common/branches/HDFS-347/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-347.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-347/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-347.txt?rev=1433242&r1=1433241&r2=1433242&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-347/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-347.txt (original)
+++ hadoop/common/branches/HDFS-347/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-347.txt Tue
Jan 15 00:31:35 2013
@@ -22,3 +22,6 @@ HDFS-4400. DFSInputStream#getBlockReader
 
 HDFS-4401. Fix bug in DomainSocket path validation
 (Colin Patrick McCabe via todd)
+
+HDFS-4402. Some small DomainSocket fixes: avoid findbugs warning, change log level, etc.
+(Colin Patrick McCabe via todd)

Modified: hadoop/common/branches/HDFS-347/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/BlockReaderLocal.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-347/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/BlockReaderLocal.java?rev=1433242&r1=1433241&r2=1433242&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-347/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/BlockReaderLocal.java
(original)
+++ hadoop/common/branches/HDFS-347/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/BlockReaderLocal.java
Tue Jan 15 00:31:35 2013
@@ -19,6 +19,8 @@ package org.apache.hadoop.hdfs;
 
 import java.io.DataInputStream;
 import org.apache.hadoop.conf.Configuration;
+
+import java.io.BufferedInputStream;
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.nio.ByteBuffer;
@@ -118,7 +120,9 @@ class BlockReaderLocal implements BlockR
     // read and handle the common header here. For now just a version
     checksumIn.getChannel().position(0);
     BlockMetadataHeader header = BlockMetadataHeader
-        .readHeader(new DataInputStream(checksumIn));
+        .readHeader(new DataInputStream(
+            new BufferedInputStream(checksumIn,
+                BlockMetadataHeader.getHeaderSize())));
     short version = header.getVersion();
     if (version != BlockMetadataHeader.VERSION) {
       throw new IOException("Wrong version (" + version + ") of the " +

Modified: hadoop/common/branches/HDFS-347/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DomainSocketFactory.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-347/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DomainSocketFactory.java?rev=1433242&r1=1433241&r2=1433242&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-347/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DomainSocketFactory.java
(original)
+++ hadoop/common/branches/HDFS-347/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DomainSocketFactory.java
Tue Jan 15 00:31:35 2013
@@ -62,7 +62,7 @@ class DomainSocketFactory {
         LOG.warn(feature + " is disabled because you have not set " +
             DFSConfigKeys.DFS_DATANODE_DOMAIN_SOCKET_PATH_KEY);
       } else if (DomainSocket.getLoadingFailureReason() != null) {
-        LOG.error(feature + " is disabled because " +
+        LOG.warn(feature + " is disabled because " +
               DomainSocket.getLoadingFailureReason());
       } else {
         LOG.debug(feature + "is enabled.");
@@ -113,7 +113,7 @@ class DomainSocketFactory {
       sock.setAttribute(DomainSocket.RCV_TIMEO, conf.socketTimeout);
       success = true;
     } catch (IOException e) {
-      LOG.error("error creating DomainSocket", e);
+      LOG.warn("error creating DomainSocket", e);
       // fall through
     } finally {
       if (!success) {
@@ -134,4 +134,4 @@ class DomainSocketFactory {
   public void disableDomainSocketPath(String path) {
     pathInfo.put(path, PathStatus.UNUSABLE);
   }
-}
\ No newline at end of file
+}

Modified: hadoop/common/branches/HDFS-347/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/FileInputStreamCache.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HDFS-347/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/FileInputStreamCache.java?rev=1433242&r1=1433241&r2=1433242&view=diff
==============================================================================
--- hadoop/common/branches/HDFS-347/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/FileInputStreamCache.java
(original)
+++ hadoop/common/branches/HDFS-347/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/FileInputStreamCache.java
Tue Jan 15 00:31:35 2013
@@ -22,7 +22,6 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map.Entry;
 import java.util.concurrent.ScheduledThreadPoolExecutor;
-import java.util.concurrent.ThreadFactory;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.commons.logging.Log;



Mime
View raw message