Skip to content

Commit

Permalink
[INLONG-4179][Manager] Add Java docs for manager (#4180)
Browse files Browse the repository at this point in the history
  • Loading branch information
fuweng11 authored and leosanqing committed May 16, 2022
1 parent 9aeeb84 commit ed0b0fa
Show file tree
Hide file tree
Showing 331 changed files with 1,311 additions and 138 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
import java.util.Map;
import java.util.concurrent.TimeUnit;

/**
* Test class for auto push to hive.
*/
public class AutoPush2HiveExample {

// Manager web url
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
import java.util.Map;
import java.util.concurrent.TimeUnit;

/**
* Test class for binlog to kafka.
*/
@Slf4j
public class Binlog2KafkaExample {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
import java.util.Map;
import java.util.concurrent.TimeUnit;

/**
* Test class for file to hive.
*/
public class File2HiveExample {

// Manager web url
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
import java.util.Map;
import java.util.concurrent.TimeUnit;

/**
* Test class for kafka to hive.
*/
@Slf4j
public class Kafka2HiveExample {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
import com.beust.jcommander.Parameter;
import com.beust.jcommander.ParameterException;

/**
* Class for parse command.
*/
abstract class CommandBase {

protected final JCommander jcommander;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@

import java.io.File;

/**
* Create resource by json file.
*/
@Parameters(commandDescription = "Create resource by json file")
public class CommandCreate extends CommandBase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@

import java.util.List;

/**
* Get commond describe info of resources.
*/
@Parameters(commandDescription = "Display details of one or more resources")
public class CommandDescribe extends CommandBase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
import java.util.ArrayList;
import java.util.List;

/**
* Get main infomation of resources.
*/
@Parameters(commandDescription = "Displays main information for one or more resources")
public class CommandList extends CommandBase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
import java.util.HashMap;
import java.util.Map;

/**
* Command tool main.
*/
public class CommandToolMain {

protected final Map<String, Class<?>> commandMap = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
import java.nio.file.Paths;
import java.util.Properties;

/**
* Util of command for creat connect by config file.
*/
abstract class CommandUtil {

private static final String CONFIG_FILE = "application.properties";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@

import java.util.List;

/**
* The config of group, including stream config, stream source, stream sink, etc.
*/
@Data
public class CreateGroupConf {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@

import java.io.File;

/**
* File converter.
*/
public class FileConverter implements IStringConverter<File> {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@

import java.util.Date;

/**
* Group info, including inlong group id, inlong group name, etc.
*/
@Data
public class GroupInfo {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@

import java.util.Date;

/**
* Sink info, including sink type, sink name, etc.
*/
@Data
public class SinkInfo {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@

import java.util.Date;

/**
* Source info, including source type, source name, etc.
*/
@Data
public class SourceInfo {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@

import java.util.Date;

/**
* Stream info, including stream name, data type, data encoding, etc.
*/
@Data
public class StreamInfo {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
import java.lang.reflect.Type;
import java.nio.charset.Charset;

/**
* Charset adapter.
*/
public class CharsetAdapter implements JsonDeserializer {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@

import java.lang.reflect.Type;

/**
* Data format adapter.
*/
public class DataFormatAdapter implements JsonDeserializer {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@

import java.nio.charset.Charset;

/**
* Util of gson for register each type of adapter, such as charsetAdapter, streamSourceAdapter, etc.
*/
public class GsonUtil {

public static Gson gsonBuilder() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@

import java.lang.reflect.Type;

/**
* MQ base config adapter.
*/
public class MQBaseConfAdapter implements JsonDeserializer {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@

import java.lang.reflect.Type;

/**
* Separator adapter.
*/
public class SeparatorAdapter implements JsonDeserializer {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@

import java.lang.reflect.Type;

/**
* Sort base config adapter.
*/
public class SortBaseConfAdapter implements JsonDeserializer {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@

import java.lang.reflect.Type;

/**
* Stream sink adapter.
*/
public class StreamSinkAdapter implements JsonDeserializer {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@

import java.lang.reflect.Type;

/**
* Stream source adapter.
*/
public class StreamSourceAdapter implements JsonDeserializer {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
import org.apache.commons.lang3.EnumUtils;
import org.apache.inlong.manager.client.api.InlongGroupContext.InlongGroupStatus;

/**
* Class for inlong group status verification.
*/
public class GroupStatus implements IParameterValidator {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
import org.junit.Assert;
import org.junit.Test;

/**
* Command service test for {@link CommandToolMain}
*/
@Slf4j
public class TestCommand {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@

import java.util.Map;

/**
* Flink sort base config.
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel("Base configuration for flink cluster")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ static InlongClient create(String serviceUrl, ClientConfiguration configuration)
/**
* List group state
*
* @param groupNames
* @return
* @throws Exception
* @param groupNames inlong group name list
* @return map of inlong group status list
* @throws Exception the exception
*/
Map<String, InlongGroupStatus> listGroupState(List<String> groupNames) throws Exception;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public interface InlongGroup {
/**
* Create snapshot for Inlong group
*
* @return
* @throws Exception
* @return inlong group context
* @throws Exception the exception
*/
InlongGroupContext context() throws Exception;

Expand All @@ -48,8 +48,7 @@ public interface InlongGroup {
/**
* Update Inlong group on updated conf
*
* @return
* @throws Exception
* @throws Exception the exception
*/
void update(InlongGroupConf conf) throws Exception;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
import lombok.Data;
import lombok.NoArgsConstructor;

/**
* Inlong group config.
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
import java.util.List;
import java.util.Map;

/**
* Inlong group context.
*/
@Data
@Slf4j
public class InlongGroupContext implements Serializable {
Expand Down
Loading

0 comments on commit ed0b0fa

Please sign in to comment.