%HadoopJobInfo
% Internal information that is passed to the workers.

%   Copyright 2014-2017 The MathWorks, Inc.

classdef (Abstract) HadoopJobInfo < handle
    properties
        % Cluster required information for MHLM.
        WebUserCred;
        WebId;
        LicenseNumber;
        
        % Other initialization data for the worker.
        InitData;
    end
    
    properties (Transient)
        % Information used by the local HadoopJob to determine file data to be sent.
        % These properties are transient as they are only used by
        % HadoopJobMixin on the MATLAB client side.

        AutoAddClientPath = false; %TODO g1539908 Decide whether/how Hadoop related code should implement this property of parallel.Job
        
        AutoAttachFiles = true; % Flag to say whether we should auto-attach files.
        AttachedFiles; % Collection of manually added attached files.
        
        DependentFiles; % A cache of dependent files discovered by depfun
        
         % The file data to be sent to the worker.
        FileData;
        
        % Attached MATLAB path entries to be sent to the worker.
        AttachedFilePaths;
        
        % Collection of paths to be added to the worker MATLAB path.
        AdditionalPaths = {};
        
        % Translation between AdditionalPaths within MATLAB Drive and relative paths
        MATLABDrivePathMap = {};

        NumPathsToAppend = 0; %TODO g1539908 Decide whether/how Hadoop related code should implement this property of parallel.Job
        
        %TODO g1539908 Decide whether/how Hadoop related code should implement this property of parallel.Job
        % Names of client environment variables to copy to workers.
        EnvironmentVariables = {};
        % The name-value pairs of environment variables to copy to workers.
        EnvironmentCredentials;
    end
    
    methods (Abstract)
        % Wrap this info object as a parallel.Job of the correct type.
        job = wrapAsJob(obj, cluster);
    end

    methods
        function set.AdditionalPaths(obj, paths)
            obj.AdditionalPaths = paths(:);
        end
    end
end
