Question: Am a bit new to map-reduce so if anyone could guide me with the below question that would be great

1. I used Multiple Output format for writing to seperate output file in map reduce. Let’s assume my input file has Fruits and Vegetables and hence am splitting it into two files. Fruits and Vegetables as below.

Fruits-r-00000 ,Vegetables-r-00000 ,Part-r-00000

Am confused on how many reducers will run? I know by default the number of reducers is set to 1 and since the number part of the file name is same I believe only one reducer runs. Is my understanding correct?
Also why does a part-r-00000 file get created? I write all my output either in Fruits file or Vegetable file.
2. If I have 1 GB of data to be processed, how would I decide the optimum number of reducers to be used?

Answer: 
I just answered a very similar question [here](https://stackoverflow.com/posts/44297699/edit). For simplicity, the following code is an [example from the Unity forum](http://answers.unity3d.com/questions/731922/rotate-object-to-face-mouse-2d-rotate-on-z-axis.html) that you can use to rotate an object around the z-axis.

```
Vector3 pos = Camera.main.WorldToScreenPoint(transform.position);
Vector3 dir = Input.mousePosition - pos;
float angle = Mathf.Atan2(dir.y, dir.x) * Mathf.Rad2Deg;
transform.rotation = Quaternion.AngleAxis(angle, Vector3.forward);

```

[Here is the Unity3D documentation for slerp](https://docs.unity3d.com/ScriptReference/Quaternion.Slerp.html), and [here is the documentation for lerp](https://docs.unity3d.com/ScriptReference/Quaternion.Lerp.html). It should be straight forward to modify the code to do what you want from these examples.
It all comes down to how your arrow is setup, can you use the rotateTowards?

If so you can use [ScreenToWorldPoint](http://docs.unity3d.com/ScriptReference/Camera.ScreenToWorldPoint.html) with rotateTowards

(ps, function is not tested since im at work :P)

```
void Update() {
    transform.rotateTowards(camera.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, camera.nearClipPlane));
}

```

as for the lerp function, you should be [Check here for speed variable stuff](http://docs.unity3d.com/ScriptReference/Vector3.RotateTowards.html)

Happy Coding.