@Test public void testGetURLNative() throws Exception { DatabaseConnection conn = new DatabaseConnection(); conn.setAccessType( DatabaseAccessType.NATIVE ); conn.setUsername( "joe" ); assertThat( dialect.getURL( conn ), is( "jdbc:hive2: }
@Override public String getURL( IDatabaseConnection databaseConnection ) throws DatabaseDialectException { return SimbaUrl.Builder.create() .withAccessType( databaseConnection.getAccessType().ordinal() ) .withDatabaseName( databaseConnection.getDatabaseName() ) .withPort( databaseConnection.getDatabasePort() ) .withDefaultPort( getDefaultDatabasePort() ) .withHostname( databaseConnection.getHostname() ) .withJdbcPrefix( getNativeJdbcPre() ) .withUsername( databaseConnection.getUsername() ) .withPassword( databaseConnection.getPassword() ) .withIsKerberos( isKerberos( databaseConnection ) ) .build() .getURL(); }
Hive2SimbaDatabaseDialect extends Hive2DatabaseDialect { @Override public String getURL( IDatabaseConnection databaseConnection ) throws DatabaseDialectException { return SimbaUrl.Builder.create() .withAccessType( databaseConnection.getAccessType().ordinal() ) .withDatabaseName( databaseConnection.getDatabaseName() ) .withPort( databaseConnection.getDatabasePort() ) .withDefaultPort( getDefaultDatabasePort() ) .withHostname( databaseConnection.getHostname() ) .withJdbcPrefix( getNativeJdbcPre() ) .withUsername( databaseConnection.getUsername() ) .withPassword( databaseConnection.getPassword() ) .withIsKerberos( isKerberos( databaseConnection ) ) .build() .getURL(); } }
Hive2SimbaDatabaseDialect extends Hive2DatabaseDialect { @Override public String getURL( IDatabaseConnection databaseConnection ) throws DatabaseDialectException { return SimbaUrl.Builder.create() .withAccessType( databaseConnection.getAccessType().ordinal() ) .withDatabaseName( databaseConnection.getDatabaseName() ) .withPort( databaseConnection.getDatabasePort() ) .withDefaultPort( getDefaultDatabasePort() ) .withHostname( databaseConnection.getHostname() ) .withJdbcPrefix( getNativeJdbcPre() ) .withUsername( databaseConnection.getUsername() ) .withPassword( databaseConnection.getPassword() ) .withIsKerberos( isKerberos( databaseConnection ) ) .build() .getURL(); } Hive2SimbaDatabaseDialect(); }
Hive2SimbaDatabaseDialect extends Hive2DatabaseDialect { @Override public String getURL( IDatabaseConnection databaseConnection ) throws DatabaseDialectException { return SimbaUrl.Builder.create() .withAccessType( databaseConnection.getAccessType().ordinal() ) .withDatabaseName( databaseConnection.getDatabaseName() ) .withPort( databaseConnection.getDatabasePort() ) .withDefaultPort( getDefaultDatabasePort() ) .withHostname( databaseConnection.getHostname() ) .withJdbcPrefix( getNativeJdbcPre() ) .withUsername( databaseConnection.getUsername() ) .withPassword( databaseConnection.getPassword() ) .withIsKerberos( isKerberos( databaseConnection ) ) .build() .getURL(); } Hive2SimbaDatabaseDialect(); IDatabaseType getDatabaseType(); @Override String getNativeDriver(); @Override String getURL( IDatabaseConnection databaseConnection ); @Override String getNativeJdbcPre(); @Override String[] getUsedLibraries(); @Override boolean initialize( String classname ); boolean isKerberos( IDatabaseConnection databaseConnection ); }
Hive2SimbaDatabaseDialect extends Hive2DatabaseDialect { @Override public String getURL( IDatabaseConnection databaseConnection ) throws DatabaseDialectException { return SimbaUrl.Builder.create() .withAccessType( databaseConnection.getAccessType().ordinal() ) .withDatabaseName( databaseConnection.getDatabaseName() ) .withPort( databaseConnection.getDatabasePort() ) .withDefaultPort( getDefaultDatabasePort() ) .withHostname( databaseConnection.getHostname() ) .withJdbcPrefix( getNativeJdbcPre() ) .withUsername( databaseConnection.getUsername() ) .withPassword( databaseConnection.getPassword() ) .withIsKerberos( isKerberos( databaseConnection ) ) .build() .getURL(); } Hive2SimbaDatabaseDialect(); IDatabaseType getDatabaseType(); @Override String getNativeDriver(); @Override String getURL( IDatabaseConnection databaseConnection ); @Override String getNativeJdbcPre(); @Override String[] getUsedLibraries(); @Override boolean initialize( String classname ); boolean isKerberos( IDatabaseConnection databaseConnection ); static final String SOCKET_TIMEOUT_OPTION; static final String DEFAULT_SOCKET_TIMEOUT; }