private LegacyJobResourceUploader( IJavaClientLauncher javaLauncher, IResourceArchiveFileGenerator resourceArchiveFileGenerator, IFile file, IYarnCommandLineEnvironment yarn) { _file = file; _resourceArchiveFileGenerator = resourceArchiveFileGenerator; _javaLauncher = javaLauncher; _javaLauncher.AddToClassPath(yarn.GetYarnClasspathList()); }
private WindowsYarnJobCommandProvider( [Parameter(typeof(EnableDebugLogging))] bool enableDebugLogging, [Parameter(typeof(DriverMaxMemoryAllicationPoolSizeMB))] int driverMaxMemoryAllocationPoolSizeMB, [Parameter(typeof(DriverMaxPermSizeMB))] int driverMaxPermSizeMB, IYarnCommandLineEnvironment yarnCommandLineEnvironment, REEFFileNames fileNames) { _yarnCommandLineEnvironment = yarnCommandLineEnvironment; _enableDebugLogging = enableDebugLogging; _fileNames = fileNames; _driverMaxMemoryAllocationPoolSizeMB = driverMaxMemoryAllocationPoolSizeMB; _driverMaxPermSizeMB = driverMaxPermSizeMB; }
private LegacyJobResourceUploader( IJavaClientLauncher javaLauncher, IResourceArchiveFileGenerator resourceArchiveFileGenerator, IFile file, IYarnCommandLineEnvironment yarn, REEFFileNames reefFileNames) { _file = file; _resourceArchiveFileGenerator = resourceArchiveFileGenerator; _javaLauncher = javaLauncher; _javaLauncher.AddToClassPath(yarn.GetYarnClasspathList()); _reefFileNames = reefFileNames; }
public LegacyJobResourceUploader GetJobResourceUploader(bool fileExistsReturnValue = true, string uploadedResourcePath = AnyUploadedResourcePath, long modificationTime = AnyModificationTime, long resourceSize = AnyResourceSize) { var injector = TangFactory.GetTang().NewInjector(); IFile file = Substitute.For <IFile>(); IYarnCommandLineEnvironment yarn = Substitute.For <IYarnCommandLineEnvironment>(); file.Exists(Arg.Any <string>()).Returns(fileExistsReturnValue); file.ReadAllText(Arg.Any <string>()) .Returns(string.Format("{0};{1};{2}", uploadedResourcePath, modificationTime, resourceSize)); injector.BindVolatileInstance(GenericType <IJavaClientLauncher> .Class, JavaClientLauncher); injector.BindVolatileInstance(GenericType <IResourceArchiveFileGenerator> .Class, ResourceArchiveFileGenerator); injector.BindVolatileInstance(GenericType <IFile> .Class, file); injector.BindVolatileInstance(GenericType <IYarnCommandLineEnvironment> .Class, yarn); return(injector.GetInstance <LegacyJobResourceUploader>()); }
public WindowsYarnJobCommandProvider GetCommandBuilder(bool enableLogging = false, int?maxPermSize = null, int?maxMemAllocPoolSize = null) { var injector = TangFactory.GetTang().NewInjector(); IYarnCommandLineEnvironment yarnCommandLineEnvironment = Substitute.For <IYarnCommandLineEnvironment>(); yarnCommandLineEnvironment.GetYarnClasspathList().Returns(AnyClassPathItems); injector.BindVolatileInstance(GenericType <IYarnCommandLineEnvironment> .Class, yarnCommandLineEnvironment); injector.BindVolatileParameter(GenericType <EnableDebugLogging> .Class, enableLogging); if (maxPermSize.HasValue) { injector.BindVolatileParameter <DriverMaxPermSizeMB, int>(maxPermSize.Value); } if (maxMemAllocPoolSize.HasValue) { injector.BindVolatileParameter <DriverMaxMemoryAllicationPoolSizeMB, int>(maxMemAllocPoolSize.Value); } return(injector.GetInstance <WindowsYarnJobCommandProvider>()); }