@Test public void testSupportedProperties() { Map<String, String> properties = getBasicProperties(); properties.put(CONNECTOR_BATCH_SIZE, "1"); properties.put(CONNECTOR_BUFFER_SIZE, "1"); properties.put(CONNECTOR_RETRY_TIMEOUT_IN_MILLS, "3"); properties.put(CONNECTOR_MAX_RETRY_TIMES, "10"); properties.put(CONNECTOR_BATCH_WRITE_TIMEOUT_IN_MILLS, "5"); final TableSink<?> actual = TableFactoryService.find(TableSinkFactory.class, properties) .createTableSink(properties); assertTrue(actual instanceof DatahubTableSink); }
@Override public List<String> supportedProperties() { List<String> properties = new ArrayList<>(); properties.add(CONNECTOR_PROJECT); properties.add(CONNECTOR_TOPIC); properties.add(CONNECTOR_ACCESS_ID); properties.add(CONNECTOR_ACCESS_KEY); properties.add(CONNECTOR_ENDPOINT); properties.add(CONNECTOR_BATCH_SIZE); properties.add(CONNECTOR_BUFFER_SIZE); properties.add(CONNECTOR_BATCH_WRITE_TIMEOUT_IN_MILLS); properties.add(CONNECTOR_RETRY_TIMEOUT_IN_MILLS); properties.add(CONNECTOR_MAX_RETRY_TIMES); properties.add(SCHEMA + ".#." + SCHEMA_TYPE); properties.add(SCHEMA + ".#." + SCHEMA_NAME); return properties; }
DatahubTableFactory implements TableSinkFactory<Row> { @Override public List<String> supportedProperties() { List<String> properties = new ArrayList<>(); properties.add(CONNECTOR_PROJECT); properties.add(CONNECTOR_TOPIC); properties.add(CONNECTOR_ACCESS_ID); properties.add(CONNECTOR_ACCESS_KEY); properties.add(CONNECTOR_ENDPOINT); properties.add(CONNECTOR_BATCH_SIZE); properties.add(CONNECTOR_BUFFER_SIZE); properties.add(CONNECTOR_BATCH_WRITE_TIMEOUT_IN_MILLS); properties.add(CONNECTOR_RETRY_TIMEOUT_IN_MILLS); properties.add(CONNECTOR_MAX_RETRY_TIMES); properties.add(SCHEMA + ".#." + SCHEMA_TYPE); properties.add(SCHEMA + ".#." + SCHEMA_NAME); return properties; } }
DatahubTableFactory implements TableSinkFactory<Row> { @Override public List<String> supportedProperties() { List<String> properties = new ArrayList<>(); properties.add(CONNECTOR_PROJECT); properties.add(CONNECTOR_TOPIC); properties.add(CONNECTOR_ACCESS_ID); properties.add(CONNECTOR_ACCESS_KEY); properties.add(CONNECTOR_ENDPOINT); properties.add(CONNECTOR_BATCH_SIZE); properties.add(CONNECTOR_BUFFER_SIZE); properties.add(CONNECTOR_BATCH_WRITE_TIMEOUT_IN_MILLS); properties.add(CONNECTOR_RETRY_TIMEOUT_IN_MILLS); properties.add(CONNECTOR_MAX_RETRY_TIMES); properties.add(SCHEMA + ".#." + SCHEMA_TYPE); properties.add(SCHEMA + ".#." + SCHEMA_NAME); return properties; }  }
DatahubTableFactory implements TableSinkFactory<Row> { @Override public List<String> supportedProperties() { List<String> properties = new ArrayList<>(); properties.add(CONNECTOR_PROJECT); properties.add(CONNECTOR_TOPIC); properties.add(CONNECTOR_ACCESS_ID); properties.add(CONNECTOR_ACCESS_KEY); properties.add(CONNECTOR_ENDPOINT); properties.add(CONNECTOR_BATCH_SIZE); properties.add(CONNECTOR_BUFFER_SIZE); properties.add(CONNECTOR_BATCH_WRITE_TIMEOUT_IN_MILLS); properties.add(CONNECTOR_RETRY_TIMEOUT_IN_MILLS); properties.add(CONNECTOR_MAX_RETRY_TIMES); properties.add(SCHEMA + ".#." + SCHEMA_TYPE); properties.add(SCHEMA + ".#." + SCHEMA_NAME); return properties; }  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 List<String> supportedProperties() { List<String> properties = new ArrayList<>(); properties.add(CONNECTOR_PROJECT); properties.add(CONNECTOR_TOPIC); properties.add(CONNECTOR_ACCESS_ID); properties.add(CONNECTOR_ACCESS_KEY); properties.add(CONNECTOR_ENDPOINT); properties.add(CONNECTOR_BATCH_SIZE); properties.add(CONNECTOR_BUFFER_SIZE); properties.add(CONNECTOR_BATCH_WRITE_TIMEOUT_IN_MILLS); properties.add(CONNECTOR_RETRY_TIMEOUT_IN_MILLS); properties.add(CONNECTOR_MAX_RETRY_TIMES); properties.add(SCHEMA + ".#." + SCHEMA_TYPE); properties.add(SCHEMA + ".#." + SCHEMA_NAME); return properties; }  String getConnectorTypeValue(); @Override Map<String, String> requiredContext(); @Override List<String> supportedProperties(); @Override TableSink<Row> createTableSink(Map<String, String> prop);  }