When a cane filled with water is revolved in a vertical circle, then the velocity at the highest point is given by
$v\ge \sqrt{g\,r}$
Also $v=r \omega=r \cdot \frac{2 \pi}{T}$
Hence, $d \frac{2 \pi r}{T} \geq \sqrt{r g}$
$T \leq \frac{2 \pi r}{\sqrt{r g}}=2 \pi \sqrt{\frac{r}{g}}$
$\leq 2 \pi \sqrt{\frac{4}{9.8}}$
$\leq 2 \times 3.14 \times 0.638$
$\leq 4.0\, s$
$T_{\max }=4\, s$