Skip to content

Commit 206cd02

Browse files
committed
Merge branch 'feat_solr' into '1.10_test_4.2.x'
[feat-1584] fix outRecords metrics. See merge request dt-insight-engine/flinkStreamSQL!279
2 parents cef2673 + 583e149 commit 206cd02

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

solr/solr-sink/src/main/java/com/dtstack/flink/sql/sink/solr/SolrOutputFormat.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,11 @@ public void writeRecord(Tuple2<Boolean, Row> record) throws IOException {
9898
columnIndex++;
9999
}
100100
try {
101+
if (outRecords.getCount() % ROW_PRINT_FREQUENCY == 0) {
102+
LOG.info("Receive data : {}", row);
103+
}
101104
provider.add(solrDocument);
105+
outRecords.inc();
102106
} catch (SolrServerException | PrivilegedActionException e) {
103107
LOG.error("", e);
104108
}

solr/solr-sink/src/main/java/com/dtstack/flink/sql/sink/solr/table/SolrSinkParser.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,6 @@ public Class dbTypeConvertToJavaType(String fieldType) {
109109
case "date":
110110
case "timestamp":
111111
return Timestamp.class;
112-
case "binary":
113-
return byte[].class;
114112
default:
115113
throw new RuntimeException("不支持 " + fieldType + " 类型");
116114
}

0 commit comments

Comments
 (0)