|
@ -1,11 +1,11 @@ |
|
|
package seaweed.hdfs; |
|
|
package seaweed.hdfs; |
|
|
|
|
|
|
|
|
import org.apache.hadoop.conf.Configuration; |
|
|
import org.apache.hadoop.conf.Configuration; |
|
|
|
|
|
import org.apache.hadoop.fs.FileSystem; |
|
|
import org.apache.hadoop.fs.*; |
|
|
import org.apache.hadoop.fs.*; |
|
|
import org.apache.hadoop.fs.permission.AclEntry; |
|
|
import org.apache.hadoop.fs.permission.AclEntry; |
|
|
import org.apache.hadoop.fs.permission.AclStatus; |
|
|
import org.apache.hadoop.fs.permission.AclStatus; |
|
|
import org.apache.hadoop.fs.permission.FsPermission; |
|
|
import org.apache.hadoop.fs.permission.FsPermission; |
|
|
import org.apache.hadoop.security.AccessControlException; |
|
|
|
|
|
import org.apache.hadoop.security.UserGroupInformation; |
|
|
import org.apache.hadoop.security.UserGroupInformation; |
|
|
import org.apache.hadoop.util.Progressable; |
|
|
import org.apache.hadoop.util.Progressable; |
|
|
import org.slf4j.Logger; |
|
|
import org.slf4j.Logger; |
|
@ -76,7 +76,7 @@ public class SeaweedFileSystem extends FileSystem { |
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|
InputStream inputStream = seaweedFileSystemStore.openFileForRead(path, statistics, bufferSize); |
|
|
InputStream inputStream = seaweedFileSystemStore.openFileForRead(path, statistics, bufferSize); |
|
|
return new FSDataInputStream(inputStream); |
|
|
|
|
|
|
|
|
return new FSDataInputStream(new BufferedSeaweedInputStream(inputStream, 16 * 1024 * 1024)); |
|
|
} catch (Exception ex) { |
|
|
} catch (Exception ex) { |
|
|
LOG.warn("open path: {} bufferSize:{}", path, bufferSize, ex); |
|
|
LOG.warn("open path: {} bufferSize:{}", path, bufferSize, ex); |
|
|
return null; |
|
|
return null; |
|
|