john8628 commented on code in PR #3387:
URL:
https://github.com/apache/incubator-seatunnel/pull/3387#discussion_r1022778671
##########
seatunnel-connectors-v2/connector-iotdb/src/main/java/org/apache/seatunnel/connectors/seatunnel/iotdb/config/SinkConfig.java:
##########
@@ -35,28 +38,28 @@
@ToString
public class SinkConfig extends CommonConfig {
- public static final String KEY_TIMESTAMP = "key_timestamp";
- public static final String KEY_DEVICE = "key_device";
- public static final String KEY_MEASUREMENT_FIELDS =
"key_measurement_fields";
- public static final String STORAGE_GROUP = "storage_group";
- public static final String BATCH_SIZE = "batch_size";
- public static final String BATCH_INTERVAL_MS = "batch_interval_ms";
- public static final String MAX_RETRIES = "max_retries";
- public static final String RETRY_BACKOFF_MULTIPLIER_MS =
"retry_backoff_multiplier_ms";
- public static final String MAX_RETRY_BACKOFF_MS = "max_retry_backoff_ms";
- public static final String DEFAULT_THRIFT_BUFFER_SIZE =
"default_thrift_buffer_size";
- public static final String MAX_THRIFT_FRAME_SIZE = "max_thrift_frame_size";
- public static final String ZONE_ID = "zone_id";
- public static final String ENABLE_RPC_COMPRESSION =
"enable_rpc_compression";
- public static final String CONNECTION_TIMEOUT_IN_MS =
"connection_timeout_in_ms";
-
private static final int DEFAULT_BATCH_SIZE = 1024;
+ public static final Option<String> KEY_TIMESTAMP =
Options.key("key_timestamp").stringType().noDefaultValue().withDescription("key
timestamp");
+ public static final Option<String> KEY_DEVICE =
Options.key("key_device").stringType().noDefaultValue().withDescription("key
device");
+ public static final Option<String> KEY_MEASUREMENT_FIELDS =
Options.key("key_measurement_fields").stringType().noDefaultValue().withDescription("key
measurement fields");
Review Comment:
OK ,got it . thanks
##########
seatunnel-connectors-v2/connector-iotdb/src/main/java/org/apache/seatunnel/connectors/seatunnel/iotdb/source/IoTDBSourceFactory.java:
##########
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.connectors.seatunnel.iotdb.source;
+
+import static
org.apache.seatunnel.connectors.seatunnel.iotdb.config.CommonConfig.NODE_URLS;
+import static
org.apache.seatunnel.connectors.seatunnel.iotdb.config.CommonConfig.PASSWORD;
+import static
org.apache.seatunnel.connectors.seatunnel.iotdb.config.CommonConfig.USERNAME;
+
+import org.apache.seatunnel.api.configuration.util.OptionRule;
+import org.apache.seatunnel.api.table.factory.Factory;
+import org.apache.seatunnel.api.table.factory.TableSourceFactory;
+import org.apache.seatunnel.connectors.seatunnel.iotdb.config.SourceConfig;
+
+import com.google.auto.service.AutoService;
+
+@AutoService(Factory.class)
+public class IoTDBSourceFactory implements TableSourceFactory{
+ @Override
+ public String factoryIdentifier() {
+ return "IoTDB";
+ }
+
+ @Override
+ public OptionRule optionRule() {
+ return OptionRule.builder()
+ .required(NODE_URLS, USERNAME, PASSWORD,
SourceConfig.SQL).build();
Review Comment:
OK ,got it . thanks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]