public async Task Initialize() { string currentDir = Environment.CurrentDirectory; Console.WriteLine("Getting: " + currentDir + "/" + file); reader = new ScanStreamReader(currentDir + "/" + file, separator); if (!reader.GetFile(0)) { throw new Exception("unable to get file"); } await reader.FillBuffer(); }
public async Task <TexeraTuple> NextAsync() { if (reader.IsEOF() && fileNames.Count > 0) { reader.Close(); reader = new ScanStreamReader(folder + "/" + fileNames.Dequeue(), separator); if (!reader.GetFile(0)) { throw new Exception("unable to get file"); } await reader.FillBuffer(); } Pair <TexeraTuple, ulong> res = await reader.ReadTuple(); return(res.First); }
public async Task Initialize() { reader = new ScanStreamReader(file, separator, idxes); if (!reader.GetFile(start)) { throw new Exception("unable to get file"); } if (start != 0) { start += await reader.TrySkipFirst(); } else { await reader.FillBuffer(); } }
public async Task Initialize() { if (folder.StartsWith("http://")) { fileNames = new Queue <string>(Common.Utils.ListFileNameFromHDFSDirectory(folder)); } else { fileNames = new Queue <string>(Directory.GetFiles(folder, "*", SearchOption.TopDirectoryOnly)); } reader = new ScanStreamReader(folder + "/" + fileNames.Dequeue(), separator); if (!reader.GetFile(0)) { throw new Exception("unable to get file"); } await reader.FillBuffer(); }