Formula One world champion Lewis Hamilton edged out teammate Nico Rosberg for pole position as Mercedes locked down the front row of the grid for the Chinese Grand Prix on Saturday.