/** * {@inheritDoc} */ @Override public ConnectorTableService getTableService() { return this.getService(ConnectorTableService.class); }
/** * Constructor. * * @param connectorContext connector config */ DruidConnectorFactory( final DruidConnectorInfoConverter druidConnectorInfoConverter, final ConnectorContext connectorContext ) { super(druidConnectorInfoConverter, connectorContext); super.registerClazz(DruidConnectorConfig.class, DruidHttpClientConfig.class); super.refresh(); }
/** * Constructor. * * @param context connector context * @param metacatHiveClient hive client * @param hiveMetacatConverters hive converter */ public HiveConnectorPartitionService( final ConnectorContext context, final IMetacatHiveClient metacatHiveClient, final HiveConnectorInfoConverter hiveMetacatConverters ) { this.metacatHiveClient = metacatHiveClient; this.hiveMetacatConverters = hiveMetacatConverters; this.catalogName = context.getCatalogName(); this.context = context; }
/** * Constructor. * * @param connectorContext server context * @param jdbcTemplate JDBC template * @param fastServiceMetric fast service metric * @param directSqlSavePartition direct sql partition service */ public DirectSqlTable( final ConnectorContext connectorContext, final JdbcTemplate jdbcTemplate, final HiveConnectorFastServiceMetric fastServiceMetric, final DirectSqlSavePartition directSqlSavePartition ) { this.catalogName = connectorContext.getCatalogName(); this.registry = connectorContext.getRegistry(); this.jdbcTemplate = jdbcTemplate; this.fastServiceMetric = fastServiceMetric; this.directSqlSavePartition = directSqlSavePartition; }
private int getDataStoreReadTimeout(final ConnectorContext connectorContext) { int result = DEFAULT_DATASTORE_READ_TIMEOUT; try { result = Integer.parseInt( connectorContext.getConfiguration().get(HiveConfigConstants.JAVAX_JDO_DATASTOREREADTIMEOUT)); } catch (final Exception ignored) { } return result; }
/** * Return true, if the resource exists. * * @param context The request context * @param name The qualified name of the resource to get * @return Return true, if the resource exists. * @throws UnsupportedOperationException If the connector doesn't implement this method */ @SuppressFBWarnings default boolean exists(final ConnectorRequestContext context, final QualifiedName name) { return get(context, name) != null; }
/** * add Plugin. * * @param connectorPlugin connector plugin */ public void addPlugin(final ConnectorPlugin connectorPlugin) { plugins.put(connectorPlugin.getType(), connectorPlugin); }
/** * Returns the connector database service for the given <code>name</code>. * * @param name qualified name * @return Returns the connector database service for the given <code>name</code> */ public ConnectorDatabaseService getDatabaseService(final QualifiedName name) { return getConnectorFactory(name).getDatabaseService(); }
/** * Returns the connector table service for the given <code>name</code>. * * @param name qualified name * @return Returns the connector table service for the given <code>name</code> */ public ConnectorTableService getTableService(final QualifiedName name) { return getConnectorFactory(name).getTableService(); }
/** * Returns the connector partition service for the given <code>name</code>. * * @param name qualified name * @return Returns the connector partition service for the given <code>name</code> */ public ConnectorPartitionService getPartitionService(final QualifiedName name) { return getConnectorFactory(name).getPartitionService(); }
/** * Returns the connector type converter for the given <code>connectorType</code>. * * @param connectorType connector type * @return Returns the connector type converter for the given <code>connectorType</code> */ public ConnectorTypeConverter getTypeConverter(final String connectorType) { return getPlugin(connectorType).getTypeConverter(); }
/** * Returns the connector dto converter for the given <code>connectorType</code>. * * @param connectorType connector type * @return Returns the connector dto converter for the given <code>connectorType</code> */ public ConnectorInfoConverter getInfoConverter(final String connectorType) { return getPlugin(connectorType).getInfoConverter(); }
/** * Constructor. * * @param connectorContext server context * @param jdbcTemplate JDBC template * @param fastServiceMetric fast service metric * @param directSqlSavePartition direct sql partition service */ public DirectSqlTable( final ConnectorContext connectorContext, final JdbcTemplate jdbcTemplate, final HiveConnectorFastServiceMetric fastServiceMetric, final DirectSqlSavePartition directSqlSavePartition ) { this.catalogName = connectorContext.getCatalogName(); this.registry = connectorContext.getRegistry(); this.jdbcTemplate = jdbcTemplate; this.fastServiceMetric = fastServiceMetric; this.directSqlSavePartition = directSqlSavePartition; }
/** * Constructor. * * @param context connector context * @param metacatHiveClient hive client * @param hiveMetacatConverters hive converter */ public HiveConnectorPartitionService( final ConnectorContext context, final IMetacatHiveClient metacatHiveClient, final HiveConnectorInfoConverter hiveMetacatConverters ) { this.metacatHiveClient = metacatHiveClient; this.hiveMetacatConverters = hiveMetacatConverters; this.catalogName = context.getCatalogName(); this.context = context; }
/** * {@inheritDoc} */ @Override public ConnectorDatabaseService getDatabaseService() { return this.getService(ConnectorDatabaseService.class); }
/** * Return true, if the resource exists. * * @param context The request context * @param name The qualified name of the resource to get * @return Return true, if the resource exists. * @throws UnsupportedOperationException If the connector doesn't implement this method */ @SuppressFBWarnings default boolean exists(final ConnectorRequestContext context, final QualifiedName name) { return get(context, name) != null; }
/** * {@inheritDoc} */ @Override public ConnectorPartitionService getPartitionService() { return this.getService(ConnectorPartitionService.class); }
/** * {@inheritDoc} */ @Override public ConnectorDatabaseService getDatabaseService() { return this.getService(ConnectorDatabaseService.class); }
/** * {@inheritDoc} */ @Override public ConnectorPartitionService getPartitionService() { return this.getService(ConnectorPartitionService.class); }
/** * {@inheritDoc} */ @Override public ConnectorTableService getTableService() { return this.getService(ConnectorTableService.class); }