job-runner | Runs Cron based jobs define via Yaml | Cron Utils library
kandi X-RAY | job-runner Summary
kandi X-RAY | job-runner Summary
Runs Cron based jobs define via Yaml
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Create a crontab file
- Convert to yaml
- Merge two dicts
- Convert memory limit value to integer
- Substitute values in a string
- Validate a crontab file
- Load yaml file
job-runner Key Features
job-runner Examples and Code Snippets
Community Discussions
Trending Discussions on job-runner
QUESTION
How does one go about setting resource limits in EMR on EKS? My driver pod is failing to launch because it is requesting more CPU than it is allowed. This doesn't make sense to me. I am running the getting started code from the docs below.
I have added --conf spark.driver.limit.cores=2
in order to try and make the limit higher than what is listed in the error message below. I got this idea from here https://spark.apache.org/docs/latest/running-on-kubernetes.html#spark-properties
This cluster does have istio running in it. I am not sure if that would cause issues.
Here is the code I am running to trigger the job
...ANSWER
Answered 2021-Dec-21 at 18:41I was able to figure it out.
QUESTION
Say I have this case where
- I have to run some test with dataflow
- inside this dataflow job I need to access a gcs bucket and save my output there.
- I will need to run the dataflow job with my own SA instead of the default SA.
I created a Google Service Account to run my dataflow job. But after I enabled the dataflow API. I end up having 2 SA in front of me.
- the service account agent -->
123456789@dataflow.gserviceaccount.com
- the dataflow job runner service account -->
dataflow-job-runner@MY-PROJECT-ID.iam.gserviceaccount.com
It got me really confused to see what the official document says
Some Google Cloud services have Google-managed service accounts that allow the services to access your resources. These service accounts are sometimes known as service agents.
If I create a dataflow job to run with the dataflow-job-runner@MY-PROJECT-ID.iam.gserviceaccount.com
SA, I suppose I'd need to grant the roles/storage.objectAdmin
for it.
The question is
- Do I need to grant any permission to the service account agent?
- What does the service account agent actually do, what does it has to access any resource?
ANSWER
Answered 2020-Dec-03 at 03:55Several Google Cloud services such as Cloud Dataflow require two sets of permissions.
The program that you write uses a service account. You grant this service account IAM roles to access resources that require authorization that your program requires. For example, reading data from Cloud Storage or issuing queries to BigQuery.
The service agent applies to the service's runtime. For example when you launch a job on Cloud Dataflow, Cloud Dataflow needs to launch VMs to run your program on. Your program is not launching the VMs, the service is. Therefore the service requires its own set of permissions. This is what the service agent is for.
By using two different service accounts, separation of privilege is achieved.
QUESTION
I have the following function from my odd-jobs job-queue library. There are a bunch of configuration parameters where the default implementation depends on another config parameter. For example:
cfgJobToHtml
depends oncfgJobType
, which defaults todefaultJobType
. However, after callingdefaultConfig
, the user may choose to override the value forcfgJobType
without changingcfgJobToHtml
. The expected behaviour is thatcfgJobToHtml
should now use the user-provided value instead ofdefaultJobType
.- Similarly,
cfgAllJobTypes
depends oncfgJobTypeSql
, which in-turn defauls todefaultJobTypeSql
. Again, after callingdefaultConfig
, if the user overrides the value forcfgJobTypeSql
, thencfgAllJobTypes
should use the overridden value, notdefaultJobTypeSql
.
The code below does not work the way I'm expecting it to. If you change cfgJobType
the change is not picked up by cfgJobToHtml
. Similarly, for cfgJobTypeSql
.
What is the best way to have these "dependent" default values?
...ANSWER
Answered 2020-May-05 at 15:25People often implement it using builder pattern.
In your example, you first fill the defaults and then let user override some fields if she wants. With builder it's other way around: you let user fill the data she wants to override, then you fill the rest.
Specifically, you make an intermediate data type to hold a partially filled config, ConfigUnderConstruction
. All fields there are optional. User can specify all the fields she is interested in, then you assemble the config, filling all the defaults:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install job-runner
You can use job-runner like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page