RegisterInputOutput()远程群集上的错误,Apache Flink

时间:2015-12-07 21:35:26

标签: apache-flink

在本地版本的Apache Flink中执行以下代码不会产生任何错误,但在远程群集上会产生以下错误! 任何帮助表示赞赏!

 personRecords =  env.readCsvFile("dataPath/dataset.csv")
               .lineDelimiter("\n").fieldDelimiter(",")         
               .includeFields("11").types(Integer.class, String.class);

 partitionedData = personRecords.map(new cleanerMap());

错误显示如下:

java.lang.Exception: Call to registerInputOutput() of invokable failed
        at org.apache.flink.runtime.taskmanager.Task.run(Task.java:529)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: The initialization of the DataSource's outputs caused an error: Could not read the user code wrapper: org.apache.flink.quickstart.myProj$cleanerMap
        at org.apache.flink.runtime.operators.DataSourceTask.registerInputOutput(DataSourceTask.java:89)
        at org.apache.flink.runtime.taskmanager.Task.run(Task.java:526)
        ... 1 more
Caused by: org.apache.flink.runtime.operators.util.CorruptConfigurationException: Could not read the user code wrapper: org.apache.flink.quickstart.myProj$cleanerMap
        at org.apache.flink.runtime.operators.util.TaskConfig.getStubWrapper(TaskConfig.java:284)
        at org.apache.flink.runtime.operators.BatchTask.instantiateUserCode(BatchTask.java:1465)
        at org.apache.flink.runtime.operators.chaining.ChainedMapDriver.setup(ChainedMapDriver.java:39)
        at org.apache.flink.runtime.operators.chaining.ChainedDriver.setup(ChainedDriver.java:78)
        at org.apache.flink.runtime.operators.BatchTask.initOutputs(BatchTask.java:1336)
        at org.apache.flink.runtime.operators.DataSourceTask.initOutputs(DataSourceTask.java:284)
        at org.apache.flink.runtime.operators.DataSourceTask.registerInputOutput(DataSourceTask.java:86)

1 个答案:

答案 0 :(得分:2)

如果找不到用户代码类,

TaskConfig.getStubWrapper()会抛出CorruptConfigurationException

我会检查程序jar文件中是否包含cleanerMap类。