You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: elasticsearch5/elasticsearch5-sink/src/main/java/com/dtstack/flink/sql/sink/elasticsearch/CustomerSinkFunc.java
+22-7Lines changed: 22 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -53,20 +53,24 @@ public class CustomerSinkFunc implements ElasticsearchSinkFunction<Tuple2> {
53
53
54
54
privateStringtype;
55
55
56
-
privateList<String> idFiledNames;
56
+
privateList<Object> ids;
57
+
58
+
// true means generation doc's id by position "1[,1]"
Copy file name to clipboardExpand all lines: elasticsearch5/elasticsearch5-sink/src/main/java/com/dtstack/flink/sql/sink/elasticsearch/ElasticsearchSink.java
+19-7Lines changed: 19 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,7 @@
47
47
importjava.util.List;
48
48
importjava.util.Map;
49
49
importjava.util.Objects;
50
+
importjava.util.stream.Collectors;
50
51
51
52
/**
52
53
* table output elastic5plugin
@@ -69,7 +70,10 @@ public class ElasticsearchSink implements RetractStreamTableSink<Row>, IStreamSi
69
70
70
71
privateStringtype = "";
71
72
72
-
privateList<String> idFiledNames;
73
+
privateList<Object> ids;
74
+
75
+
// true means generation doc's id by position "1[,1]"
76
+
privatebooleanusePosition = false;
73
77
74
78
protectedString[] fieldNames;
75
79
@@ -114,10 +118,12 @@ public TypeInformation<?>[] getFieldTypes() {
Preconditions.checkState(filedNamesLists.containsAll(idFiledNames), "elasticsearch5 type of id %s is should be exists in columns %s.", idFiledNames, filedNamesLists);
0 commit comments