This is a file provider for HDFS through WebHDFS protocol for Microsoft.Extensions.FileProviders.
This project support .NET framework 4.5+ & .NET standard 1.1+
# Add the WebHdfs.Extensions.FileProviders package to the default project
Install-Package WebHdfs.Extensions.FileProviders
# Add the WebHdfs.Extensions.FileProviders package to a project named UtilitiesLib that is not the default
Install-Package WebHdfs.Extensions.FileProviders -ProjectName UtilitiesLib
var fileFileInfo = new WebHdfsFileInfo(nameNodeUri, settings.FilePath);
Assert.True(fileFileInfo.Exists);
Assert.True(fileFileInfo.Length > 0);
Assert.True(fileFileInfo.LastModified > DateTimeOffset.Parse("2010/1/1"));
Assert.False(fileFileInfo.IsDirectory);
string content;
using (var reader = new StreamReader(fileFileInfo.CreateReadStream())) {
content = reader.ReadToEnd();
}
This project is licensed under the GPL3.0 License — see the LICENSE.txt file for details