Topology topology = new Topology();
topology.setName( "test-cluster" );
Service service = new Service();
service.setRole( "NAMENODE" );
service.setUrl( new URL( "http://localhost:50070/webhdfs/v1" ) );
topology.addService( service );
Provider provider = new Provider();
provider.setRole( "authentication" );
provider.setEnabled( true );
ProviderParam param = new ProviderParam();
param.setName( "contextConfigLocation" );