switch to logrus for logging.
replaced old logging library with a wrapper around logrus.
We now just need to use the exported Log(...) and Logf(...) from the logging/
package that wraps around a set of loggers constituting a chain (following COR).
Loggers are configured using a YAML file that specifies the following.
1. enabled/disabled
2. whether the message should be logged on console.
3. filename extension.
4. minimum log level.
Retrofitted source code to now use the updated logging library.
Updated the documentation with information regarding the specification
of the log config file.
Currently, the log format in the config file is not adhered to. This is going to be
addressed in a future commit.
refact imports to github.xxx. update go.mod + go.sum
* removed vendor/ folder
* Added vendor/ submodule.
Moved dependencies that need to be vendored into separate repository.
- https://github.com/spdfg/elektron-vendor
Added vendor/ as a submodule using the below command.
- git submodule add https://github.com/spdfg/elektron-vendor vendor
If wanting to use vendor, run the following commands after cloning
elektron.
1. git submodule init
2. git submodule update
* added instructions to clone vendor/ submodule.
* updated module to spdfg. Refactored imports
Initialization of the logger happens after all the command-line
arguments are validated. So, in case any of the command-line
arguments were invalid, the log directory is not created.
Retrofitted the driver code and the scheduler builder to only use
the language provided 'log' package as elektron's logger will not
yet be initialized.
adding back the call to base#LogSchedPolicySwitch(...). Had removed this addition by mistake when resolving merge conflicts.
Approved-by: Akash Kothawale <akothaw1@binghamton.edu>
Approved-by: Pradyumna Kaushik <pkaushi1@binghamton.edu>
Experimentation/schedPolicySwitcher
1. Initial commit for consolidated loggers using observer pattern.
2. class factory for schedulers.
3. Using the scheduling policy class factory in schedulers/store.go and the scheduler builder helpers in schedulers/helpers.go, feature to be able to be able to plug a scheduling policy of your choice from the command line (right now only first-fit and bin-packing are possible. Will be updating the class factory to include other scheduling policies as well.
4. Removed TODO for using generic task sorters. Modified TODO for a config file input to run electron.
5. Added other schedulers to the factory
6. Partially retrofitted the other scheduling policies to use the logging library.
7. Retrofitted extrema and progressive to use the consolidated logging library. Fixed parameter issue with s.base.Disconnected(). Formatted project
8. Move statusUpdate(...) into base.go to remove redundant code.
9. Converted the baseScheduler into a state machine where the state is a scheduling policy that defines an approach to consume resource offers.
10. Added another command line argument to be used to enable switching of scheduling policies. Retrofitted scheduling policies to switch only if the particular feature has been enabled.
changed argument to coLocated(...) to take base type rather than ElectronScheduler type. Also, prepended the prefix to the directory of the logs so that it would be easier to determine what the files in a directory correspond to without viewing the contents of the directory.
Defined methods in ElectronScheduler. Each of these methods corresponds to a type of log that an ElectronScheduler would make. Each of these methods would need to be implemented by the scheduling policy.
Electron has only one scheduler that implements the mesos scheduler interface. All the scheduling policies are just different implementations of ways to consume mesos resource offers. Retrofitted scheduling policies to now embed SchedPolicyState instead of baseScheduler.
Approved-by: Pradyumna Kaushik <pkaushi1@binghamton.edu>