public async void Start() { try { error = await Open(); if (error != null) { errorType = ErrorType.Open; } } catch (Exception e) { log.LogError("Got exception opening stream " + e.ToString()); error = e.Message; errorType = ErrorType.Open; } log.LogInformation("About to await writes"); await WriteAll(); log.LogInformation("Writes done: setting finish"); finished.RunSynchronously(); }
public void WaitForDrain() { try { finished.Wait(); } catch (Exception e) { log.LogError("Caught exception from reader " + e.ToString()); } log.LogInformation("Reader " + this.Source.AbsoluteUri + " finished"); finished = null; }
public static IManagedWriter OpenWriter(string path, int numberOfWriters, IWriterClient client, IDrLogging logger) { try { HttpClient.Initialize(logger); var uri = new Uri(path); return(writers[uri.Scheme](uri, numberOfWriters, client, logger)); } catch (Exception e) { DryadLogger l = new DryadLogger(logger); l.LogError("Caught exception opening writer " + e.ToString()); return(null); } }
public static IManagedWriter OpenWriter(string path, int numberOfWriters, IWriterClient client, IDrLogging logger) { try { HttpClient.Initialize(logger); var uri = new Uri(path); return writers[uri.Scheme](uri, numberOfWriters, client, logger); } catch (Exception e) { DryadLogger l = new DryadLogger(logger); l.LogError("Caught exception opening writer " + e.ToString()); return null; } }