Question: My query extract a data value from mysql table where are a double quote in the text.

```
Select mytitle from title_table

```

The result is: This is my title: "for school"

This value I want to put inside a text field, but is truncated in this position **This is my title:**

I print the title by this: `<?php echo $rows['mytitle']; ?>`

How to put the entire title in a text field?

Thanks

Answer: 
> 
> but I still not be able to understand how does Spark standalone implement the resource isolation and allocation. 
> 
> 
> 

With Spark, we have the notation of a Master node and Worker nodes. We can think about the latter as a resource pool. Each worker has CPU and RAM which it brings to the pool, and Spark jobs can utilize the resources in that pool to do their computation.

Spark Standalone has the notation of an Executor, which is the process that handles the computation, and to which we give resources from the resource pool. In any given executor, we run different *stages* of a computation which is composed of different *tasks*. Now, we can control the amount of computation power (cores) a given task uses (via `spark.tasks.cpu` configuration parameter), and we also control the general amount of computation power a given job may have (via `spark.cores.max`, which tells the cluster manager how many resources *in total* we want to give to the particular job we're running). Note that Standalone is greety by default and will schedule an executor on every Worker node in the cluster. We can get finer grained control over how many actual Executors we have by using [Dynamic Allocation](http://spark.apache.org/docs/latest/configuration.html#dynamic-allocation).

> 
> for example I ran 10 threads in one executor, but Spark only gave the executor one core, so how does Spark guarantee these 10 threads only run on one cpu core.
> 
> 
> 

Spark doesn't verify that the execution only happens on a single core. Spark doesn't know which CPU cycle it'll get from the underlying operating system. What Spark Standalone does attempt to do is resource management, it tells you "Look, you have X amount of CPUs and Y amount of RAM, I will not let you schedule jobs if you don't partition your resources properly".
Spark standalone handles only **resource allocation** which is a simple task. All it is required is keeping tabs on:

* available resources.
* assigned resources.

It doesn't take care of **resource isolation**. YARN and Mesos, which have broader scope, don't implement resource isolation but depend on Linux Control Groups (`cgroups`).