seatunnel win idea 本地调试

调试FakeSource,LocalFile

# Set the basic configuration of the task to be performed
env {
  execution.parallelism = 1
  job.mode = "BATCH"
}

# Create a source to connect to Mongodb
source {
  # This is a example source plugin **only for test and demonstrate the feature source plugin**
  FakeSource {
    parallelism = 2
    result_table_name = "fake"
    row.num = 16
    schema = {
      fields {
        name = "string"
        age = "int"
      }
    }
  }
}

sink {

LocalFile {
    path = "/tmp/seatunnel/excel"
	file_format_type="excel"
}
}

调试前准备工作:

1.导入需要的connector

seatunnel win idea 本地调试_第1张图片

2.启动依赖Hadoop,设置Hadoop环境变量,记得安装Hadoop,放入winutils.exe

seatunnel win idea 本地调试_第2张图片

3.将配置文件放入到代码里面的resource目录下
4.运行类
org.apache.seatunnel.example.engine.SeaTunnelEngineExample

seatunnel win idea 本地调试_第3张图片

你可能感兴趣的:(seattunnel,intellij-idea,java,ide)