ImpalaDatabaseMeta extends Hive2DatabaseMeta implements DatabaseInterface { @Override public void putOptionalOptions( Map<String, String> extraOptions ) { if ( getNamedCluster() != null && getNamedCluster().trim().length() > 0 ) { extraOptions.put( getPluginId() + ".pentahoNamedCluster", getNamedCluster() ); } } ImpalaDatabaseMeta( DriverLocator driverLocator, NamedClusterService namedClusterService,
                             MetastoreLocator metastoreLocator ); @Override int[] getAccessTypeList(); @Override String getDriverClass(); @Override String getFieldDefinition( ValueMetaInterface v, String tk, String pk, boolean useAutoinc,
                                    boolean addFieldname, boolean addCr ); @Override String getURL( String hostname, String port, String databaseName ); @Override String[] getUsedLibraries(); @Override int getDefaultDatabasePort(); @Override List<String> getNamedClusterList(); @Override void putOptionalOptions( Map<String, String> extraOptions ); static final String AUTH_NO_SASL; }
@Test public void testPutOptionalOptions() { impalaDatabaseMeta.setNamedCluster( CLUSTER ); impalaDatabaseMeta.setPluginId( PLUGIN_ID ); Map<String, String> extraOptions = new HashMap<String, String>(); impalaDatabaseMeta.putOptionalOptions( extraOptions ); String value = extraOptions.get( PLUGIN_ID + ".pentahoNamedCluster" ); assertEquals( CLUSTER, value ); }