@Test public void testGetDefaultOptions() { SparkSimbaDatabaseMeta meta = mock( SparkSimbaDatabaseMeta.class ); when( meta.getPluginId() ).thenReturn( "SPARKSIMBA" ); when( meta.getDefaultOptions() ).thenCallRealMethod(); Map<String, String> options = meta.getDefaultOptions(); assertThat( options, IsMapWithSize.aMapWithSize( 1 ) ); assertThat( options, IsMapContaining.hasEntry( meta.getPluginId() + "." + SparkSimbaDatabaseMeta.SOCKET_TIMEOUT_OPTION, "10" ) ); }
@Override public Map<String, String> getDefaultOptions() { HashMap<String, String> options = new HashMap<>(); options.put( String.format( "%s.%s", getPluginId(), SOCKET_TIMEOUT_OPTION ), "10" ); return options; }
SparkSimbaDatabaseMeta extends BaseSimbaDatabaseMeta { @Override public Map<String, String> getDefaultOptions() { HashMap<String, String> options = new HashMap<>(); options.put( String.format( "%s.%s", getPluginId(), SOCKET_TIMEOUT_OPTION ), "10" ); return options; } }
SparkSimbaDatabaseMeta extends BaseSimbaDatabaseMeta { @Override public Map<String, String> getDefaultOptions() { HashMap<String, String> options = new HashMap<>(); options.put( String.format( "%s.%s", getPluginId(), SOCKET_TIMEOUT_OPTION ), "10" ); return options; } SparkSimbaDatabaseMeta( DriverLocator driverLocator, NamedClusterService namedClusterService,
                                 MetastoreLocator metastoreLocator ); }
SparkSimbaDatabaseMeta extends BaseSimbaDatabaseMeta { @Override public Map<String, String> getDefaultOptions() { HashMap<String, String> options = new HashMap<>(); options.put( String.format( "%s.%s", getPluginId(), SOCKET_TIMEOUT_OPTION ), "10" ); return options; } SparkSimbaDatabaseMeta( DriverLocator driverLocator, NamedClusterService namedClusterService,
                                 MetastoreLocator metastoreLocator ); @Override int[] getAccessTypeList(); @Override String getDriverClass(); @Override String getSQLQueryFields( String tableName ); @Override String getStartQuote(); @Override String getEndQuote(); @Override String getSQLTableExists( String tablename ); @Override String getTruncateTableStatement( String tableName ); @Override String getSQLColumnExists( String columnname, String tablename ); @Override String getLimitClause( int nrRows ); @Override String getSelectCountStatement( String tableName ); @Override String getDropColumnStatement( String tablename, ValueMetaInterface v, String tk, boolean use_autoinc,
                                        String pk, boolean semicolon ); @Override String getAddColumnStatement( String tablename, ValueMetaInterface v, String tk, boolean useAutoinc,
                                       String pk, boolean semicolon ); @Override String getModifyColumnStatement( String tablename, ValueMetaInterface v, String tk, boolean useAutoinc,
                                          String pk, boolean semicolon ); @Override String[] getUsedLibraries(); @Override int getDefaultDatabasePort(); @Override Map<String, String> getDefaultOptions(); }
SparkSimbaDatabaseMeta extends BaseSimbaDatabaseMeta { @Override public Map<String, String> getDefaultOptions() { HashMap<String, String> options = new HashMap<>(); options.put( String.format( "%s.%s", getPluginId(), SOCKET_TIMEOUT_OPTION ), "10" ); return options; } SparkSimbaDatabaseMeta( DriverLocator driverLocator, NamedClusterService namedClusterService,
                                 MetastoreLocator metastoreLocator ); @Override int[] getAccessTypeList(); @Override String getDriverClass(); @Override String getSQLQueryFields( String tableName ); @Override String getStartQuote(); @Override String getEndQuote(); @Override String getSQLTableExists( String tablename ); @Override String getTruncateTableStatement( String tableName ); @Override String getSQLColumnExists( String columnname, String tablename ); @Override String getLimitClause( int nrRows ); @Override String getSelectCountStatement( String tableName ); @Override String getDropColumnStatement( String tablename, ValueMetaInterface v, String tk, boolean use_autoinc,
                                        String pk, boolean semicolon ); @Override String getAddColumnStatement( String tablename, ValueMetaInterface v, String tk, boolean useAutoinc,
                                       String pk, boolean semicolon ); @Override String getModifyColumnStatement( String tablename, ValueMetaInterface v, String tk, boolean useAutoinc,
                                          String pk, boolean semicolon ); @Override String[] getUsedLibraries(); @Override int getDefaultDatabasePort(); @Override Map<String, String> getDefaultOptions();  }