@Test public void testRequiredProperties() { Map<String, String> properties = getBasicProperties(); final TableSink<?> actual = TableFactoryService.find(TableSinkFactory.class, properties) .createTableSink(properties); assertTrue(actual instanceof DatahubTableSink); }
@Override public TableSink<Row> createTableSink(Map<String, String> prop) { DescriptorProperties params = new DescriptorProperties(); params.putProperties(prop); new DatahubDescriptorValidator().validate(params); TableSchema schema = params.getTableSchema(SCHEMA); String project = params.getString(CONNECTOR_PROJECT); String topic = params.getString(CONNECTOR_TOPIC); String accessId = params.getString(CONNECTOR_ACCESS_ID); String accessKey = params.getString(CONNECTOR_ACCESS_KEY); String endpoint = params.getString(CONNECTOR_ENDPOINT); return new DatahubTableSink( project, topic, accessId, accessKey, endpoint, schema, params ); }
DatahubTableFactory implements TableSinkFactory<Row> { @Override public TableSink<Row> createTableSink(Map<String, String> prop) { DescriptorProperties params = new DescriptorProperties(); params.putProperties(prop); new DatahubDescriptorValidator().validate(params); TableSchema schema = params.getTableSchema(SCHEMA); String project = params.getString(CONNECTOR_PROJECT); String topic = params.getString(CONNECTOR_TOPIC); String accessId = params.getString(CONNECTOR_ACCESS_ID); String accessKey = params.getString(CONNECTOR_ACCESS_KEY); String endpoint = params.getString(CONNECTOR_ENDPOINT); return new DatahubTableSink( project, topic, accessId, accessKey, endpoint, schema, params ); } }
DatahubTableFactory implements TableSinkFactory<Row> { @Override public TableSink<Row> createTableSink(Map<String, String> prop) { DescriptorProperties params = new DescriptorProperties(); params.putProperties(prop); new DatahubDescriptorValidator().validate(params); TableSchema schema = params.getTableSchema(SCHEMA); String project = params.getString(CONNECTOR_PROJECT); String topic = params.getString(CONNECTOR_TOPIC); String accessId = params.getString(CONNECTOR_ACCESS_ID); String accessKey = params.getString(CONNECTOR_ACCESS_KEY); String endpoint = params.getString(CONNECTOR_ENDPOINT); return new DatahubTableSink( project, topic, accessId, accessKey, endpoint, schema, params ); }  }
DatahubTableFactory implements TableSinkFactory<Row> { @Override public TableSink<Row> createTableSink(Map<String, String> prop) { DescriptorProperties params = new DescriptorProperties(); params.putProperties(prop); new DatahubDescriptorValidator().validate(params); TableSchema schema = params.getTableSchema(SCHEMA); String project = params.getString(CONNECTOR_PROJECT); String topic = params.getString(CONNECTOR_TOPIC); String accessId = params.getString(CONNECTOR_ACCESS_ID); String accessKey = params.getString(CONNECTOR_ACCESS_KEY); String endpoint = params.getString(CONNECTOR_ENDPOINT); return new DatahubTableSink( project, topic, accessId, accessKey, endpoint, schema, params ); }  String getConnectorTypeValue(); @Override Map<String, String> requiredContext(); @Override List<String> supportedProperties(); @Override TableSink<Row> createTableSink(Map<String, String> prop); }
DatahubTableFactory implements TableSinkFactory<Row> { @Override public TableSink<Row> createTableSink(Map<String, String> prop) { DescriptorProperties params = new DescriptorProperties(); params.putProperties(prop); new DatahubDescriptorValidator().validate(params); TableSchema schema = params.getTableSchema(SCHEMA); String project = params.getString(CONNECTOR_PROJECT); String topic = params.getString(CONNECTOR_TOPIC); String accessId = params.getString(CONNECTOR_ACCESS_ID); String accessKey = params.getString(CONNECTOR_ACCESS_KEY); String endpoint = params.getString(CONNECTOR_ENDPOINT); return new DatahubTableSink( project, topic, accessId, accessKey, endpoint, schema, params ); }  String getConnectorTypeValue(); @Override Map<String, String> requiredContext(); @Override List<String> supportedProperties(); @Override TableSink<Row> createTableSink(Map<String, String> prop);  }