use of com.dtstack.taier.flink.FlinkClient in project Taier by DTStack.
the class SyncPluginInfoTest method testCreateSyncPluginArgs.
@Test
public void testCreateSyncPluginArgs() {
JobClient jobClient = new JobClient();
jobClient.setClassArgs("-jobid flink_test_stream");
jobClient.setComputeType(ComputeType.STREAM);
Whitebox.setInternalState(jobClient, "confProperties", new Properties());
FlinkConfig flinkConfig = new FlinkConfig();
flinkConfig.setRemoteFlinkJarPath("/opt/dtstack/110_flinkplugin/");
flinkConfig.setFlinkPluginRoot("/opt/dtstack/110_flinkplugin/");
flinkConfig.setMonitorAddress("http://localhost:8088");
flinkConfig.setPluginLoadMode("shipfile");
SyncPluginInfo syncPluginInfo = SyncPluginInfo.create(flinkConfig);
List<String> args = syncPluginInfo.createSyncPluginArgs(jobClient, new FlinkClient());
String result = new Gson().toJson(args);
String expectStr = "[\"-jobid\",\"flink_test_stream\",\"-monitor\",\"http://localhost:8088\",\"-pluginLoadMode\",\"shipfile\",\"-mode\",\"yarnPer\"]";
Assert.assertEquals(expectStr, result);
}
Aggregations