I will be so thankful if someone helps me with the following question. There exists finite non-abelian p-groups G (except non-abelian groups of order $p^3$) with the following properties:


1. all non-central elements have abelian centralizer.
2. cs(G) has exactly two integers, where cs(G) is the set of all sizes of conjugacy classes of G.



p-group with abelian centralizer
Let be $G=F/F^p[F,F,F]$, with $F$ denotes the free group on $n$ generators. Then $G$ satisfies $Z(G) = \Phi (G)=G'$. 


If $x \in G-Z(G)$ then $C\_G(x)= \langle x, Z(G) \rangle$ which is abelian as $C\_G(x)/Z(G)$ is cyclic. Now we have your condition (1). For (2) observe that $C\_G(x)$ has index $p^{n-1}$ in $G$, whenever $x \notin Z(G)$. 


You can also consider any non-abelian $p$-groups (of order $>p^3$) with a center of index $p^2$. Clearly, for such a group the centralizer of any non-central element $x$ is a maximal subgroup, so has index $p$.


