-
Notifications
You must be signed in to change notification settings - Fork 285
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
Yingjian Wu
committed
Jun 10, 2024
1 parent
fcaa0c0
commit 7096045
Showing
13 changed files
with
278 additions
and
92 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
43 changes: 43 additions & 0 deletions
43
metacat-client/src/main/java/com/netflix/metacat/client/api/ParentChildRelV1.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,43 @@ | ||
package com.netflix.metacat.client.api; | ||
|
||
import javax.ws.rs.Path; | ||
import javax.ws.rs.Consumes; | ||
import javax.ws.rs.Produces; | ||
import javax.ws.rs.GET; | ||
import javax.ws.rs.PathParam; | ||
|
||
import javax.ws.rs.core.MediaType; | ||
import com.netflix.metacat.common.dto.notifications.ChildInfoDto; | ||
|
||
import java.util.Set; | ||
|
||
/** | ||
* Metacat API for managing parent child relation. | ||
* | ||
* @author Yingjianw | ||
*/ | ||
|
||
@Path("/mds/v1/parentChildRel") | ||
@Consumes(MediaType.APPLICATION_JSON) | ||
@Produces(MediaType.APPLICATION_JSON) | ||
public interface ParentChildRelV1 { | ||
/** | ||
* Return the list of children. | ||
* @param catalogName catalogName | ||
* @param databaseName databaseName | ||
* @param tableName tableName | ||
* @return list of childInfos | ||
*/ | ||
@GET | ||
@Path("children/catalog/{catalog-name}/database/{database-name}/table/{table-name}") | ||
@Consumes(MediaType.APPLICATION_JSON) | ||
@Produces(MediaType.APPLICATION_JSON) | ||
Set<ChildInfoDto> getChildren( | ||
@PathParam("catalog-name") | ||
String catalogName, | ||
@PathParam("database-name") | ||
String databaseName, | ||
@PathParam("table-name") | ||
String tableName | ||
); | ||
} |
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
31 changes: 31 additions & 0 deletions
31
metacat-common/src/main/java/com/netflix/metacat/common/dto/notifications/ChildInfoDto.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,31 @@ | ||
package com.netflix.metacat.common.dto.notifications; | ||
|
||
import com.netflix.metacat.common.dto.BaseDto; | ||
import io.swagger.annotations.ApiModelProperty; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.NoArgsConstructor; | ||
|
||
/** | ||
* ChildInfo information. | ||
*/ | ||
@SuppressWarnings("unused") | ||
@Data | ||
@EqualsAndHashCode(callSuper = false) | ||
@Builder | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class ChildInfoDto extends BaseDto { | ||
private static final long serialVersionUID = 9121109874202088789L; | ||
/* Name of the child */ | ||
@ApiModelProperty(value = "name of the child") | ||
private String name; | ||
/* Type of the relation */ | ||
@ApiModelProperty(value = "type of the relation") | ||
private String relationType; | ||
/* uuid of the table */ | ||
@ApiModelProperty(value = "uuid of the table") | ||
private String uuid; | ||
} |
Oops, something went wrong.