use of org.apache.pulsar.io.core.annotations.Connector in project incubator-pulsar by apache.
the class ConnectorDocGenerator method generatorConnectorYamls.
private void generatorConnectorYamls(String outputDir) throws IOException {
Set<Class<?>> connectorClasses = reflections.getTypesAnnotatedWith(Connector.class);
log.info("Retrieve all `Connector` annotated classes : {}", connectorClasses);
for (Class<?> connectorClass : connectorClasses) {
Connector connectorDef = connectorClass.getDeclaredAnnotation(Connector.class);
try (FileOutputStream fos = new FileOutputStream(Paths.get(outputDir, "pulsar-io-" + connectorDef.name() + "-" + connectorDef.type().name().toLowerCase()).toString() + ".yml")) {
PrintWriter pw = new PrintWriter(new OutputStreamWriter(fos, StandardCharsets.UTF_8));
generateConnectorYaml(connectorClass, connectorDef, pw);
pw.flush();
}
}
}
use of org.apache.pulsar.io.core.annotations.Connector in project pulsar by yahoo.
the class ConnectorDocGenerator method generatorConnectorYamls.
private void generatorConnectorYamls(String outputDir) throws IOException {
Set<Class<?>> connectorClasses = reflections.getTypesAnnotatedWith(Connector.class);
log.info("Retrieve all `Connector` annotated classes : {}", connectorClasses);
for (Class<?> connectorClass : connectorClasses) {
Connector connectorDef = connectorClass.getDeclaredAnnotation(Connector.class);
try (FileOutputStream fos = new FileOutputStream(Paths.get(outputDir, "pulsar-io-" + connectorDef.name() + "-" + connectorDef.type().name().toLowerCase()).toString() + ".yml")) {
PrintWriter pw = new PrintWriter(new OutputStreamWriter(fos, StandardCharsets.UTF_8));
generateConnectorYaml(connectorClass, connectorDef, pw);
pw.flush();
}
}
}
use of org.apache.pulsar.io.core.annotations.Connector in project pulsar by apache.
the class ConnectorDocGenerator method generatorConnectorYamls.
private void generatorConnectorYamls(String outputDir) throws IOException {
Set<Class<?>> connectorClasses = reflections.getTypesAnnotatedWith(Connector.class);
log.info("Retrieve all `Connector` annotated classes : {}", connectorClasses);
for (Class<?> connectorClass : connectorClasses) {
Connector connectorDef = connectorClass.getDeclaredAnnotation(Connector.class);
try (FileOutputStream fos = new FileOutputStream(Paths.get(outputDir, "pulsar-io-" + connectorDef.name() + "-" + connectorDef.type().name().toLowerCase()).toString() + ".yml")) {
PrintWriter pw = new PrintWriter(new OutputStreamWriter(fos, StandardCharsets.UTF_8));
generateConnectorYaml(connectorClass, connectorDef, pw);
pw.flush();
}
}
}
Aggregations