You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/05/26 01:52:03 UTC

[GitHub] [incubator-inlong] LvJiancheng commented on a diff in pull request #4343: [INLONG-4228][Manager] Adaptive HDFS Load Node

LvJiancheng commented on code in PR #4343:
URL: https://github.com/apache/incubator-inlong/pull/4343#discussion_r882248051


##########
inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/sink/HdfsSink.java:
##########
@@ -0,0 +1,79 @@
+/*
+ * 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.inlong.manager.client.api.sink;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import org.apache.inlong.manager.client.api.DataSeparator;
+import org.apache.inlong.manager.common.enums.CompressionType;
+import org.apache.inlong.manager.common.enums.DataFormat;
+import org.apache.inlong.manager.common.enums.FileFormat;
+import org.apache.inlong.manager.common.enums.SinkType;
+import org.apache.inlong.manager.common.pojo.sink.hive.HivePartitionField;
+import org.apache.inlong.manager.common.pojo.stream.SinkField;
+import org.apache.inlong.manager.common.pojo.stream.StreamSink;
+
+import java.util.List;
+
+/**
+ * HDFS sink.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+@AllArgsConstructor
+@ApiModel("Hdfs sink configuration")
+public class HdfsSink extends StreamSink {
+
+    @ApiModelProperty(value = "Sink type", required = true)
+    private SinkType sinkType = SinkType.HDFS;
+
+    @ApiModelProperty("Data path, such as: hdfs://ip:port/usr/hive/warehouse/test.db")
+    private String dataPath;
+
+    @ApiModelProperty("File format, support: TextFile, ORCFile, SequenceFile, Parquet")
+    private FileFormat fileFormat;
+
+    @ApiModelProperty("Server timeZone")
+    private String serverTimeZone;
+
+    @ApiModelProperty("Compression type")
+    private CompressionType compressionType;
+
+    @ApiModelProperty("Data separator, stored as ASCII code")
+    private DataSeparator dataSeparator = DataSeparator.SOH;
+
+    @ApiModelProperty("Partition field list")
+    private List<HivePartitionField> partitionFieldList;
+
+    @ApiModelProperty("Create table or not")
+    private boolean needCreated;
+
+    @ApiModelProperty("Field definitions for hbase")
+    private List<SinkField> sinkFields;

Review Comment:
   done



##########
inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/sink/HdfsSink.java:
##########
@@ -0,0 +1,79 @@
+/*
+ * 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.inlong.manager.client.api.sink;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import org.apache.inlong.manager.client.api.DataSeparator;
+import org.apache.inlong.manager.common.enums.CompressionType;
+import org.apache.inlong.manager.common.enums.DataFormat;
+import org.apache.inlong.manager.common.enums.FileFormat;
+import org.apache.inlong.manager.common.enums.SinkType;
+import org.apache.inlong.manager.common.pojo.sink.hive.HivePartitionField;
+import org.apache.inlong.manager.common.pojo.stream.SinkField;
+import org.apache.inlong.manager.common.pojo.stream.StreamSink;
+
+import java.util.List;
+
+/**
+ * HDFS sink.
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+@AllArgsConstructor
+@ApiModel("Hdfs sink configuration")
+public class HdfsSink extends StreamSink {
+
+    @ApiModelProperty(value = "Sink type", required = true)
+    private SinkType sinkType = SinkType.HDFS;
+
+    @ApiModelProperty("Data path, such as: hdfs://ip:port/usr/hive/warehouse/test.db")
+    private String dataPath;
+
+    @ApiModelProperty("File format, support: TextFile, ORCFile, SequenceFile, Parquet")
+    private FileFormat fileFormat;
+
+    @ApiModelProperty("Server timeZone")
+    private String serverTimeZone;
+
+    @ApiModelProperty("Compression type")
+    private CompressionType compressionType;
+
+    @ApiModelProperty("Data separator, stored as ASCII code")
+    private DataSeparator dataSeparator = DataSeparator.SOH;
+
+    @ApiModelProperty("Partition field list")
+    private List<HivePartitionField> partitionFieldList;
+
+    @ApiModelProperty("Create table or not")
+    private boolean needCreated;

Review Comment:
   done



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org