-
Notifications
You must be signed in to change notification settings - Fork 534
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
63 changed files
with
2,944 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
...o/src/main/java/org/apache/inlong/manager/pojo/cluster/sort/http/SortHttpClusterInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* 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.pojo.cluster.sort.http; | ||
|
||
import org.apache.inlong.manager.common.enums.ClusterType; | ||
import org.apache.inlong.manager.common.util.JsonTypeDefine; | ||
import org.apache.inlong.manager.pojo.sort.BaseSortClusterInfo; | ||
|
||
import io.swagger.annotations.ApiModel; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.ToString; | ||
|
||
@Data | ||
@ToString(callSuper = true) | ||
@EqualsAndHashCode(callSuper = true) | ||
@JsonTypeDefine(value = ClusterType.SORT_HTTP) | ||
@ApiModel("Inlong cluster info for Sort http") | ||
public class SortHttpClusterInfo extends BaseSortClusterInfo { | ||
|
||
public SortHttpClusterInfo() { | ||
this.setType(ClusterType.SORT_HTTP); | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
...rc/main/java/org/apache/inlong/manager/pojo/cluster/sort/http/SortHttpClusterRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* 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.pojo.cluster.sort.http; | ||
|
||
import org.apache.inlong.manager.common.enums.ClusterType; | ||
import org.apache.inlong.manager.common.util.JsonTypeDefine; | ||
import org.apache.inlong.manager.pojo.sort.BaseSortClusterRequest; | ||
|
||
import io.swagger.annotations.ApiModel; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.ToString; | ||
|
||
@Data | ||
@ToString(callSuper = true) | ||
@EqualsAndHashCode(callSuper = true) | ||
@JsonTypeDefine(value = ClusterType.SORT_HTTP) | ||
@ApiModel("Inlong cluster request for Sort http") | ||
public class SortHttpClusterRequest extends BaseSortClusterRequest { | ||
|
||
public SortHttpClusterRequest() { | ||
this.setType(ClusterType.SORT_HTTP); | ||
} | ||
} |
75 changes: 75 additions & 0 deletions
75
.../manager-pojo/src/main/java/org/apache/inlong/manager/pojo/node/http/HttpDataNodeDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/* | ||
* 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.pojo.node.http; | ||
|
||
import org.apache.inlong.manager.common.enums.ErrorCodeEnum; | ||
import org.apache.inlong.manager.common.exceptions.BusinessException; | ||
import org.apache.inlong.manager.common.util.CommonBeanUtils; | ||
import org.apache.inlong.manager.common.util.JsonUtils; | ||
|
||
import io.swagger.annotations.ApiModel; | ||
import io.swagger.annotations.ApiModelProperty; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import org.apache.commons.lang3.StringUtils; | ||
|
||
import javax.validation.constraints.NotNull; | ||
|
||
/** | ||
* Http service data node info | ||
*/ | ||
@Data | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@ApiModel("Http service data node info") | ||
public class HttpDataNodeDTO { | ||
|
||
@ApiModelProperty("HTTP base url") | ||
private String baseUrl; | ||
|
||
@ApiModelProperty("Whether to enable credential") | ||
private Boolean enableCredential; | ||
|
||
@ApiModelProperty("Max connect count") | ||
private Integer maxConnect; | ||
/** | ||
* Get the dto instance from the request | ||
*/ | ||
public static HttpDataNodeDTO getFromRequest(HttpDataNodeRequest request, String extParams) { | ||
HttpDataNodeDTO dto = StringUtils.isNotBlank(extParams) | ||
? HttpDataNodeDTO.getFromJson(extParams) | ||
: new HttpDataNodeDTO(); | ||
return CommonBeanUtils.copyProperties(request, dto, true); | ||
} | ||
|
||
/** | ||
* Get the dto instance from the JSON string. | ||
*/ | ||
public static HttpDataNodeDTO getFromJson(@NotNull String extParams) { | ||
try { | ||
return JsonUtils.parseObject(extParams, HttpDataNodeDTO.class); | ||
} catch (Exception e) { | ||
throw new BusinessException(ErrorCodeEnum.GROUP_INFO_INCORRECT, | ||
String.format("Failed to parse extParams for Cloud log service node: %s", e.getMessage())); | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.