Beispiel #1
0
 public AzureWriter(Uri uri, int numberOfWriters, IWriterClient client, IDrLogging logger)
     : base(client, logger)
 {
     baseUri           = uri;
     blobIndex         = 0;
     bytesWritten      = 0;
     exceededBlockSize = false;
 }
Beispiel #2
0
 public AzureWriter(Uri uri, int numberOfWriters, IWriterClient client, IDrLogging logger)
     : base(client, logger)
 {
     baseUri = uri;
     blobIndex = 0;
     bytesWritten = 0;
     exceededBlockSize = false;
 }
Beispiel #3
0
 public static void Initialize(IDrLogging logger)
 {
     lock (s_dummy)
     {
         if (s_client == null)
         {
             s_client = new NotHttpClient(false, 10, 30000, new PeloponneseLogger(logger));
         }
     }
 }
Beispiel #4
0
        public StreamWriter(IWriterClient c, IDrLogging l)
        {
            client = c;
            log = new DryadLogger(l);

            writes = new BufferQueue();
            offset = 0;

            finished = new Task(() => { });

            error = null;
            errorType = ErrorType.IO;
        }
Beispiel #5
0
        public StreamWriter(IWriterClient c, IDrLogging l)
        {
            client = c;
            log    = new DryadLogger(l);

            writes = new BufferQueue();
            offset = 0;

            finished = new Task(() => { });

            error     = null;
            errorType = ErrorType.IO;
        }
Beispiel #6
0
 public DryadLogger(IDrLogging l)
 {
     logger = l;
 }
Beispiel #7
0
 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);
     }
 }
Beispiel #8
0
 private static IManagedWriter OpenAzureWriter(Uri uri, int numberOfWriters, IWriterClient client, IDrLogging logger)
 {
     return new AzureWriter(uri, numberOfWriters, client, logger);
 }
Beispiel #9
0
 private static IManagedWriter OpenFileWriter(Uri uri, int numberOfWriters, IWriterClient client, IDrLogging logger)
 {
     return(new FileWriter(uri, numberOfWriters, client, logger));
 }
Beispiel #10
0
 public AzureReader(Uri path, int numberOfReaders, IReaderClient client, IDrLogging logger)
     : base(ComputeBufferSize(numberOfReaders), client, logger)
 {
     source = path;
 }
Beispiel #11
0
 public PeloponneseLogger(IDrLogging l)
 {
     logger = l;
 }
Beispiel #12
0
 public DryadLogger(IDrLogging l)
 {
     logger = l;
 }
Beispiel #13
0
 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;
     }
 }
Beispiel #14
0
 public static void Initialize(IDrLogging logger)
 {
     lock (s_dummy)
     {
         if (s_client == null)
         {
             s_client = new NotHttpClient(false, 10, 30000, new PeloponneseLogger(logger));
         }
     }
 }
Beispiel #15
0
 public FileWriter(Uri uri, int numberOfWriters, IWriterClient client, IDrLogging logger) : base(client, logger)
 {
     fileName = uri.AbsolutePath;
 }
Beispiel #16
0
 public PeloponneseLogger(IDrLogging l)
 {
     logger = l;
 }
Beispiel #17
0
 private static IManagedReader OpenAzureReader(Uri uri, int numberOfReaders, IReaderClient client, IDrLogging logger)
 {
     return(new AzureReader(uri, numberOfReaders, client, logger));
 }
Beispiel #18
0
 public StreamReader(int bSize, IReaderClient c, IDrLogging logger)
 {
     client     = c;
     log        = new DryadLogger(logger);
     bufferSize = bSize;
 }
Beispiel #19
0
 public StreamReader(int bSize, IReaderClient c, IDrLogging logger)
 {
     client = c;
     log = new DryadLogger(logger);
     bufferSize = bSize;
 }
Beispiel #20
0
 public FileWriter(Uri uri, int numberOfWriters, IWriterClient client, IDrLogging logger) : base(client, logger)
 {
     fileName = uri.AbsolutePath;
 }