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/11/01 10:32:34 UTC

[GitHub] [inlong] healchow commented on a diff in pull request #6346: [INLONG-6345][Sort] Add metrics for Doris connector

healchow commented on code in PR #6346:
URL: https://github.com/apache/inlong/pull/6346#discussion_r1010293450


##########
inlong-sort/sort-connectors/doris/src/main/java/org/apache/inlong/sort/doris/model/RespContent.java:
##########
@@ -0,0 +1,95 @@
+/*
+ * 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.sort.doris.model;
+
+import lombok.Data;
+import org.apache.doris.shaded.com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import org.apache.doris.shaded.com.fasterxml.jackson.annotation.JsonProperty;
+import org.apache.doris.shaded.com.fasterxml.jackson.core.JsonProcessingException;
+import org.apache.doris.shaded.com.fasterxml.jackson.databind.ObjectMapper;
+
+/**
+ * RespContent copy from {@link org.apache.doris.flink.rest.models.RespContent}
+ **/
+@Data
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class RespContent {
+
+    @JsonProperty(value = "TxnId")
+    private int txnId;
+
+    @JsonProperty(value = "Label")
+    private String label;
+
+    @JsonProperty(value = "Status")
+    private String status;
+
+    @JsonProperty(value = "ExistingJobStatus")
+    private String existingJobStatus;
+
+    @JsonProperty(value = "Message")
+    private String message;
+
+    @JsonProperty(value = "NumberTotalRows")
+    private long numberTotalRows;
+
+    @JsonProperty(value = "NumberLoadedRows")
+    private long numberLoadedRows;
+
+    @JsonProperty(value = "NumberFilteredRows")
+    private int numberFilteredRows;
+
+    @JsonProperty(value = "NumberUnselectedRows")
+    private int numberUnselectedRows;
+
+    @JsonProperty(value = "LoadBytes")
+    private long loadBytes;
+
+    @JsonProperty(value = "LoadTimeMs")
+    private int loadTimeMs;
+
+    @JsonProperty(value = "BeginTxnTimeMs")
+    private int beginTxnTimeMs;
+
+    @JsonProperty(value = "StreamLoadPutTimeMs")
+    private int streamLoadPutTimeMs;
+
+    @JsonProperty(value = "ReadDataTimeMs")
+    private int readDataTimeMs;
+
+    @JsonProperty(value = "WriteDataTimeMs")
+    private int writeDataTimeMs;
+
+    @JsonProperty(value = "CommitAndPublishTimeMs")
+    private int commitAndPublishTimeMs;
+
+    @JsonProperty(value = "ErrorURL")
+    private String errorURL;
+
+    @Override
+    public String toString() {
+        ObjectMapper mapper = new ObjectMapper();

Review Comment:
   Suggest using a global instance of `ObjectMapper`.



-- 
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