mesos | Apache Mesos is a cluster manager
kandi X-RAY | mesos Summary
kandi X-RAY | mesos Summary
Apache Months
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of mesos
mesos Key Features
mesos Examples and Code Snippets
Community Discussions
Trending Discussions on mesos
QUESTION
I am trying to deploy a docker container with Kafka and Spark and would like to read to Kafka Topic from a pyspark application. Kafka is working and I can write to a topic and also spark is working. But when I try to read the Kafka stream I get the error message:
...ANSWER
Answered 2022-Jan-24 at 23:36Missing application resource
This implies you're running the code using python
rather than spark-submit
I was able to reproduce the error by copying your environment, as well as using findspark
, it seems PYSPARK_SUBMIT_ARGS
aren't working in that container, even though the variable does get loaded...
The workaround would be to pass the argument at execution time.
QUESTION
pyspark 2.1.0
python 3.5.2
I have a join with multiple conditions:
...ANSWER
Answered 2021-Jul-09 at 12:07Try putting each conditional statement inside parentheses
QUESTION
I am using Mesos 1.3.1 and Chronos in my local. I currently have 100 jobs scheduled every 30 minutes for testing.
Sometimes the tasks get stuck in RUNNING status forever until I restart the Mesos agent that the task is stuck. No agent restarted during this time.
I have tried to KILL the task but its status never gets updated to KILLED while the logs in Chronos say that successfully received the request. I have checked in Chronos that it did update the task as successful and end time is also correct but duration is ongoing and the task is still in RUNNING state.
Also the executor container is running forever for the task that are stuck. I have the executor container that will sleep for 20 seconds and set the offer_timeout to 30 seconds and executor_registration_timeout to 2 minutes.
I have also included Mesos reconciliation every 10 minutes but it updates the task as RUNNING every time.
I have also tried to force the task status to update again as FINISHED before the reconciliation but still not getting updated as FINISHED. It seems like the Mesos leader is not picking up the correct status for the stuck task.
I have tried to run with different task resource allocations (cpu: 0.5,0.75,1...) but does not solve the issue. I changed the number of jobs to 70 for every 30 minute but still happening. This issue is seen once per day which is very random and can happen to any job.
How can I remove this stuck task from the active tasks without restarting the Mesos agent? Is there a way to prevent this issue from happening?
...ANSWER
Answered 2021-Feb-23 at 04:41Currently there is a known issue in Docker in Linux where the process exited but docker container is still running. https://github.com/docker/for-linux/issues/779
Because of this, the executor containers are stuck in running state and Mesos is unable to update the task status.
My issue was similar to this: https://issues.apache.org/jira/browse/MESOS-9501?focusedCommentId=16806707&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16806707
The fix for the work around has been applied after 1.4.3 version. After upgrading the Mesos version this does not occur anymore.
QUESTION
I have two Django websites that create a Spark Session to a Cluster which is running on Mesos.
The problem is that whatever Django starts first will create a framework and take 100% the resources permanently, it grabs them and doesn't let them go even if idle.
I am lost on how to make the two frameworks use only the neede resources and have them concurrently access the Spark cluster.
Looked into spark schedulres, dynamic resources for spark and mesos but nothing seems to work. Is it even possible or should I change the approach?
...ANSWER
Answered 2021-Feb-16 at 13:42Self solved using dynamic allocation.
QUESTION
I try to run my code written in main2.py
...ANSWER
Answered 2021-Jan-08 at 11:09No need for two dashes before local[1]
:
QUESTION
I have a flask API that using pyspark starts spark and sends the job to a mesos cluster.
The executor fails because it's taking part of the route where spark-class is located in the Flask API.
Logs:
...ANSWER
Answered 2020-Sep-03 at 19:48Solved by adding the path where the spark is located in executor by adding this property pointing at the binaries of Spark:
QUESTION
In a Mesos ecosystem(master + scheduler + slave), with the master executing tasks on the slaves, is there a configuration that allows modifying number of tasks executed on each slave?
Say for example, currently a mesos master runs 4 tasks on one of the slaves(each task is using 1 cpu). Now, we have 4 slaves(4 cores each) and except for this one slave the other three are not being used.
So, instead of this execution scenario, I'd rather prefer the master running 1 task on each of the 4 slaves.
I found this stackoverflow question and these configurations relevant to this case, but still not clear on how to use the --isolation=VALUE
or --resources=VALUE
configuration here.
Thanks for the help!
...ANSWER
Answered 2020-Sep-03 at 15:15Was able to reduce number of tasks being executed on a single host at a time by adding the following properties to startup script for mesos agent.
--resources="cpus:<>"
and --cgroups_enable_cfs=true
.
This however does not take care of the concurrent scheduling issue where the requirement is to have each agent executing a task at the same time. For that need to look into the scheduler code as also suggested above.
QUESTION
Can't access Mesos UI on the master:5050.
Running a small cluster 1 master-3 slaves on a Linux dist.
Master seems to be picked OK:
...ANSWER
Answered 2020-Sep-02 at 17:55The command was being launched with the command --port=5000, a bit confused because apparently this is the port the slaves listes to according to this definition from this page:
QUESTION
I'm trying to modify prometheus mesos exporter to expose framework states: https://github.com/mesos/mesos_exporter/pull/97/files
A bit about mesos exporter - it collects data from both mesos /metrics/snapshot
endpoint, and /state
endpoint.
The issue with the latter, both with the changes in my PR and with existing metrics reported on slaves, is that metrics created lasts for ever (until exporter is restarted).
So if for example a framework was completed, the metrics reported for this framework will be stale (e.g. it will still show the framework is using CPU).
So I'm trying to figure out how I can clear those stale metrics. If I could just clear the entire mesosStateCollector
each time before collect is done it would be awesome.
There is a delete
method for the different p8s vectors (e.g. GaugeVec
), but in order to delete a metric, I need to not only the label name, but also the label value for the relevant metric.
ANSWER
Answered 2020-Jun-24 at 17:10Ok, so seems it was easier than I thought (if only I was familiar with go-lang before approaching this task). Just need to cast the collector to GaugeVec and reset it:
QUESTION
My question is similar to :
Standalone Spark cluster on Mesos accessing HDFS data in a different Hadoop cluster
While the question above is about using spark to process data from a different hadoop cluster, I would also like to know how the spark processes data from azure blob storage container.
From the azure documentation (https://docs.microsoft.com/en-us/azure/databricks/data/data-sources/azure/azure-storage), the following code is used to load the data directly into a dataframe:
...ANSWER
Answered 2020-Apr-03 at 18:47Is the complete data transfered to the driver memory and then split across executors when actions such as udf are applied on the dataframe?
Yes the complete data is transferred, but not to the driver. The executors read the data in parallel. If there are lots of files, they are divided among the executors, and large files are read in parallel by multiple executors (if the file format is splittable).
val df = spark.read.parquet("wasbs://@.blob.core.windows.net/")
It's critical to understand that that line of code doesn't load anything. Later when you call df.write
or evaluate a Spark SQL query, the data will be read. And if the data is partitioned, the query may be able to eliminate whole partitions not needed for the query.
Does locality play a role in how this is processed?
In Azure really fast networks compensate for having data and compute separated.
Of course you generally want the Blob/Data Lake in the same Azure Region as the Spark cluster. Data movement across regions is slower, and is charged as Data Egress at a bit under $0.01/GB.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install mesos
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