I am able to set the value of property hive.metastore.warehouse.external.dir using beeline client.
But hive is still creating an external table on the location specified in the property hive.metastore.warehouse.external.dir of hive-site.xml. This is specifically issue with HDP 3.1 and hive 3.1 version.
Also, when I create the database on custom location using LOCATION keyword then subsequently managed tables physical in the database are created under the database mapped physical directory, which is fine. But in the case of the external table physical file is getting created at the location specified in the property hive.metastore.warehouse.external.dir at hive-site.xml.